FaultLoc: Evaluating Coding Agents For Fault Localization

Jianhong Tu, Shubham Gaur, Rathik Murtinty, Zhun Wang, Tianneng Shi, Dawn Song, Chenguang WangAIWILD @ ICML 2026

TL;DR

Current AI coding agents are surprisingly good at "patching" bugs, but are they actually reasoning about the code or just slapping on digital bandages? FAULTLOC is a new benchmark of 900 real-world vulnerabilities that shifts the goalpost from merely fixing a crash to accurately identifying the root cause. The results are a wake-up call: even the most advanced models struggle to pinpoint the source of a bug, often confusing symptoms with causes.

What Problem Does This Paper Address?

In the world of automated software engineering, we’ve been grading AI agents on their ability to pass tests. If an agent generates a patch and the code stops crashing, we call it a success. However, the authors of FAULTLOC argue this is a flawed metric.

An agent can "fix" a vulnerability by adding a narrow guardrail at the crash site—essentially suppressing the symptom—without ever finding the underlying logic error. This leaves the system vulnerable to other inputs that trigger the same root cause. To determine if an LLM truly "understands" a codebase, we need to evaluate its fault localization capabilities: can it find the specific lines of code responsible for the defect?

Methods

The researchers developed a rigorous pipeline to transform messy, real-world bug reports into a clean evaluation dataset.

  1. Preliminary Verification: They pulled over 6,000 vulnerabilities from the ARVO database (sourced from OSS-Fuzz) and verified that they could reproduce the crashes using provided Proof-of-Concept (PoC) inputs.
  2. Agent-Assisted Patch Cleaning: Real-world developer patches are often "noisy," containing irrelevant comments or unrelated refactors. The authors used LLMs to "clean" these patches, distilling them down to the minimal code changes required to fix the root cause. These cleaned patches serve as the "ground truth."
  3. Evaluation Framework: Agents are given a vulnerable codebase, a sanitizer report (like a stack trace from AddressSanitizer), and the PoC input. They must output specific "line spans" (e.g., file.c: lines 10-15) where the logic is flawed.
  4. Hierarchical Scoring: Performance is measured at three levels: File (did you find the right file?), Hunk (did you find the right block of code?), and Line (how precise were you?).

Datasets

The paper introduces the FAULTLOC benchmark, which consists of:

  • 900 high-quality instances across 124 popular open-source projects.
  • Focuses on C/C++ memory-safety vulnerabilities (buffer overflows, use-after-free, etc.).
  • Includes verified PoCs, sanitizer reports, and human-authored (but agent-cleaned) ground-truth fixes.

Unlike previous benchmarks that were limited to single-file bugs, FAULTLOC includes complex cases where the fix spans multiple files or multiple regions within a file.

Key Insights and Ideas

  • The "Symptom vs. Cause" Trap: Agents frequently identify the "crash site" (where the program finally dies) as the root cause, rather than tracing the execution backward to where the data first became corrupted.
  • Size Isn't Everything: In a surprising twist, the 27-billion parameter Qwen3.5-27B outperformed the 1-trillion parameter Kimi K2.5. This suggests that for specialized tasks like code reasoning, "agentic training" and domain knowledge are more important than raw parameter count.
  • Sanitizers are High-Signal, PoCs are Distractors: Ablation studies showed that removing the sanitizer report (the stack trace) tanked performance. Interestingly, for some models, removing the PoC input actually improved scores, suggesting that the raw binary input can sometimes confuse the agent rather than help it.
  • Multi-site Fixes are the Final Boss: Models are significantly worse at localizing bugs that require changes in multiple places. GPT-5.3-Codex’s "Hunk Recall" dropped from 55.8% on single-site bugs to just 24.3% on multi-site ones.

Key Results

The evaluation of 8 frontier models revealed a significant gap between AI and human developers:

  • Top Performer: GPT-5.3-Codex led the pack with a Line F1 score of 24.90. While it had the best recall (finding the right spots), it was less precise than other models.
  • Precision King: Claude Sonnet 4.6 achieved the highest Line Precision (29.57), meaning when it did point to a line, it was more likely to be exactly what the developer changed.
  • The Localization Gap: There is a "sharp drop" in performance as you move from file-level to line-level accuracy. Most agents can find the right file (~74% for GPT-5.3), but they struggle to zero in on the exact buggy lines.

Limitations and Future Work

The authors acknowledge several constraints:

  • Language Scope: The current benchmark is limited to C/C++, which is prone to memory-safety issues. Future versions should include managed languages like Python or Java to test logic-heavy bugs.
  • The "Unique Fix" Assumption: The benchmark evaluates agents against a specific developer patch. However, in programming, there is often more than one "correct" way to fix a bug. An agent might find a valid root cause that differs from the developer's approach and get penalized for it.
  • Agent Harnesses: The choice of "harness" (the tools and environment provided to the agent) significantly impacts performance, suggesting that the "UI" for AI agents is just as important as the model itself.

In conclusion, FAULTLOC proves that while AI can "fix" code, it still lacks the deep causal reasoning required to truly understand why code fails. For researchers, this benchmark provides a new, harder target for the next generation of autonomous coding agents.

Summary updated

BibTeX
@inproceedings{tu2026faultloc,
  author = {Jianhong Tu and Shubham Gaur and Rathik Murtinty and Zhun Wang and Tianneng Shi and Dawn Song and Chenguang Wang},
  title = {{FaultLoc: Evaluating Coding Agents For Fault Localization}},
  booktitle = {AIWILD @ ICML},
  year = {2026},
  url = {https://openreview.net/forum?id=3q6yWfaQ8R},
}
Figure