CuraLoc Pinpoints Code Bugs 59.3% More Accurately Than Rivals While Using 10x Fewer Tokens

A team of researchers has unveiled CuraLoc, a system that pinpoints the exact function or class to fix in a large codebase based on a bug description. Previously, language models had to "wander" through code step by step — opening a file, inspecting it, deciding where to go next, and repeating this dozens of times — a slow, expensive process. CuraLoc replaces that with a single, carefully devised plan. The system first narrows down candidate files, then uses short function summaries (without the actual code) to decide which symbols to start from and which relationships to check — callers, callees, overrides. Only after that does it load the actual code snippets, and in a final step the model ranks the candidate locations for the fix. On the SWE-bench Verified benchmark with GPT-5.2, accuracy at pinpointing the exact bug location rose from 53.8% (LocAgent) to 59.3%, while token usage dropped by 90.3%. • On SWE-bench Lite, top-5 prediction accuracy reached 83.8%, versus 78.3% for rival RepoSearcher • CuraLoc also beat Agentless (39.6%) and RepoSearcher (56.2%) on top-1 accuracy • The method works with both GPT-5.2 and the newer GPT-6 Astra

AI-processed from arXiv cs.LG; edited by Hamidun News
CuraLoc Pinpoints Code Bugs 59.3% More Accurately Than Rivals While Using 10x Fewer Tokens
Source: arXiv cs.LG. Collage: Hamidun News.
Listen to article
Article Fact Sheet & Key Figures
ParameterDetails
Primary sourcearXiv cs.LG ↗
Editor-in-Chief
Key metric #1On SWE-bench Lite, top-5 prediction accuracy reached 83.8%, versus 78.3% for rival RepoSearcher
Key metric #2CuraLoc also beat Agentless (39.6%) and RepoSearcher (56.2%) on top-1 accuracy
Key metric #3The method works with both GPT-5.2 and the newer GPT-6 Astra

When a bug report lands, the hard part isn't fixing it — it's finding it

When a bug report comes in, the first challenge isn't fixing the error — it's figuring out exactly where in the codebase it's hiding. A bug report describes a symptom ("entering X produces an incorrect Y") but doesn't name the file or function that needs to change. The authors of a new paper propose a way to automatically locate these spots more accurately and more cheaply than existing tools manage.

Why older approaches were expensive

Most bug-localization systems work like agents: the model looks at the code, decides where to "go" next — to the calling function, the parent class, a neighboring method — and gradually narrows down the list of suspects. This is flexible, but each step is a separate query to the model, meaning dozens of calls and a huge token bill for a single task.

CuraLoc tests a different idea: what if you planned the entire code-inspection route up front, in one decision, instead of re-deciding at every step?

How CuraLoc works

The system operates in three stages, digging deeper into the code at each one:

  • File selection. The model examines the repository structure and, from three different angles — who owns the logic, who executes it, who verifies it — proposes a shortlist of candidate files, capped at 15.
  • Symbol and action selection. From the shortlisted files, the model receives not the actual code but compact descriptions of functions and classes: signature, structural role, and a brief behavioral summary (drawn from documentation or generated by a smaller helper model). Based on this, the model makes a single decision about which functions to start examining, which relationship to check for each one (calls, inheritance, overrides), and forms hypotheses about where the fix might be.
  • Code retrieval and ranking. Only now does the system automatically — without the model's involvement — load the actual source code for the relevant snippets, and in a final query the model ranks up to ten candidate fix locations using both the code and its earlier hypotheses.

The key savings come from the model deciding "what to inspect" once, compactly, rather than piecemeal after each new chunk of code.

What the tests showed

The method was tested on two sets of real-world bugs from open-source projects — SWE-bench Lite (274 tasks) and SWE-bench Verified (454 tasks) — benchmarked against three existing methods (LocAgent, RepoSearcher, and Agentless) using GPT-5.2.

  • On SWE-bench Verified, exact-location accuracy (the Func@1 metric) rose from 53.8% for LocAgent to 59.3% for CuraLoc, while token consumption dropped by 90.3%.
  • CuraLoc also outperformed RepoSearcher (56.2%) and Agentless (39.6%) on the same metric.
  • On SWE-bench Lite, CuraLoc achieved 83.8% top-5 prediction accuracy, a 15% relative improvement over Agentless.
  • The method was also tested on the newer GPT-6 Astra model, with results remaining consistently strong — showing the approach isn't tied to a single specific model.

The authors also separately examined what drives the accuracy gains. It turns out that simply finding the right files isn't the key factor: even when the system correctly identified the right files, if the symbols inside them were ranked in arbitrary order rather than by relevance to the bug, accuracy dropped from 67.2% to 42.3%. This suggests CuraLoc's main advantage lies in meaningfully selecting which code relationships to check, not in casting a wider net over files.

What this means in practice

For teams working on automated code repair or building AI coding agents, CuraLoc offers a working alternative to expensive step-by-step agents: dozens of iterative queries can be replaced with a single well-planned inspection route, achieving equal or better accuracy at a fraction of the token cost. That matters especially for companies looking to embed automatic bug-finding into CI/CD pipelines, where the cost and speed of every query is critical.

Story

Key Questions Answered

When a bug report lands, the hard part isn't fixing it — it's finding it?

When a bug report comes in, the first challenge isn't fixing the error — it's figuring out exactly where in the codebase it's hiding. A bug report describes a symptom ("entering X produces an incorrect Y") but doesn't name the file or function that needs to change. The authors of a new paper propose a way to automatically locate these spots more accurately and more cheaply than existing tools manage.

Why older approaches were expensive?

Most bug-localization systems work like agents: the model looks at the code, decides where to "go" next — to the calling function, the parent class, a neighboring method — and gradually narrows down the list of suspects. This is flexible, but each step is a separate query to the model, meaning dozens of calls and a huge token bill for a single task. CuraLoc tests a different idea: what if you planned the entire code-inspection route up front, in one decision, instead of re-deciding at every step?

How CuraLoc works?

The system operates in three stages, digging deeper into the code at each one: File selection. The model examines the repository structure and, from three different angles — who owns the logic, who executes it, who verifies it — proposes a shortlist of candidate files, capped at 15. Symbol and action selection. From the shortlisted files, the model receives not the actual code but compact descriptions of functions and classes: signature, structural role, and a brief behavioral summary (drawn from documentation or generated by a smaller helper model). Based on this, the mode

ZK
Zhemal Khamidun — CPO at Alpina Digital, product manager of AlpinaGPT. Building AI products since 2019. Hamidun News is a pet project that grew into a production aggregator with 6,000+ readers.
✦ Hands-On AI Engineering · Hamidun Academy

Build & Ship Production AI Agents Without Boilerplate Code

Start your free 72-hour trial at Hamidun Academy (academy.hamidun.com) — interactive lessons on Claude Code & Cursor, live Tech Radar, and production agent templates.

Start 72h Free Trial →Vibe-Coding Intensive
What do you think?
Loading comments…