A Peer-Reviewed Paper Says Current Coding Agents Struggle to Pinpoint the Exact Code Developers Changed

A paper in the ESEM 2026 proceedings compared the code three AI coding agents changed with the code developers changed to fix the same issues. Current agents can often identify the general architectural region an issue affects, it concludes, but still struggle to pinpoint the exact implementation locations.

An AI coding agent can be handed a bug report and asked to fix it. How is such an agent judged? Current evaluations mainly focus on whether its fix passes the tests, says a peer-reviewed paper in the ESEM 2026 proceedings. They give limited insight into another question, it says. Did the agent change the same parts of the code that the developers chose?

Current agents can often identify the general architectural region affected by an issue, it says. But they still struggle to precisely pinpoint the exact implementation locations. The paper was published on October 5, 2026, and calls itself an exploratory study. Its four authors work at universities in Denmark, Finland and the United States. Parts of it follow, not the whole.

Illustration

What a Passing Test Cannot Show

Recent benchmarks have shown that agents can resolve a substantial fraction of real GitHub issues, the paper says, as measured by hidden test suites. But test-based evaluation alone cannot tell two cases apart, the authors write.

In the first, the agent edits the right files, classes and methods. In the second, a patch satisfies the tests while it changes parts of the code the developer would never have touched. The paper calls that "incidental coverage." Research on automated program repair has documented this ambiguity, it says. For modern agents built on large language models, it remains largely unexplored.

How the Study Worked

The study used issues from 10 large-scale Java projects. It kept only issues closed before January 1, 2021. That cutoff predates the widespread availability of AI coding assistants, the paper says. It ensures that the developers' fixes reflect unassisted decisions, not AI-suggested ones.

For each issue, the code was reverted to its state before the fix. An agent then got the issue description and the code, and was told to produce a fix. It was given nothing from the developer's fix. It had no access to tools that would reveal the commit history.

Three agents took part. Each paired the same harness with a different open-weight model. The authors then compared what each agent changed with what the developer had changed, on 2,441 issues. They did it at three levels, from the coarsest to the finest: the package, the class and the method.

What the Comparison Found

The agents did best at the package level. Their performance progressively degraded at the class and method levels, the paper says. As it puts it, "the larger the target, the easier it is to hit."

Precision stayed comparatively high. Recall stayed substantially lower. That indicates, the paper says, that the agents often identified relevant parts correctly but failed to capture the full set the developers modified. The agents rarely modified completely unrelated code. Instead they tended to modify only a subset of what the developers touched.

That may reduce invasive or destabilizing edits, the paper says. But it also increases the likelihood of incomplete fixes. That holds especially when an issue requires coordinated changes across multiple methods or classes.

Divergent Cases

In some cases the agent both changed code the developer had not touched and missed code the developer had changed. The paper calls these divergent cases. They account for 25.07% of all observations. Each observation is one agent's run on one issue, evaluated at one of the three levels. The share of divergent cases grows as the level gets finer. It is 11.73% at the package level, 23.42% at the class level and 40.05% at the method level. The overall share was consistent across the three models, it says.

The paper's measures count every divergent case as incorrect. Yet in such a case the agent may still have produced a fix that behaves the same way, through other parts of the code, the paper says. Its measures alone cannot confirm or rule that out. So its findings should be read as a lower bound on how well the agents localize, it says.

In Practice

From a practical standpoint, the paper suggests, agents can already give useful support in the early triage of an issue. They can help maintainers narrow down the relevant architectural area. But they should not be relied upon for precise method-level localization without human verification, it says. The high rate of divergent cases at finer levels indicates a substantial risk of incomplete or misplaced fixes, it says.

A green test run says the tests passed. It does not say where the fix landed, or whether it reached every place a developer would have changed. Those are questions for whoever reviews the change.

The Paper's Own Limits

The study has limits the authors name. All three agents shared the same harness, so the results show how different models behave within it, not how agents behave in general. The projects are open-source Java, and the results may not generalize to industrial systems or other languages. Each agent ran each issue once. A developer's fix may also hold changes unrelated to the issue, which could inflate the set the agents were measured against.

The pre-2021 cutoff keeps the developers' fixes free of AI. But it does not keep those issues out of the models' training data, the paper says. The agents may have met some of these fixes during training. And a systematic check of whether the divergent fixes work the same way is left to future work.

When an agent's fix passes the tests, who checks where it went?