A Peer-Reviewed Paper Says an AI Judge of Code Patches Is Useful for Triage but Insufficient Alone

A paper in the ESEM 2026 proceedings tested two widely used AI models as judges of whether code patches are correct. It calls such a judge useful as a triage aid but insufficient as a standalone check, and says its explanations should be treated as starting points for further investigation.

Tools for automated program repair write patches that try to fix bugs in software. Someone then has to decide whether each patch is correct. More and more often, that judge is a large language model. A peer-reviewed paper in the ESEM 2026 proceedings tests how far such a judge can be trusted. It was published on October 5, 2026. Its four authors work at a university in China.

Such a judge is useful as a triage aid, the paper concludes, but insufficient as a standalone correctness oracle. Parts of the paper follow, not the whole.

Illustration

Passing the Tests Does Not Guarantee a Fix

A test suite can show that a patch passes all its tests, the paper says. It cannot guarantee that the patch truly fixes the defect. The gap is known as overfitting: a patch may pass the tests and still not align with what the developer intended.

Tools that assess patch correctness were proposed to tackle that problem. The paper says the field has moved toward AI judges for the job. They are increasingly used as a de facto assessment layer in agentic repair pipelines, it says. There, a separate model checks each candidate patch before it is accepted.

The Test and What It Found

The authors built a set of 326 patches for 163 bugs from Defects4J, a benchmark of Java bugs. Half the patches were correct and half were overfitting, by labels an earlier study set through manual inspection. They then asked two models to judge each one. The paper calls them a widely used closed-source model and a widely used open-source model.

In the paper's sanitized setting, the prompt held only the buggy code and the patch. There, the closed-source model reached an accuracy of 77.3%. The open-source model reached 80.4%. The difference in overall accuracy is not statistically significant, the paper says.

The false positive rate is the share of overfitting patches that a judge labeled correct. For judging patches, the paper calls it the primary safety-critical metric. Each false positive accepts an overfitting patch as correct. That rate was 17.2% for the closed-source model and 22.1% for the open-source one.

A judge's confidence gave only a limited triage signal, the paper says. False acceptances from both models still occurred among high-confidence answers. So confidence cannot exempt high-confidence accepted patches from verification.

Contrary to the authors' initial hypothesis, telling the models that all tests had passed did not significantly bias either of them. Giving them the developer's own fix did raise their accuracy. That is legitimate when such a fix is genuinely available, the paper says. But an accuracy figure measured that way reflects pattern-matching against a known answer, it says. It does not show the judge's own reasoning about the code.

The Judges' Explanations

Each judge was also asked for an explanation of two to four sentences. Three of the authors read 60 explanations from the closed-source model. They took 15 from each of four outcomes: correct and wrong acceptances, and correct and wrong rejections.

Their consensus found no failures in the 30 sampled explanations behind correct verdicts. The paper says that does not mean every such explanation is reliable. Among the wrong acceptances, 93.3% of the sampled explanations held at least one failure. Those failures were primarily driven by hallucinated evidence and missed edge cases, the paper says. Missed edge cases are inputs on which the patch and the correct fix diverge.

A reviewer reading such an explanation meets "a plausible, well-structured argument" that an overfitting patch is correct. Without independently checking the code reasoning, the paper says, the reviewer has no reliable signal to tell a trustworthy explanation from a hallucinated one.

This part covers one model, in one setting. The three annotators agreed only at a low-to-fair level. The authors treat it as "an exploratory audit of explanation risks" rather than a definitive estimate. If domain experts disagree, they add, practitioners with less domain expertise are unlikely to detect such failures.

Recommendations and Limits

The paper's recommendations are written for researchers in automated program repair who use such judges. It says the judge should rank and filter candidates for human review, not replace manual correctness assessment. It asks for the false positive rate to be reported alongside accuracy, with the full error profile. And it says explanations should be treated as starting points for further investigation, not as self-contained justifications.

The study has its own bounds, the authors say. Its patches come from one Java benchmark covering five Apache projects. The two models were chosen to contrast closed-source and open-source models. The model-dependent effects it saw should not be generalized to all models.

The paper does not argue against an AI checking code. It argues against stopping there. A verdict that arrives with its reasons still needs someone who checks the reasons.

When a judge says yes, who reads why?