← Latest papers
🤖 AI

Will It Survive? Deciphering the Fate of AI-Generated Code in Open Source

Contrary to the hypothesis that AI-generated code is disposable, a survival analysis of 201 open-source projects reveals that agent-authored code actually persists longer than human-written code, though it faces slightly higher corrective modification rates, suggesting that organizational practices rather than generation quality are the primary bottleneck for its long-term evolution.

Original authors: Musfiqur Rahman, Emad Shihab

Published 2026-01-26
📖 5 min read🧠 Deep dive

Original authors: Musfiqur Rahman, Emad Shihab

Original paper licensed under CC BY 4.0 (http://creativecommons.org/licenses/by/4.0/). This is an AI-generated explanation of the paper below. It is not written or endorsed by the authors. For technical accuracy, refer to the original paper. Read full disclaimer

Imagine software development as a massive, bustling construction site where buildings (codebases) are constantly being built, renovated, and repaired. For years, the prevailing worry among the site managers (software engineers) was that if they started using "robot builders" (AI agents) to lay bricks, those bricks would be flimsy. The fear was that the robots would slap together a wall, the human foreman would quickly approve it to keep the project moving, and then, as soon as the robot walked away, the wall would crumble or need to be torn down immediately. This idea is called the "disposable code" hypothesis—the belief that AI-generated code is just temporary filler that won't last.

This paper, titled "Will It Survive? Deciphering the Fate of AI-Generated Code in Open Source," goes to the construction site to check the bricks after they've been laid. The researchers didn't just look at how well the robots built the wall while they were working; they watched the wall for months to see if it stood the test of time.

Here is what they found, broken down into simple stories:

1. The "Ghost Brick" Phenomenon (Survival)

The Myth: People thought AI bricks would be knocked down or replaced very quickly.
The Reality: The AI bricks actually lasted longer than the human bricks.

The researchers tracked over 200,000 lines of code (individual bricks) across 201 different projects. They found that lines of code written by AI were 16% less likely to be changed or deleted than lines written by humans.

Why? The "Don't Touch My Code" Rule.
The paper suggests a funny psychological reason: Humans are often hesitant to touch code they didn't write. It's like a tenant moving into a house and being afraid to rearrange the furniture because they don't know where the hidden wires are.

  • Human Code: When a human writes a line, they feel ownership. If they see a small problem later, they feel compelled to fix it immediately.
  • AI Code: When an AI writes a line, no single human feels responsible for it. It becomes a bit of a "ghost brick." Humans are less likely to mess with it unless it's absolutely broken, so it sits there, untouched, for longer.

Note: This wasn't true for all robots. The "Copilot-style" robots (which help humans write code) produced the most stable bricks. However, fully autonomous robots (like "Devin," which tries to do the whole job alone) actually produced bricks that were changed more often than human bricks, likely because they were more experimental.

2. The "Why" Behind the Repairs (Intent)

When the bricks were eventually changed, the researchers asked: Why?
They looked at the "repair orders" (commit messages) to see if the changes were fixing bugs, adding new features, or just updating old tools.

  • Human Bricks: Humans tended to change their code to adapt to new environments (like changing a door handle because the new lock system requires it). This is called "Adaptive" maintenance.
  • AI Bricks: When AI code was changed, it was slightly more likely to be a bug fix (Corrective) or a security patch (Preventive).
  • The Catch: The difference wasn't huge. It's not that AI code is "worse" or "better"; it just has a slightly different repair profile. Also, different AI tools behaved very differently. One AI tool might produce code that needs 44% bug fixes, while another might only need 13%. The specific tool matters more than the fact that it's "AI."

3. Can We Predict the Future? (Forecasting)

The researchers tried to build a crystal ball to predict two things:

  1. Which bricks will break? (Can we spot the weak lines?)
  2. When will they break? (Can we predict the timing?)
  • Spotting the Weakness (Success): They were moderately successful at this. By looking at the "vocabulary" of the code (the specific words and commands used), they could guess which lines were likely to be changed. For example, code that connects to specific, changing external services (like a cloud API) was flagged as "high risk" for future changes.
  • Predicting the Timing (Failure): They failed to predict when a change would happen. Knowing a brick might break is easy; knowing if it will break tomorrow or in six months is impossible using just the code itself.
    • The Metaphor: It's like knowing a car part is prone to wear and tear (the code content), but you can't predict if the mechanic will get around to fixing it next week or next year. That timing depends on the mechanic's schedule (organizational dynamics), not the part itself.

The Big Takeaway

The paper concludes that the fear of "disposable AI code" is largely a myth. AI-generated code actually survives longer than human code, mostly because humans are too shy to touch it.

However, the real bottleneck isn't the quality of the code the AI writes. The real problem is how organizations manage it. If a company doesn't assign a human "owner" to the AI's work, that code might sit there untouched for a long time, not because it's perfect, but because no one feels responsible for it. The key to making AI code last isn't just better robots; it's better human management and clear ownership.

Drowning in papers in your field?

Get daily digests of the most novel papers matching your research keywords — with technical summaries, in your language.

Try Digest →