The software development landscape has shifted dramatically. In 2024, a whopping 62% of professional developers use AI in their development process. This has done wonders for the productivity of an average software developer, and has led many people to assume this means that either we need fewer software developers or, more likely, we can get more and better software developed with existing staff.
However, there are issues with this shift.
Last year, I read and loved the 2024 GitClear AI report on the downward pressure that AI has put on code quality—and the corresponding increase in code complexity. I wrote on this topic last year in my newsletter.
This year, the 2025 GitClear AI Code Quality Research report analyzed 211 million lines of code across five years. This report shows that as AI usage has increased this last year, the issues with the developed code in large and complex systems have continued to increase as well.
In short, as AI is used more and more in the software development process, we’ve seen a corresponding increase in complexity and code size. The result? Developers are spending more time refactoring code and less time writing new code.
The Growing Epidemic of Code Duplication
The 2025 GitClear report discovered something unprecedented—for the first time in recorded history, the frequency of “Copy/Pasted” lines exceeded “Moved” lines in code repositories. This represents a fundamental change in how our industry builds software.
Why, exactly, is this true? When a developer “moves” code, they’re typically refactoring it—rearranging existing functionality into more reusable modules. This is the hallmark of good software architecture and something that all but the greenest developers do regularly. Unfortunately, it’s also something that AI software agents almost never do.
You see, code that is “copy/pasted” represents duplication, which directly violates the DRY (Don’t Repeat Yourself) principle that has guided professional software development for decades. The more duplicated code your application contains, the greater its complexity and the more vulnerable it is to bugs and other problems. The more you use duplicated code, the harder it is for developers to understand the code, the larger the code base, and the more susceptible it is to future problems. Experienced software developers recognize this. Novice developers and AI coding agents do not.
The numbers are significant. In just four years, the rate of code reuse has plummeted from 25% of changed lines in 2021 to less than 10% in 2024. Meanwhile, code duplication has soared. Code duplication has seen an 8-fold increase in 2024 alone.
Why AI Assistants Generate Duplicate Code
The root cause isn’t difficult to identify. Today’s AI coding assistants excel at generating code quickly, but they operate with significant limitations:
- Limited Context: The most popular code assistant in 2024 could fit approximately 10 files in their context window. This means it can’t simply “see” enough of the codebase to identify existing functions it should reuse or refactor.
- Path of Least Resistance: AI tools are optimized to suggest solutions that work immediately, not solutions that integrate elegantly with existing architecture. The “tab key” that inserts suggested code becomes a tempting shortcut that bypasses thoughtful design.
- Misaligned Metrics: When organizations measure developer productivity by lines of code or commit counts, they inadvertently encourage behavior that prioritizes quantity over maintainability. Inserting larger quantities of code is actually encouraged, rather than discouraged, by most developer metric systems.
Even as software developers report greater productivity when using AI tools, software defect rates continue to rise.
The Human Edge: Refactoring and System Thinking
This brings us to the evolving role of the professional developer. As AI takes over the mechanical aspects of code generation, human developers are finding their unique value in areas where AI currently falls short:
- System-Level Understanding. While AI can write discrete functions or even entire components, they lack the capacity to understand the full architectural context of a system. Humans excel at their ability to identify patterns across disparate parts of the codebase, and understand the business domain logic it represents.
- Refactoring Expertise. Humans have significant expertise in code refactoring—that is, the ability to restructure existing code without changing its external behavior. Humans are good at consolidating duplicate blocks into reusable functions, creating well-named, and well-documented modules, and establishing canonical implementations that can be reliably tested and maintained. They also can identify opportunities for reuse that exists across modules and systems.
- Quality Guardianship. Humans can detect and address technical debt. They are good at finding and fixing problems deeply embedded in systems. They can examine complex systems and identity patterns that lead to quality issues. Humans can detect and address technical debt, and design comprehensive strategies for improving test coverage.
Finding the Right Balance
This isn’t to say that AI code assistants aren’t incredibly valuable. They undeniably accelerate the overall development process.The key is finding the right balance that leverages AI’s strengths while mitigating its weaknesses.
In order to thrive in this AI-centric, AI-enabled developer world, modern organizations must:
- Adjust metrics: Move away from measuring productivity by lines of code or raw commit counts. Instead, organizations should track metrics that approximate long-term maintenance costs, such as duplication rates, test coverage, and defect frequency.
- Allocate time for refactoring: Build dedicated time into sprints for consolidating duplicated code and improving system and application architecture. Managing technical debt and decreasing complexity will become more important as more and more AI-generated software is included in our systems.
- Value system knowledge: Recognize that understanding the entire system and its architectural patterns is increasingly the most valuable skill a developer can possess. Experienced engineers have vast system knowledge that is invaluable to organizations in managing their codebase.
The Future of Development
We’re entering a new era where the most valuable developers aren’t those who write the most code, but those who excel at organizing, refactoring, and simplifying complex systems. It’s imperative that the measures we use to track developer productivity be adjusted to address this change, or we will continue down the path of more complex—and more risky—application code. We risk getting into a situation where we can no longer manage the complexity of all the code that we have asked AI to create for us.
Yes, in the future AI tools will be built that will help address these limitations. But for now, the human ability to refactor, simplify, and consolidate remains critical. And, as it turns out, even more critical than our ability to even write new and original code.
It turns out that developer experience is worth its weight in gold…

Sponsorships
Are you interested in sponsoring the Software Architecture Insights newsletter or website? Lots of sponsorship opportunities are available. Download our sponsorship guide for details, or contact Lee Atchison directly on Linkedin.