Retrieval-Oriented Code Representations in Agentic Bug Localization
On the map: LLM agents and tool use → Software engineering coding agents
Abstract (arXiv)
LLM-based agents are increasingly being used to support software development, yet their performance in repository-level tasks depends on retrieving the right code context. Existing studies have explored file-level localization using traditional information retrieval over file paths and raw source code. However, the role of textual code representations in retrieval and localization remains underexplored. We study file-level bug localization as a representation-driven retrieval problem. Across the Long Code Arena (LCA) and SWE-bench Verified (SWE) datasets, we compare five code representations: file paths, raw source code, and three LLM-generated textual representations. Our experiments include lexical, semantic, and LLM-based retrieval, followed by LLM-based post-retrieval ranking. We quantify the cost incurred by a representation through the representation footprint. We find that the choice of code representation affects both localization effectiveness and cost. Role-aware summaries outperform file-path representations by up to 40% Hit@5 while requiring a representation footprint 10.4 to 20.9x smaller than raw source code. Combining complementary representation results and ranking retrieved candidates with an LLM provides further gains of up to 31.9% and 42.0%, respectively. Overall, role-aware summaries provide the best cost-effectiveness trade-off, while raw source code offers effectiveness in some settings at a significantly higher cost. A case study with Agentless reveals the utility of our techniques within a well-known pipeline, reaching 94% Hit@6 on file localization (+4.7% against the baseline). Our findings suggest that code representation should be treated as a first-class design choice in agentic localization pipelines, guided by pipeline stage and cost-accuracy requirements.
Key facts. No citing papers in the map yet (data through 7 Oct 2026). Placed in Software engineering coding agents, one of 16 directions in LLM agents and tool use. Builds on 22 of its 54 references that are in the map. First posted on arXiv 13 Jul 2026.
Builds on
22 of 54 references.
Closest ancestors · 3
Same direction, newest first
- 2025LocAgent: Graph-Guided LLM Agents for Code Localization12 Mar
- 2024LLM Agents Improve Semantic Code Search5 Aug
- 2024Agentless: Demystifying LLM-based Software Engineering Agents1 Jul
Other references · 19
- 2018BERT: Pre-training of Deep Bidirectional Transformers for Language Understandingcited by 40,204
- 2023SWE-bench: Can Language Models Resolve Real-World GitHub Issues?cited by 3,193
- 2025gpt-oss-120b & gpt-oss-20b Model Cardcited by 1,258
- 2025Qwen3 Embedding: Advancing Text Embedding and Reranking Through Foundation Modelscited by 1,175
- 2023Towards General Text Embeddings with Multi-stage Contrastive Learningcited by 705
- 2019Document Expansion by Query Predictioncited by 225
- 2023Query2doc: Query Expansion with Large Language Modelscited by 146
- 2022ReACC: A Retrieval-Augmented Code Completion Frameworkcited by 117
- 2025SWE-Fixer: Training Open-Source LLMs for Effective and Efficient GitHub Issue Resolutioncited by 87
- 2024Alibaba LingmaAgent: Improving Automated Issue Resolution via Comprehensive Repository Explorationcited by 58
- 2024Long Code Arena: a Set of Benchmarks for Long-Context Code Modelscited by 48
- 2020BERT-QE: Contextualized Query Expansion for Document Re-rankingcited by 40
7 more
- 2024A Systematic Literature Review on Large Language Models for Automated Program Repaircited by 37
- 2024CodeXEmbed: A Generalist Embedding Model Family for Multiligual and Multi-task Code Retrievalcited by 33
- 2025From Prompts to Templates: A Systematic Prompt Template Analysis for Real-world LLMappscited by 19
- 2023EditSum: A Retrieve-and-Edit Framework for Source Code Summarizationcited by 18
- 2025Bridging Bug Localization and Issue Fixing: A Hierarchical Localization Framework Leveraging Large Language Modelscited by 11
- 2025Code Summarization Beyond Function Levelcited by 8
- 2024Evaluating the Effectiveness and Efficiency of Demonstration Retrievers in RAG for Coding Taskscited by 2
Built on by
Not cited yet.
Similar, not cited
Close in wording, no citation either way
- 2025Reformulate, Retrieve, Localize: Agents for Repository-Level Bug Localization
- 2026BLAgent: Agentic RAG for File-Level Bug Localization
- 2025Meta-RAG on Large Codebases Using Code Summarization
- 2025SpIDER: Spatially Informed Dense Embedding Retrieval for Software Issue Localization
- 2025SweRank: Software Issue Localization with Code Ranking
- 2026CORE-Bench: A Comprehensive Benchmark for Code Retrieval in the Era of Agentic Coding
- 2026Multi-task LLMs for Bug Classification: Efficient Inference with Auxiliary Decoding Heads
- 2026Semantic Navigation for Issue Localization in Code Repository