Enhancing Agentic Code Localization with Traceability Recovered from Repository Evolution
作者: Yiming Liu, Binhang Qi, Weiyu Kong, Jiawei Liu, Xinxin Shan, Saijun Gao, Yun Lin
摘要
While agentic frameworks have advanced repository-level code localization, their reliance on static snapshots often leads to a $\textit{traceability gap}$—the loss of implicit links between issue symptoms and code implementation. To bridge this information deficit, we introduce $\textbf{T}$raceability $\textbf{A}$ugmented $\textbf{Co}$de Localization (TACO), a framework that recovers retrievable and usable traceability from repository evolution to guide localization agents. TACO offline crystallizes historical pull requests into a dual-index knowledge base through a prompt auto-tuning technique, capturing high-value semantic hints and architectural rationales. In the online phase, TACO employs a synergistic dual-track retrieval workflow, cross-validated by an arbiter and aligned temporally to handle version drift. Extensive evaluations on SWE-bench Lite and SWE-bench Verified across five state-of-the-art agentic baselines demonstrate that TACO significantly improves exact-match localization accuracy (Acc@1) by an average of 11.29\%, 13.20\%, and 12.87\% at the file, module, and function levels, respectively. Moreover, TACO significantly streamlines the exploration process, achieving an average reduction of 29.2\% in token usage and 30.4\% in monetary costs, with minimal offline maintenance overhead.