CuraLoc:基于规划代码检查的仓库级故障定位
CuraLoc: Repository-Level Fault Localization via Planned Code Inspection
AI总结:
本研究提出 CuraLoc 方法,通过规划代码检查替代迭代模型控制导航,在 SWE-Bench 数据集上提升了仓库级故障定位的 Func@1、Func@5 准确率,同时大幅降低 token 消耗,且支持多种模型主干。
摘要:
缺陷报告描述了出现的问题,但很少说明应修改的代码位置。现有的仓库级故障定位方法通常让语言模型迭代决定接下来要检查的代码,这需要多次模型调用和大量的 token 消耗。本研究探讨是否可以在检索源代码之前规划这些检查决策。我们提出了 CuraLoc,它首先选择候选文件,并使用紧凑的行为和结构描述表示其符号。在一次规划决策中,模型会联合选择起始符号、选择要从每个符号中检查的代码关系,并形成关于可能编辑的假设。确定性检索会收集请求的源代码,以基于这些假设进行最终排名,将模型推理集中在选择和比较代码上,而非指导每个检索步骤。我们在 SWE-Bench Lite 和 Verified 数据集上验证了所提方法的有效性。在使用 GPT-5.2 的 SWE Bench Verified 上,CuraLoc 将 Func@1 从 LocAgent 的 53.8% 提升至 59.3%,同时减少了 90.3% 的记录 token,且在 Func@1 上也优于 RepoSearcher(56.2%)和 Agentless(39.6%)。在 SWE-bench Lite 上,CuraLoc 达到了 83.8% 的高 Func@5 准确率,相对 Agentless 的准确率提升超过 15%。此外,CuraLoc 支持不同的模型主干,使用 GPT-5.2 和 GPT-6 Astra 均展现出强大的定位准确率。这些结果证明,仓库级代码检查可以在无需迭代模型控制导航的情况下有效规划。
英文摘要:
A bug report describes what went wrong, but rarely where the code should change. Existing repository-level localization methods often let language models iteratively decide what code to inspect next, requiring repeated model calls and substantial token usage. We investigate whether these inspection decisions can instead be planned before source retrieval. In this research, we introduce CuraLoc, which first selects candidate files and represents their symbols using compact behavioral and structural descriptions. In a single planning decision, the model jointly selects starting symbols, chooses code relationships to inspect from each, and forms hypotheses about likely edits. Deterministic retrieval collects the requested source for a final ranking informed by those hypotheses, concentrating model reasoning on choosing and comparing code rather than directing each retrieval step. We demonstrate the efficacy of our proposed approach on the SWE-Bench Lite and Verified datasets. On SWE Bench Verified with GPT-5.2, CuraLoc raises Func@1 from LocAgent's 53.8% to 59.3% while using 90.3% fewer recorded tokens, and also outperforms RepoSearcher (56.2%) and Agentless (39.6%) on Func@1. On SWE-bench Lite, CuraLoc achieves a high 83.8% Func@5 accuracy improving on Agentless by more than 15% in relative accuracy. Additionally, CuraLoc supports different model backbones, with strong localization accuracy demonstrated using both GPT-5.2 and GPT-6 Astra. These results provide evidence that repository-level code inspection can be planned effectively without iterative model-controlled navigation.
机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。