Can LLMs be Effective Code Contributors? A Study on Open-source Projects
This study evaluates the effectiveness of three LLMs in contributing to large-scale open-source projects through a verification and validation framework, finding that they struggle with complex contexts, new code generation, and maintaining project-specific standards, with success rates varying significantly between 0% and 60%.
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
The "Junior Intern" Problem: Can AI Actually Help Build Real Software?
Imagine you’ve just hired a new junior intern to help you with a massive, complex construction project—like building a skyscraper. This intern is incredibly fast, has read every manual ever written, and can mimic the way professional builders talk.
However, there’s a catch: The intern has a terrible memory for details, sometimes hallucinates tools that don't exist, and occasionally tries to fix a leaky pipe by accidentally deleting the entire plumbing system.
This paper, "Can LLMs be Effective Code Contributors?", is essentially a performance review of these "AI interns" (like GPT-4o) to see if they are actually ready to work on real-world, professional software projects.
The Experiment: The "Real World" Test
Most people test AI by asking it simple questions, like "Write a function to sort a list." That’s like asking an intern to "Build a birdhouse." It’s easy and predictable.
The researchers decided to be much tougher. They took 212 real tasks—actual bug fixes and new features—that human engineers had performed on famous, massive open-source projects (like FFmpeg, which handles video). They gave the AI the "blueprints" (the code) and the "work order" (the commit message) and said: "Don't just tell me how to fix it; actually write the code and make it work."
The Findings: Where the Intern Fails
The study found that while AI can be helpful, it is currently far from being a "reliable contributor." Here is how they failed, explained through analogies:
1. The "Ghost Tool" Problem (Undeclared Identifiers)
The AI often tries to use tools that aren't in the toolbox. It might write code that calls a function named calculate_total(), but in that specific project, that function is actually named get_sum().
- The Result: The code won't even start (it fails to compile). It’s like an intern trying to use a specialized laser level that isn't actually on the construction site.
2. The "Half-Baked Fix" (Partial Fixes)
Sometimes, a bug is like a house with two leaking roofs. The AI will walk in, patch one roof perfectly, and then walk out, thinking the job is done.
- The Result: The code "passes" some tests, but the original problem isn't actually solved.
3. The "Chaos Agent" (Unrelated Deletions)
This was one of the most dangerous findings. To fix a small issue, the AI sometimes decides to "clean up" by deleting parts of the code that were working perfectly fine but looked "cluttered" to the AI.
- The Result: It’s like an intern trying to fix a squeaky door by removing the entire door frame. They "fixed" the squeak, but now you can't close the door.
4. The "Memory Fog" (Context Size)
The researchers found that as the "blueprints" (the files) got larger and more complex, the AI’s success rate plummeted.
- The Result: If the task is a small, simple room, the AI is great. If the task involves the entire electrical grid of a city, the AI gets overwhelmed and starts making wild, incorrect guesses.
The Verdict: Use Them, But Watch Them Closely
The paper concludes that LLMs are not yet "effective contributors" who can be left alone. Instead, they are assistants that require constant supervision.
The Researchers' Advice for Humans:
- Keep it Small: If you want AI to help, don't give it a whole library. Give it a small, manageable piece of the puzzle.
- Double-Check the "Fixes": Especially when the AI is fixing a bug (which is harder for it than building something new), a human must verify that it didn't just "hide" the bug or break something else.
- Don't Trust the "Pass": Just because the AI says "I fixed it!" or the code passes a basic test doesn't mean it's actually correct. It might have just bypassed the test.
In short: The AI intern is fast and eager, but until they stop "hallucinating" tools and "deleting" walls, they need a senior engineer standing right over their shoulder.
Drowning in papers in your field?
Get daily digests of the most novel papers matching your research keywords — with technical summaries, in your language.