What File-Level Hits Hide in Bug Localization: Paths, Functions, and Repair
Chen et al. in Language
A file hit can't tell you which clue won
What File-Level Hits Hide in Bug Localization: Paths, Functions, and Repair
What does a file hit actually measure?

Fractional Recall@1 credits a reference-changed top file, not why it won. Panel a fixes report, BM25 top-100 pool, 50-line preview and reranker; panel b shows both path replacements lower recall on 259 base-commit Lite issues.
Similar familiar-path scores hide a split
Matched Qwen2.5-14B recipes scored 57.00% Recall@1 with 50-line code previews and 55.67% without on single-snapshot Lite (300 issues).
With PathSwap on the same fixed BM25 top-100 pool, Recall@1 was 39.67% with previews and 0.33% without, a +39.33-point difference.
Near-equal original-path scores concealed different sensitivity to names.
Full-file access gave no single verdict
On 193 SWE-bench Lite issues, Agentless (GPT-4o) had 135/193 first-file hits; gpt-6.1-sol had 188/193.
Agentless fell to 0/193 while gpt-6.1-sol stayed at 188/193. These are system comparisons, not a tools-on/off ablation.
Opening source files did not guarantee path invariance.
A file hit often stops before the function

Across four Qwen2.5 rerankers on 1,113 GREPO issues, own scorers yielded top-one changed-function hits for only 45.0% of file wins; over nine in ten misses had an eligible target in the top-10 file pool.
Function Hit@1 depends on its scorer
On 598 GREPO wins from the matched path-only file-ranking snapshot, an unadapted pointwise Qwen2.5-7B-Instruct scorer hit 162 changed functions (27.09%); prompts showed no bodies.
On the same wins, masking only the explicit candidate-name field yielded 48/598 top-one hits (8.03%); file-summary names remained visible.
Function Hit@1 depends on the scorer and its inputs.
The study links three separate checkpoints

Three separate populations: fixed-pool path tests on SWE-bench Lite, GREPO function scoring from top-10 predicted files, and Lite repair with either a whole file or one supplied function. Arrows show workflow, not causality.
Editing scope changes what localization tells us
In 184 Qwen3-14B whole-file attempts, 18/67 passed when the localized function matched the reference change versus 15/117 otherwise (+14.0 pp; issue-clustered 95% CI −1.2 to +29.7).
With Qwen3-14B restricted to its supplied function, 23/90 attempts passed with correct localization versus 1/176 otherwise (+25.0 pp; issue-clustered 95% CI +13.6 to +37.3).
Empty and untested patches count as unresolved; these separate observational cohorts do not establish a causal effect of edit scope.
Boundaries to keep in view
Alias versus opaque
On base-commit Lite, both path replacements lower Recall@1, but their relative effect remains unresolved.
Repair evidence
Supplied-location repairs use archived pre-index-fix rankings; the whole-file and function-only cohorts are observational.
Evaluation scope
Lite is issue-ID held out within 12 repositories, not repository-held out; 384 of 500 Verified issues overlap training.
Why it matters
- A top-ranked changed file is a useful lead, not proof that the model used code or found the edit site.
- Pair familiar-path scores with path perturbations, scorer-specific function Hit@1, and repair results under the intended edit interface.
- Open question: can path-robust localization improve passing-test rates in a controlled same-issue study with a capable fixer?
10 slides, 3 min
4 days ago