Improving Code Localization with Repository Memory

Boshi Wang, Weijian Xu, Yunsheng Li, Mei Gao, Yujia Xie +2 more
10/1/2025
cs.SEcs.CL

No confident code implementation found for this paper. 2 possible matches can be shown below.

Abstract

Code localization is a fundamental challenge in repository-level software engineering tasks such as bug fixing. While existing methods equip language agents with comprehensive tools/interfaces to fetch information from the repository, they overlook the critical aspect of memory, where each instance is typically handled from scratch assuming no prior repository knowledge. In contrast, human developers naturally build long-term repository memory, such as the functionality of key modules and associations between various bug types and their likely fix locations. In this work, we augment language agents with such memory by leveraging a repository's commit history -- a rich yet underutilized resource that chronicles the codebase's evolution. We introduce tools that allow the agent to retrieve from a non-parametric memory encompassing recent historical commits and linked issues, as well as functionality summaries of actively evolving parts of the codebase identified via commit patterns. We demonstrate that augmenting such a memory can significantly improve LocAgent, a state-of-the-art localization framework, on both SWE-bench-verified and the more recent SWE-bench-live benchmarks. Our research contributes towards developing agents that can accumulate and leverage past experience for long-horizon tasks, more closely emulating the expertise of human developers.

View on arXivView PDF

Code Implementations

No confident code match yet

We couldn't find an author-owned or strongly-evidenced community implementation for this paper. 2 weaker matches are hidden by default — verify before relying on them.

No code implementations found yet.

Know of an implementation? Let us know in the comments below!

Similar Papers

Cite this paper

@article{wang2025improving,
  title  = {Improving Code Localization with Repository Memory},
  author = {Boshi Wang and Weijian Xu and Yunsheng Li and Mei Gao and Yujia Xie and Huan Sun and Dongdong Chen},
  year   = {2025},
  eprint = {2510.01003},
  archivePrefix = {arXiv},
  url    = {http://arxiv.org/abs/2510.01003v2}
}

Add a badge to your README

Shows whether official code is linked for this paper.

Code of Paper badge
[![Code of Paper](https://codeofpaper.com/badge/2510.01003.svg)](https://codeofpaper.com/paper/2510.01003)

Discussion