Improving Code Localization with Repository Memory

Fuente: arXiv
Salvato in:
Dettagli Bibliografici
Autori principali: Wang, Boshi, Xu, Weijian, Li, Yunsheng, Gao, Mei, Xie, Yujia, Sun, Huan, Chen, Dongdong
Natura: Preprint
Pubblicazione: 2025
Soggetti:
Accesso online:
Tags: Aggiungi Tag
Nessun Tag, puoi essere il primo ad aggiungerne!!
_version_ 1866914311573602304
author Wang, Boshi
Xu, Weijian
Li, Yunsheng
Gao, Mei
Xie, Yujia
Sun, Huan
Chen, Dongdong
author_facet Wang, Boshi
Xu, Weijian
Li, Yunsheng
Gao, Mei
Xie, Yujia
Sun, Huan
Chen, Dongdong
contents 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.
format Preprint
id arxiv_https___arxiv_org_abs_2510_01003
institution arXiv
publishDate 2025
record_format arxiv
spellingShingle Improving Code Localization with Repository Memory
Wang, Boshi
Xu, Weijian
Li, Yunsheng
Gao, Mei
Xie, Yujia
Sun, Huan
Chen, Dongdong
Software Engineering
Computation and Language
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.
title Improving Code Localization with Repository Memory
topic Software Engineering
Computation and Language
url https://arxiv.org/abs/2510.01003