arrow
Return

Code Search: A Survey of Techniques for Finding Code

delete2023-02-09
delete17
delete
OA
AI
L
Luca Di Grazia *
M
Michael Pradel
DOI:10.1145/3565971delete
deleteOriginal
deleteOriginal request for help
deleteShare
deleteSave
Abstract

Abstract

En 中文
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.
Keywords:
Code search
code retrieval
API
learning
survey

Journal

ACM Computing Surveys cover
ACM Computing Surveys
IF:
28
Papers:
2.5K
Citations:
3.5W

Organization

U
University of Stuttgart
Scholars:
1.1W
Papers: 9.4K
Citations: 1.3W
Cited Papers

Cited Papers

Neuroscience research in Africa: Current status
err2016-06-01
err0
errOAAI
errFoad Abd-Allah; Najib Kissani; Anthony William; Mohammed Ibrahim Oraby; Ramez Reda Moustafa; Ehab Shaker; Mohamed Soliman El-Tamawy; Raad Shakir
errShare
errSave
Continental smokers couple mantle degassing and distinctive microbiology within continents
err2016-02-01
err0
errOAAI
errLaura J. Crossey; Karl E. Karlstrom; Brandon Schmandt; Ryan R. Crow; Daniel R. Colman; Brandi Cron; Cristina D. Takacs-Vesbach; Clifford N. Dahm; Diana E. Northup; David R. Hilton; Jason W. Ricketts; Anthony R. Lowry
errShare
errSave
err
IF0
err
err0
PREAI
err
errShare
errSave
The postnatal development of the spinal cord of the dog
err2004-10-08
err0
PREAI
errMichael W. Fox; Ottilie R. Inman; Williamina A. Himwich
errShare
errSave
Ion mobility-mass spectrometry separation of steroid structural isomers and epimers
err2016-12-20
err0
PREAI
errChristopher D. Chouinard; Christopher R. Beekman; Robin H. J. Kemperman; Harrison M. King; Richard A. Yost
errShare
errSave
How Well Do Search Engines Support Code Retrieval on the Web?
err2011-12-01
err75
errOAAI
errSim, Susan Elliott; Umarji, Medha; Ratanotayanon, Sukanya; Lopes, Cristina V.
errShare
errSave
A test-driven approach to code search and its application to the reuse of auxiliary functionality
err2011-04-01
err35
errOAAI
errLazzarini Lemos, Otavio Augusto; Bajracharya, Sushil; Ossher, Joel; Masiero, Paulo Cesar; Lopes, Cristina
errShare
errSave
researcher View more