← Research
AI and Technical Debt: Evidence from 3 Billion Lines of Code
João Dimas, Eddie Lu and Lampros Pnevmatikos
Working Paper
Abstract
AI raises worker productivity and lets firms build knowledge assets, such as the software they run on, faster. Low-quality AI output, however, may embed these assets with hidden liabilities that firms must later verify, fix, and maintain. Software lets us inspect the asset itself and measure these liabilities directly. We identify firm-affiliated public GitHub projects and, every month, use an industry-standard tool to scan each project’s full codebase for maintainability issues, bugs, and security vulnerabilities. This amounts to processing over 3.6 billion lines of code. We convert the tool’s estimated repair time into a dollar measure of technical debt. We compare projects in which AI use first appears with similar projects whose AI use is detected later or remains undetected. During the first seven months of detected AI use, codebases grow on average 6.1% more than those of comparable projects. Contrary to concerns about “AI slop,” total issues per line of code decline by 1.3%, and technical debt per line by 0.7%. Bugs per line also decline, and security vulnerabilities and critical issues, the most severe ones, show no statistically significant change. The quality gains are modest, but at the very least they provide evidence against a deterioration in the quality of the average line. Detected AI use is thus linked with faster growth in firms’ software assets.