Repository-level Code Search with Neural Retrieval Methods
Not on the map. Why?
Abstract (arXiv)
This paper presents a multi-stage reranking system for repository-level code search, which leverages the vastly available commit histories of large open-source repositories to aid in bug fixing. We define the task of repository-level code search as retrieving the set of files from the current state of a code repository that are most relevant to addressing a user's question or bug. The proposed approach combines BM25-based retrieval over commit messages with neural reranking using CodeBERT to identify the most pertinent files. By learning patterns from diverse repositories and their commit histories, the system can surface relevant files for the task at hand. The system leverages both commit messages and source code for relevance matching, and is evaluated in both normal and oracle settings. Experiments on a new dataset created from 7 popular open-source repositories demonstrate substantial improvements of up to 80% in MAP, MRR and P@1 over the BM25 baseline, across a diverse set of queries, demonstrating the effectiveness this approach. We hope this work aids LLM agents as a tool for better code search and understanding. Our code and results obtained are publicly available.
Key facts. Cited by 1 paper in the map (data through 7 Oct 2026). First posted on arXiv 10 Feb 2025.
Builds on
No reference list yet.
Built on by
Citing papers per year: 2025: 1.
1 paper.
Similar, not cited
Close in wording, no citation either way
- 2026RepoNav: From Snippet Retrieval to File-Centered Repository Navigation for Code Agents
- 2025CodeRAG: Finding Relevant and Necessary Knowledge for Retrieval-Augmented Repository-Level Code Completion
- 2026CORE-Bench: A Comprehensive Benchmark for Code Retrieval in the Era of Agentic Coding
- 2026DeepRepoQA: Code Repository Question Answering with Deep Agent Exploration
- 2025SaraCoder: Orchestrating Semantic and Structural Cues for Resource-Optimized Repository-Level Code Completion
- 2025MutaGReP: Execution-Free Repository-Grounded Plan Search for Code-Use
- 2025Retrieval-Augmented Code Generation: A Survey with Focus on Repository-Level Approaches
- 2024CodeXEmbed: A Generalist Embedding Model Family for Multiligual and Multi-task Code Retrieval