The Hidden Cost of AI-Generated Code
Summary: AI coding tools make code faster to produce. The evidence on what happens next is still young but points in a consistent direction. CodeRabbit’s analysis of 470 open-source pull requests found AI-co-authored changes averaged about 1.7 times as many issues as human-only changes [1]. GitClear’s analysis of 153 million changed lines found an 11% rise in the share of duplicated code and projected that short-lived “churn” would double compared with 2021 [2]. Google’s DORA research describes AI as an amplifier: it magnifies the strengths of strong teams and the dysfunctions of struggling ones [3]. And developers themselves are wary: in Stack Overflow’s 2025 survey, more distrusted the accuracy of AI output than trusted it [4]. The cost is real but depends on the team using the tool.
What the data shows
More issues per change. In December 2025, CodeRabbit compared 320 AI-co-authored pull requests with 150 human-only pull requests from open-source projects. AI-co-authored changes averaged 10.83 issues versus 6.45, about 1.7 times as many. The report also found about 1.4 to 1.7 times as many critical and major findings, with logic and correctness problems 75% more common [1].
More duplication and rework. GitClear studied more than 153 million changed lines written between 2020 and 2023, across about 3,400 repositories. The share of duplicated code rose 11% compared with 2021. “Churn”, meaning code reverted or updated within two weeks of being written, ran at 3% to 4% a year from 2020 to 2022, then averaged 5.5% in 2023. GitClear projected it would pass 7% in 2024, double the 2021 rate [2]. Duplication means the same logic gets maintained in many places, which makes every future change slower and riskier.
An amplifier, not a verdict. DORA’s 2025 report draws on nearly 5,000 technology professionals. Its central finding is that AI amplifies what is already there: teams with strong practices get more out of it, and teams with weak ones get their problems faster [3].
Developers feel it too. In Stack Overflow’s 2025 Developer Survey, 84% of respondents said they use or plan to use AI tools, up from 76% the year before. Yet more distrust the accuracy of AI output (46%) than trust it (33%). The most common frustration, selected by 66%, was “AI solutions that are almost right, but not quite,” and 45% said debugging AI-generated code is more time-consuming [4]. These are reported attitudes, not measurements, but they describe the same cost: output that looks right and isn’t.
How much weight to put on this
Be careful with these numbers.
- CodeRabbit sells AI code review, the sample is modest, it covers open-source projects only, and it labels pull requests as AI-authored from co-authorship signals, so it cannot guarantee the “human” group had no AI help [1].
- GitClear’s work shows correlation, not causation, its data ends in 2023, and the doubling is a projection [2].
- None of these studies measures your team, your language, or your review process.
The fair reading is that AI-generated code tends to need more scrutiny, not that it is bad. The risk is not that AI writes worse code than people on average. It is that fast, plausible-looking code can outrun a team’s ability to review it.
Where the hidden cost accumulates
- Review load. Reviewers face more code, written faster, with less context from the author.
- Duplication. Code that is easy to generate is easy to repeat, and repeated code is expensive to change.
- Subtle defects. Plausible code with a logic error passes a quick glance and fails in production.
- Lost understanding. When no one on the team wrote or fully understood a module, maintaining it later costs more.
What to do about it
- Make review and testing the bottleneck on purpose. Faster authoring needs stronger automated tests and clear review standards.
- Set rules for where AI is welcome. Boilerplate, tests, and scaffolding are lower risk than security-sensitive or core business logic.
- Watch the right measures. Defect escape rate, rework, and change failure rate tell you more than lines of code or tool usage.
- Keep a human owner for every module. Someone must understand it well enough to change it.
- Audit before you scale. If AI-assisted code is already in your product, a short technical review can show where the risk sits.
Sources & References
[1] CodeRabbit: State of AI vs Human Code Generation Report (December 2025), vendor study, 470 open-source pull requests
[2] GitClear analysis of 153M changed lines (2020 to 2023), as summarized by Arc.dev
[3] Google Cloud: 2025 DORA State of AI-assisted Software Development report
[4] Stack Overflow Developer Survey 2025: AI