GitClear Reveals AI's Negative Impact On Code Quality |
Written by Sue Gee | |||
Wednesday, 05 March 2025 | |||
Code assistants are increasingly taking on the task of code-writing. While this might seem welcome, research from GitClear reveals a negative impact on code quality, with more use of copy and paste and less refactoring. In view of the rapid adoption of AI assistance, Bill Harding CEO of GitClear Bill Harding CEO of GitClear, set out to use his company's metrics to investigate the impact of AI on code quality, in particular maintainability for the future. A year ago, we reported the results of his first White Paper which drew attention to the high degree of "churn" experienced by code produced with help from GitHub Copilot where "churn" was defined as the percentage of lines of code that are reverted or updated less than two weeks after being authored. The just-published new paper, AI Copilot Code Quality, 2025, reports on the analysis of 211 million changed lines of code from non-autogenerated files, authored between January 2020 and December 2024. Two-thirds of this data comes from private corporations who are users of GitClear's tools who have opted in to anonymized data sharing, and one-third from open source projects and GitClear points out this is the largest known database of highly structured code change data that has be made available to evaluate code quality. All of the data analyzed in the report is available to GitClear customers with a basic subscription and of the stats are even available to developers on GitClear’s free “Starter” subscription. The following Trends table updates the one from the previous year: The cells shaded red highlight where the 2024 Actual data differs markedly from what what projected on the basis of the trend from 2020 to 2023. The 2025 reports updates the Code Operation and Code Churn by Year graph including a projection for the coming year that uses the Year-on-Year change in the bottom row of the Trends table:
The most worrying concern in this data is the increase in Added code. In particular, the frequency of copy/pasted lines increased 6% faster than GitClear's prediction leading to a pronounced spiked in the prevalence of duplicate code blocks:
Summing up the 2024 results and what it means in terms of future maintainability the report states: In 2024 the number of “Copy/Pasted” lines exceeded the count of “Moved” lines. Moved lines strongly suggest refactoring activity. If the current trend continues, we believe it could soon bring about a phase change in how developer energy is spent, especially among long-lived repos. Instead of developer energy being spent principally on developing new features, in coming years we may find “defect remediation” as the leading day-to-day developer responsibility. More InformationRelated ArticlesCopilot Research Asks Who Will Clean Up The Mess 2024 Stack Overflow Developer Survey To be informed about new articles on I Programmer, sign up for our weekly newsletter, subscribe to the RSS feed and follow us on Twitter, Facebook or Linkedin.
Comments
or email your comment to: comments@i-programmer.info |
|||
Last Updated ( Wednesday, 05 March 2025 ) |