← Latest papers
💻 computer science

HEJ-Robust: A Robustness Benchmark for LLM-Based Automated Program Repair

This paper introduces HEJ-Robust, a new benchmark utilizing semantics-preserving code transformations to reveal that current LLM-based automated program repair models suffer a significant performance drop of over 50% when faced with minor syntactic variations, highlighting a critical lack of robustness in existing approaches.

Original authors: Fazle Rabbi, Jinqiu Yang

Published 2026-05-06
📖 4 min read☕ Coffee break read

Original authors: Fazle Rabbi, Jinqiu Yang

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 a very talented mechanic who has been trained to fix a specific type of broken toy car. This mechanic is an AI (a Large Language Model) that has studied thousands of examples of broken cars and how to fix them. In the past, researchers tested this mechanic by showing them the exact same broken car every time. The mechanic did a great job, fixing the car 100% of the time.

But here's the catch: in the real world, people don't always describe broken cars in the exact same way. Sometimes they say "the left wheel is off" instead of "the front-left wheel is off." Sometimes they put the engine in a slightly different spot but it still works the same.

The Problem: The "Perfect" Test vs. Real Life
The authors of this paper, Fazle Rabbi and Jinqiu Yang, realized that the tests used to train and grade these AI mechanics were too rigid. They were like a driving test where you only ever had to turn left at a specific red light. If you changed the light to green, or asked you to turn right, the AI might get confused, even though the driving skill is the same.

The paper argues that while these AI repair tools are great at fixing bugs when the code looks exactly like they've seen before, they are surprisingly fragile. If you make tiny, harmless changes to the code (like renaming a variable from x to count), the AI often fails completely.

The Solution: HEJ-Robust (The "Stress Test")
To prove this, the authors built a new testing ground called HEJ-Robust. Think of this as a "stress test" for the AI mechanics.

They took 164 broken Java programs (the "toys") and applied eight different types of harmless transformations to each one. These transformations are like changing the color of the car or rearranging the seats—everything works exactly the same, but it looks different. The eight changes included:

  1. Renaming things: Calling a variable temp instead of count.
  2. Changing structure: Switching a for loop to a while loop (like driving in a circle vs. driving in a square).
  3. Adding noise: Inserting a harmless log message (like a mechanic writing a note on the dashboard).
  4. Rearranging: Swapping the order of conditions (like saying "If it's raining AND I have an umbrella" vs. "If I have an umbrella AND it's raining").

They created 1,450 new versions of these broken programs to test the AI on.

The Results: The AI Crumbles
The authors tested five different AI models on this new stress test. The results were shocking.

  • The Drop: When the code was slightly renamed or restructured, the AI's success rate dropped by over 50%.
  • The Analogy: It's as if the mechanic could fix a car perfectly when the steering wheel was on the left, but if you moved the steering wheel to the right (even though the car still drives the same), the mechanic forgot how to fix it entirely.
  • Size Doesn't Matter: Bigger, more powerful AI models didn't do any better. In fact, sometimes the "smartest" models failed more often than the smaller ones when the code looked slightly different.
  • The Wrong Metric: The paper also found that standard "grammar checkers" (metrics like CodeBLEU) didn't notice the AI was failing. The AI was writing code that looked similar to the correct answer, but it didn't actually work. It's like a student writing an essay that looks perfect but says the wrong thing; the grammar is fine, but the logic is broken.

The Takeaway
The paper concludes that current AI tools for fixing code are not robust. They are like students who memorized the answers to a specific test but don't actually understand the subject. If you change the wording of the question slightly, they fail.

The authors released their new benchmark (HEJ-Robust) so other researchers can use it to build AI mechanics that are truly flexible and can handle the messy, varied reality of real-world software, rather than just passing rigid, perfect tests.

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 →