Loc2Repair reveals file-level localization lifts LLM repair success to 52.4%
Pinpointing the right file before patching boosts automated bug-fixing accuracy by up to 8 points.
Researchers Mohammad Nour Al Awad and Sergey Ivanov present Loc2Repair, a modular evaluation framework that separates file-level issue localization from repository-grounded LLM repair. Unlike end-to-end benchmarks that conflate failures, Loc2Repair uses a shared runtime, artifact schema, and evaluation harness to independently test localization and repair components. On SWE-bench Verified with three repair backbones, they compared baseline repair (no explicit localization) against repair guided by two predicted localizers and by gold (ground-truth) modified-file sets.
Results show consistent improvement: pooled repair success jumps from 44.7% (baseline) to 48.9% and 49.1% with predicted localization, and to 52.4% with gold localization. Mean elapsed time also decreases by 100.94s and 52.25s for predicted settings, and by 154.45s with gold guidance. Token effects vary across models, but the overall trend confirms file-level localization as a reliable lever for repair efficiency and accuracy. The framework exposes that even perfect localization leaves room for improvement, highlighting the need for better patch synthesis and iterative debugging. Loc2Repair provides a standardized testbed for future research into each pipeline stage.
- Explicit file localization improves LLM repair resolved rates from 44.7% to 48.9–49.1% (predicted) and 52.4% (gold) on SWE-bench Verified across three backbones.
- Average repair latency drops by 100–154 seconds when localization is used, though token cost varies by model.
- Loc2Repair decouples localization and repair under a shared harness, enabling controlled, apples-to-apples comparisons of each pipeline stage.
Why It Matters
Explicit file localization is a proven, measurable lever for improving both the speed and accuracy of LLM-based code repair.