Neural Code Search Revisited: Enhancing Code Snippet Retrieval through Natural Language Intent
In this work, we propose and study annotated code search: the retrieval of code snippets paired with brief descriptions of their intent using natural language queries. On three benchmark datasets, we investigate how code retrieval systems can be improved by leveraging descriptions to better capture the intents of code snippets. Building on recent progress in transfer learning and natural language processing, we create a domain-specific retrieval model for code annotated with a natural language description. We find that our model yields significantly more relevant search results (with absolute gains up to 20.6% in mean reciprocal rank) compared to state-of-the-art code retrieval methods that do not use descriptions but attempt to compute the intent of snippets solely from unannotated code.
Code (1)
Tasks
Annotated Code SearchCode SearchInformation RetrievalNatural Language QueriesRetrievalTransfer LearningSimilar Papers 제목 키워드 기반
MGS3: A Multi-Granularity Self-Supervised Code Search Framework
In the pursuit of enhancing software reusability and developer productivity, code search has emerged as a key area, aimed at retrieving code snippets relevant to functionalities based on natural language queries. Despite…
Code SearchContrastive LearningNatural Language QueriesSearching by Code: a New SearchBySnippet Dataset and SnippeR Retrieval Model for Searching by Code Snippets
Code search is an important and well-studied task, but it usually means searching for code by a text query. We argue that using a code snippet (and possibly an error traceback) as a query while looking for bugfixing inst…
Code SearchRetrievalLearning Deep Semantic Model for Code Search using CodeSearchNet Corpus
Semantic code search is the task of retrieving relevant code snippet given a natural language query. Different from typical information retrieval tasks, code search requires to bridge the semantic gap between the program…
Code SearchInformation RetrievalRepresentation LearningRetrieval+2A New Search Paradigm for Natural Language Code Search
Code search can accelerate the efficiency of software development by finding code snippets for the given query. The dominant code search paradigm is to learn the semantic matching between code snippets and queries by neu…
Code SearchESALE: Enhancing Code-Summary Alignment Learning for Source Code Summarization
(Source) code summarization aims to automatically generate succinct natural language summaries for given code snippets. Such summaries play a significant role in promoting developers to understand and maintain code. Insp…
Code SummarizationDecoderLanguage ModelingLanguage Modelling+4