← Latest papers
🤖 AI

Are LLMs Reliable Code Reviewers? Systematic Overcorrection in Requirement Conformance Judgement

This paper reveals that large language models systematically overcorrect by misclassifying correct code as non-compliant with natural language requirements, a flaw exacerbated by detailed prompting, and proposes a fix-guided verification filter to mitigate these reliability issues in automated code review.

Original authors: Haolin Jin, Huaming Chen

Published 2026-03-03
📖 5 min read🧠 Deep dive

Original authors: Haolin Jin, Huaming Chen

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 have hired a very smart, well-read, but slightly paranoid AI Assistant to help you review your code. You give it a recipe (the requirements) and a dish (the code), and ask, "Does this dish match the recipe?"

You expect the AI to be a fair judge. But this paper reveals a shocking truth: The AI is actually a "False Alarm Machine." It is so eager to find mistakes that it frequently rejects perfectly good dishes, claiming they are burnt or undercooked when they are actually delicious.

Here is the breakdown of the paper using simple analogies:

1. The Problem: The "Paranoid Chef"

The researchers tested several top-tier AI models (like GPT-4o, Claude, and others) on a massive set of coding tasks. They gave the AI two types of code:

  • The Perfect Dish: Code that works exactly as the recipe says.
  • The Burnt Dish: Code that has obvious bugs.

The Result: The AI was surprisingly bad at distinguishing the two.

  • The Big Mistake: The AI frequently said "NO" to the Perfect Dish. It rejected correct code, inventing reasons why it didn't work. This is called Over-Correction.
  • The Surprise: The researchers thought that if they asked the AI to "explain its reasoning" or "suggest a fix," it would get smarter. Instead, it got worse. The more detailed the instructions, the more paranoid the AI became. It started hallucinating problems that didn't exist, like claiming a cake was too sweet because the recipe didn't explicitly say "add sugar."

2. Why Does This Happen? (The "Imaginary Rules")

The paper found that when the AI rejects a correct piece of code, it usually makes up one of four types of fake problems:

  1. The "Ghost Constraint": The AI invents a rule that wasn't in the recipe (e.g., "The recipe didn't say to use a metal spoon, so this wooden spoon is wrong").
  2. The "Edge Case" Obsession: The AI worries about scenarios that will never happen (e.g., "What if the user types a negative number? The recipe didn't say to handle that!").
  3. The "Logic" Confusion: The AI claims the math is wrong without actually doing the math.
  4. The "Boundary" Blunder: It gets confused about simple things like whether a number should be "less than" or "less than or equal to."

The Analogy: Imagine a security guard at a club who is so strict that he denies entry to people with valid tickets because they are wearing the "wrong shade of blue" or because they didn't bring a specific type of ID that the bouncer imagined was required.

3. The "Explanation Trap"

Common sense suggests that if you ask someone to explain why they made a decision, they will think harder and be more accurate.

  • The Reality: For these AI models, asking for an explanation is like asking a nervous student to justify their answer on a test. They start over-thinking, inventing complex reasons to support their initial (wrong) gut feeling.
  • The Contradiction: Sometimes, the AI says "NO" (reject the code), but its written explanation actually says, "This code looks fine, but I'm rejecting it anyway." The AI is lying to itself to sound authoritative.

4. The Solution: The "Taste Test" Filter

Since the AI is bad at talking about the code, the researchers proposed a solution that stops the AI from just guessing and forces it to prove it.

They created a "Fix-Guided Verification Filter." Here is how it works:

  1. The AI Rejects: The AI says, "This code is bad," and suggests a "fix" (a patch).
  2. The Reality Check: Instead of trusting the AI's words, the system takes the Original Code and the AI's Fix and runs them through a real computer test (like a taste test).
  3. The Verdict:
    • If the Original Code passes the test, but the AI's Fix breaks it (or does the exact same thing), the system knows the AI was wrong. It ignores the AI and says, "Actually, the code is fine."
    • If the Original Code fails and the Fix passes, then the AI was right.

The Analogy: Imagine a food critic who says, "This soup is too salty." Instead of taking his word for it, you hand him a spoon. If he can't prove it's salty by tasting it, or if his "fix" (adding water) ruins the soup, you ignore his review. You let the actual taste (the test results) be the final judge.

5. The Takeaway

  • Don't trust the AI's opinion blindly: Even the smartest AI models are prone to "paranoia" when reviewing code without running tests.
  • More words \neq Better answers: Asking for long explanations often makes the AI more confident in its mistakes.
  • Run the code: The only way to be sure is to actually run the code (or the AI's proposed fix) to see if it works.

In short: The AI is a great "idea generator," but a terrible "final judge." To use it safely, we need to treat its suggestions as hypotheses that must be proven by running the code, not just by reading its confident explanations.

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 →