Rethinking Automated Program Repair: The Impact of Bug Complexity, Fault Localization, and LLM Cost-efficiency
This paper presents a comprehensive empirical study demonstrating that while bug complexity and imprecise fault localization challenge automated program repair, low-cost LLMs can effectively fix over 50% of moderately complex bugs, revealing a critical trade-off where higher-cost models and advanced reasoning settings do not always guarantee superior cost-efficiency.
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 you are a detective trying to solve a mystery, but instead of a crime scene, you are looking at a computer program that isn't working right. This field is called Automated Program Repair (APR). For years, computers have tried to fix their own mistakes, but they often needed a human to point exactly at the broken part first. Recently, a new type of super-smart computer brain called a Large Language Model (LLM) has entered the game. Think of these LLMs as incredibly well-read apprentices who have read almost every book in the library; they can guess what a program should look like and try to write the fix themselves. But here's the big question: Are these digital apprentices actually good at fixing hard problems, or do they just get lucky on easy ones? And if they are smart, does it cost a fortune to hire them? This is the puzzle a team of researchers set out to solve.
The researchers, led by Junchi Liu and his team at Colorado State University, decided to stop guessing and start testing. They built a giant playground of computer code problems, specifically pulling 640 tricky puzzles from a competitive programming site called AtCoder. These weren't just simple typos; they were like finding a needle in a haystack, with some problems being small and simple, and others being massive, tangled knots of logic. They tested two different "repair bots" (named ChatRepair and CodeCorrector) using three different types of AI brains (DeepSeek, GPT, and Llama). They wanted to see how well these bots worked when they knew exactly where the bug was, when they only had a vague idea, and when they had no clue at all. They also kept a very close eye on the price tag, calculating exactly how many dollars it cost to fix each bug.
Here is what they discovered, and it's a bit of a plot twist. First, they found that the "smartest" and most expensive AI models don't always win the race. While the super-powerful GPT-5 model did fix the most bugs overall, it was like hiring a celebrity chef to make a sandwich: it worked, but it cost a lot more than using a very capable, cheaper model like DeepSeek-V3.2. In fact, the cheaper model was so much more cost-effective that for every dollar spent, it fixed nearly four times as many bugs as the expensive one in some scenarios.
Second, they learned that the "difficulty" of the bug matters a lot. The easiest bugs (single-line fixes) were solved almost instantly. But even when the bugs were complex and messy, the AI didn't give up; it still managed to fix over 50% of the moderately difficult ones. However, the researchers found that if you don't tell the AI exactly where the problem is, the performance gap between the different repair bots gets huge. Some bots are like detectives who can work with a blurry photo, while others need a crystal-clear picture to do their job. The study suggests that for the best results, you might want to use a cheap, fast bot first to fix the easy stuff, and then only call in the expensive, heavy-hitting AI for the really stubborn problems that the first bot couldn't crack.
Finally, they looked at "reasoning." Some AI models have a special mode where they "think" before they speak, like a student working out a math problem on scratch paper before writing the final answer. The team found that this "thinking" mode helped some models (like the DeepSeek series) fix many more bugs, but it didn't help the GPT-5 model much at all. It turned out that paying extra for "thinking" didn't always mean getting a better result; sometimes, it just meant waiting longer and spending more money for the same outcome.
In the end, the paper suggests that we don't need to spend a fortune to get great results. By mixing and matching different AI models and understanding that not every bug needs a supercomputer to fix, we can build repair systems that are both smart and affordable. The researchers conclude that while the technology is powerful, the key to success isn't just having the most expensive tool, but knowing exactly which tool to use for the job at hand.
Drowning in papers in your field?
Get daily digests of the most novel papers matching your research keywords — with technical summaries, in your language.