ComBench: A Repo-level Real-world Benchmark for Compilation Error Repair
This paper introduces ComBench, the first repository-level real-world benchmark for C/C++ compilation error repair, which leverages a novel automated framework to mine and verify GitHub CI failures, revealing significant gaps between the syntactic and semantic correctness of current LLM-based repair techniques.
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 chef trying to cook a massive, complex banquet for thousands of people. You have a recipe (the code), but every time you try to start the stove (compile the code), the kitchen explodes with smoke and fire alarms (compilation errors).
In the world of software, these "kitchen explosions" are Compilation Errors. They stop the entire process, forcing developers to stop cooking and spend hours figuring out why the stove won't light.
For a long time, researchers have been trying to build AI Chefs (Large Language Models) that can automatically fix these errors. But there was a big problem: the tests they used to train and check these AI chefs were like practice drills in a tiny, empty kitchen.
The Problem: The "Toy Kitchen" Benchmark
Imagine you are training a chef to fix a broken oven in a 50-story skyscraper. But instead of sending them to the skyscraper, you give them a broken toaster in a toy kitchen.
- The Old Way: Researchers gave AI models tiny, isolated snippets of code (like a single line of a recipe) and asked them to fix it.
- The Reality: Real software is a giant skyscraper. An error in the basement (one file) might be caused by a broken pipe in the penthouse (another file). The old tests ignored the whole building, so the AI chefs learned to fix toasters but failed miserably when faced with skyscrapers.
The Solution: ComBench (The "Real Skyscraper" Simulator)
The authors of this paper built ComBench. Think of this as a massive, realistic simulation of a real-world construction site where the AI chefs can practice fixing actual, messy, real-world errors.
Here is how they built it, using simple analogies:
1. Mining the "Black Box" (Data Collection)
Instead of making up fake errors, the team went to GitHub (a giant library of software projects) and looked at the security camera footage of the construction sites (CI/CD logs).
- They found thousands of times when real developers tried to build software and it failed.
- They didn't just grab the error message; they grabbed the entire context: the blueprints, the tools used, and the specific weather conditions (the server environment) at that exact moment.
2. Finding the "Magic Fix" (Ground Truth)
When a building collapses, you need to know exactly how the engineers fixed it.
- The team used a sophisticated "time-travel" algorithm to find the exact moment a developer fixed a broken build.
- They didn't just take the whole commit (which might include adding a new window or painting a wall); they used a "surgical scalpel" to extract only the tiny patch that stopped the fire. This ensures the AI learns the exact fix, not just a random change.
3. Recreating the "Ghost Kitchen" (Reproducibility)
This is the hardest part. Sometimes, a kitchen only explodes because of a specific brand of gas or a weird setting on the stove.
- The team built a time-machine Docker container. They recreated the exact virtual environment where the error happened 6 months ago.
- They verified that:
- The error happens again (Fail).
- The AI applies the fix.
- The building stands tall and works perfectly (Pass).
What They Discovered (The Taste Test)
Once they had this realistic simulator, they tested 12 different AI chefs (like GPT-5, Claude, and others) to see how good they were at fixing real-world errors.
Here are the surprising results, translated into everyday terms:
The "Looks Good, Tastes Bad" Gap:
The AI chefs were great at making the smoke stop. 73% of the time, they could make the code compile (the stove didn't explode).- But, only 41% of the time did the food actually taste right (Semantic Correctness).
- Analogy: The AI might fix the broken stove by unplugging the refrigerator. The kitchen is quiet now (no error), but you have no food to cook. The code works, but the program is broken.
Size Matters, But Not Forever:
Bigger AI models generally did better, but after a certain point, making them bigger didn't help much. They hit a "ceiling" because the problem wasn't just about knowing more facts; it was about understanding how the whole building connects.The "Agent" vs. The "Solo Chef":
- Solo Chef (Direct Repair): You give the AI the error and the file. It guesses the fix.
- Agent Chef (Iterative): You give the AI a toolbox. It can walk around the building, check other rooms, ask questions, and try different tools until it finds the fix.
- Result: The "Agent" approach was much better for the smartest models. It's like giving a detective a magnifying glass and a map, rather than just asking them to guess the culprit.
The "Hard Cases":
Even the smartest AI (GPT-5) couldn't fix about 30% of the errors. These were usually "cross-file" mysteries where the solution required understanding deep, hidden rules of the specific project that the AI didn't know.
Why This Matters
Before ComBench, we were testing AI on toy problems and thinking they were ready for the real world. This paper says, "Stop! Let's test them in the real skyscraper."
It shows us that while AI is getting very good at fixing syntax (the grammar of code), it still struggles with semantics (the meaning and logic of the code). It's like an AI that can fix a typo in a novel but doesn't understand the plot.
In short: ComBench is the new, realistic driving test for AI code-fixers. It proves that while our AI drivers are getting better at steering, they still need to learn how to navigate the complex traffic of real-world software projects.
Drowning in papers in your field?
Get daily digests of the most novel papers matching your research keywords — with technical summaries, in your language.