Maintaining large-scale, multilingual codebases hinges on accurately localizing issues, which requires mapping natural-language error descriptions to the relevant functions that need to be modified. However, existing ranking approaches are often Python-centric and perform a single-pass search over the codebase. This work introduces SweRank+, a framework that couples SweRankMulti, a cross-lingual code ranking tool, with SweRankAgent, an agentic search setup, for iterative, multi-turn reasoning over the code repository. SweRankMulti comprises a code embedding retriever and a listwise LLM reranker, and is trained using a carefully curated large-scale issue localization dataset spanning multiple popular programming languages. SweRankAgent adopts an agentic search loop that moves beyond single-shot localization with a memory buffer to reason and accumulate relevant localization candidates over multiple turns. Our experiments on issue localization benchmarks spanning various languages demonstrate new state-of-the-art performance with SweRankMulti, while SweRankAgent further improves localization over single-pass ranking.
翻译:维护大规模、多语言代码库的关键在于准确定位问题,这需要将自然语言错误描述映射到需要修改的相关函数。然而,现有的排序方法通常以Python为中心,且仅对代码库执行单次搜索。本文提出SweRank+框架,它将跨语言代码排序工具SweRankMulti与智能搜索配置SweRankAgent相结合,实现对代码仓库的迭代式、多轮推理。SweRankMulti包含一个代码嵌入检索器和一个列表式大语言模型重排序器,并利用精心构建的、涵盖多种主流编程语言的大规模问题定位数据集进行训练。SweRankAgent采用智能搜索循环,通过记忆缓冲区超越单次定位,在多轮中推理并积累相关定位候选。我们在涵盖多种语言的问题定位基准测试上的实验表明,SweRankMulti实现了新的最先进性能,而SweRankAgent则进一步提升了单次排序的定位效果。