AI and Technical Debt: Evidence from 4 Billion Lines of Code
Working Paper
- Paper (PDF) for AI and Technical Debt: Evidence from 4 Billion Lines of Code
- SSRN for AI and Technical Debt: Evidence from 4 Billion Lines of Code
Evidence against widespread “AI slop” in corporate software. We compare firms’ public software projects around first detected AI use with similar projects where AI use has not yet been detected.
Fewer total issues per line.
- Total issues per line
- −1.4%
- Average over the first seven months
Change per line (% of pre-detection average)
- Total issues per line
| Month from first detected AI use | Total issues (%) |
|---|---|
| -12 | 0.02 |
| -11 | -0.09 |
| -10 | -0.46 |
| -9 | -0.28 |
| -8 | -0.40 |
| -7 | -0.30 |
| -6 | -0.28 |
| -5 | -0.17 |
| -4 | -0.17 |
| -3 | -0.24 |
| -2 | -0.05 |
| -1 (reference) | 0.00 |
| 0 | -0.29 |
| 1 | -0.68 |
| 2 | -0.90 |
| 3 | -1.26 |
| 4 | -1.68 |
| 5 | -2.25 |
| 6 | -2.57 |
Total issues combine maintainability issues, bugs, and security vulnerabilities.
Both declines persist when the comparison group is restricted to projects where AI use is detected later.
Technical debt per line falls modestly.
- Technical debt per line
- −0.7%
- Average over the first seven months
Change per line (% of pre-detection average)
- Technical debt per line
| Month from first detected AI use | Technical debt (%) |
|---|---|
| -12 | -0.08 |
| -11 | 0.08 |
| -10 | -0.31 |
| -9 | -0.11 |
| -8 | -0.30 |
| -7 | -0.44 |
| -6 | -0.31 |
| -5 | -0.24 |
| -4 | -0.05 |
| -3 | -0.10 |
| -2 | -0.00 |
| -1 (reference) | 0.00 |
| 0 | 0.00 |
| 1 | -0.28 |
| 2 | -0.45 |
| 3 | -0.72 |
| 4 | -1.01 |
| 5 | -1.19 |
| 6 | -1.60 |
Technical debt is the estimated future cost of resolving maintainability issues.
The decline is similar in size but is not statistically significant when the comparison group is restricted to later-detected projects.
Fewer bugs per line.
- Bugs per line
- −2.1%
- Average over the first seven months
Change per line (% of pre-detection average)
- Bugs per line
| Month from first detected AI use | Bugs (%) |
|---|---|
| -12 | -1.78 |
| -11 | -2.29 |
| -10 | -2.02 |
| -9 | -2.15 |
| -8 | -2.33 |
| -7 | -0.78 |
| -6 | -0.41 |
| -5 | -0.28 |
| -4 | -0.62 |
| -3 | -0.38 |
| -2 | -0.09 |
| -1 (reference) | 0.00 |
| 0 | -0.61 |
| 1 | -1.18 |
| 2 | -1.59 |
| 3 | -2.31 |
| 4 | -2.77 |
| 5 | -3.06 |
| 6 | -3.38 |
Both declines persist when the comparison group is restricted to projects where AI use is detected later.
Quality gains concentrate in projects with weaker initial practices.
| Measure | Weaker initial practices | Stronger initial practices |
|---|---|---|
| Total issues per line | −2.1% | −0.2% |
| Bugs per line | −3.1% | −0.1% |
| Technical debt per line | −1.8% | +0.7% |
Initial practices combine test-file share, tests changed with code, human review, use of pull requests, and configured automatic checks.
The stronger-practice group’s changes are not statistically significant. The issue and bug declines in the weaker group also hold against later-detected projects.
Other quality measures show no significant change.
- Critical issues per line
- No significant change
- Security vulnerabilities per line
- No significant change
- Security-review flags per line
- No significant change
- Duplicated-code share
- No significant change
- Complexity per line
- No significant change
No statistically significant change in either comparison group.
Codebases also grow 6.6% more than those of comparable projects over the same seven months.