Code Search: A Survey of Techniques for Finding Code
Not on the map. Why?
Abstract (arXiv)
The immense amounts of source code provide ample challenges and opportunities during software development. To handle the size of code bases, developers commonly search for code, e.g., when trying to find where a particular feature is implemented or when looking for code examples to reuse. To support developers in finding relevant code, various code search engines have been proposed. This article surveys 30 years of research on code search, giving a comprehensive overview of challenges and techniques that address them. We discuss the kinds of queries that code search engines support, how to preprocess and expand queries, different techniques for indexing and retrieving code, and ways to rank and prune search results. Moreover, we describe empirical studies of code search in practice. Based on the discussion of prior work, we conclude the article with an outline of challenges and opportunities to be addressed in the future.
Key facts. Cited by 18 papers in the map (data through 7 Oct 2026). First posted on arXiv 6 Apr 2022.
Builds on
No reference list yet.
Built on by
Citing papers per year: 2022: 1; 2023: 6; 2024: 2; 2025: 4; 2026: 5.
18 papers.
Sort:
By area:
- 2024RepairAgent: An Autonomous, LLM-Based Agent for Program Repaircited by 225
- 2023The Vault: A Comprehensive Multilingual Dataset for Advancing Code Understanding and Generationcited by 20
- 2023Rethinking Negative Pairs in Code Searchcited by 14
- 2024CoSQA+: Pioneering the Multi-Choice Code Search Benchmark with Test-Driven Agentscited by 11
- 2026GrepSeek: Training Search Agents for Direct Corpus Interactioncited by 10
- 2025CoQuIR: A Comprehensive Benchmark for Code Quality-Aware Information Retrievalcited by 6
- 2026ContextCov: Deriving and Enforcing Executable Constraints from Agent Instruction Filescited by 5
- 2023Code Search Debiasing:Improve Search Results beyond Overall Ranking Performancecited by 4
- 2025Knowledge Graph Based Repository-Level Code Generationcited by 4
- 2023REINFOREST: Reinforcing Semantic Code Similarity for Cross-Lingual Code Search Modelscited by 3
- 2023DocChecker: Bootstrapping Code Large Language Model for Detecting and Resolving Code-Comment Inconsistenciescited by 3
- 2025Fully Autonomous Programming using Iterative Multi-Agent Debugging with Large Language Modelscited by 3
6 more
- 2025OASIS: Order-Augmented Strategy for Improved Code Searchcited by 2
- 2026Neurosymbolic Repo-level Code Localizationcited by 1
- 2022CSSAM:Code Search via Attention Matching of Code Semantics and Structurescited by 0
- 2023CodeScholar: Growing Idiomatic Code Examplescited by 0
- 2026XSearch: Explainable Code Search via Concept-to-Code Alignmentcited by 0
- 2026SynH-Rank: Quality-Aware Code Search via Diverse Data Synthesis and Hierarchical Ranking Trainingcited by 0
- 2026SynH-Rank: Quality-Aware Code Search via Diverse Data Synthesis and Hierarchical Ranking Training19 Jul 2026
- 2026GrepSeek: Training Search Agents for Direct Corpus Interaction28 May 2026
- 2026XSearch: Explainable Code Search via Concept-to-Code Alignment15 May 2026
- 2026Neurosymbolic Repo-level Code Localization17 Apr 2026
- 2026ContextCov: Deriving and Enforcing Executable Constraints from Agent Instruction Files28 Feb 2026
- 2025CoQuIR: A Comprehensive Benchmark for Code Quality-Aware Information Retrieval31 May 2025
- 2025Knowledge Graph Based Repository-Level Code Generation20 May 2025
- 2025OASIS: Order-Augmented Strategy for Improved Code Search11 Mar 2025
- 2025Fully Autonomous Programming using Iterative Multi-Agent Debugging with Large Language Models10 Mar 2025
- 2024CoSQA+: Pioneering the Multi-Choice Code Search Benchmark with Test-Driven Agents17 Jun 2024
- 2024RepairAgent: An Autonomous, LLM-Based Agent for Program Repair25 Mar 2024
- 2023CodeScholar: Growing Idiomatic Code Examples23 Dec 2023
6 more
- 2023Code Search Debiasing:Improve Search Results beyond Overall Ranking Performance25 Nov 2023
- 2023Rethinking Negative Pairs in Code Search12 Oct 2023
- 2023DocChecker: Bootstrapping Code Large Language Model for Detecting and Resolving Code-Comment Inconsistencies10 Jun 2023
- 2023The Vault: A Comprehensive Multilingual Dataset for Advancing Code Understanding and Generation9 May 2023
- 2023REINFOREST: Reinforcing Semantic Code Similarity for Cross-Lingual Code Search Models5 May 2023
- 2022CSSAM:Code Search via Attention Matching of Code Semantics and Structures8 Aug 2022
- 2024RepairAgent: An Autonomous, LLM-Based Agent for Program Repaircited by 225
- 2024CoSQA+: Pioneering the Multi-Choice Code Search Benchmark with Test-Driven Agentscited by 11
- 2026GrepSeek: Training Search Agents for Direct Corpus Interactioncited by 10
- 2026ContextCov: Deriving and Enforcing Executable Constraints from Agent Instruction Filescited by 5
- 2025Fully Autonomous Programming using Iterative Multi-Agent Debugging with Large Language Modelscited by 3
- 2026GrepSeek: Training Search Agents for Direct Corpus Interaction28 May 2026
- 2026ContextCov: Deriving and Enforcing Executable Constraints from Agent Instruction Files28 Feb 2026
- 2025Fully Autonomous Programming using Iterative Multi-Agent Debugging with Large Language Models10 Mar 2025
- 2024CoSQA+: Pioneering the Multi-Choice Code Search Benchmark with Test-Driven Agents17 Jun 2024
- 2024RepairAgent: An Autonomous, LLM-Based Agent for Program Repair25 Mar 2024
- 2023The Vault: A Comprehensive Multilingual Dataset for Advancing Code Understanding and Generationcited by 20
- 2023Rethinking Negative Pairs in Code Searchcited by 14
- 2025CoQuIR: A Comprehensive Benchmark for Code Quality-Aware Information Retrievalcited by 6
- 2023Code Search Debiasing:Improve Search Results beyond Overall Ranking Performancecited by 4
- 2025Knowledge Graph Based Repository-Level Code Generationcited by 4
- 2023REINFOREST: Reinforcing Semantic Code Similarity for Cross-Lingual Code Search Modelscited by 3
- 2025OASIS: Order-Augmented Strategy for Improved Code Searchcited by 2
- 2026Neurosymbolic Repo-level Code Localizationcited by 1
- 2022CSSAM:Code Search via Attention Matching of Code Semantics and Structurescited by 0
- 2023CodeScholar: Growing Idiomatic Code Examplescited by 0
- 2026XSearch: Explainable Code Search via Concept-to-Code Alignmentcited by 0
- 2026XSearch: Explainable Code Search via Concept-to-Code Alignment15 May 2026
- 2026Neurosymbolic Repo-level Code Localization17 Apr 2026
- 2025CoQuIR: A Comprehensive Benchmark for Code Quality-Aware Information Retrieval31 May 2025
- 2025Knowledge Graph Based Repository-Level Code Generation20 May 2025
- 2025OASIS: Order-Augmented Strategy for Improved Code Search11 Mar 2025
- 2023CodeScholar: Growing Idiomatic Code Examples23 Dec 2023
- 2023Code Search Debiasing:Improve Search Results beyond Overall Ranking Performance25 Nov 2023
- 2023Rethinking Negative Pairs in Code Search12 Oct 2023
- 2023The Vault: A Comprehensive Multilingual Dataset for Advancing Code Understanding and Generation9 May 2023
- 2023REINFOREST: Reinforcing Semantic Code Similarity for Cross-Lingual Code Search Models5 May 2023
- 2022CSSAM:Code Search via Attention Matching of Code Semantics and Structures8 Aug 2022