Neural Code Search Revisited: Enhancing Code Snippet Retrieval through Natural Language Intent

Geert Heyman, Tom Van Cutsem
8/27/2020
cs.IRcs.LGcs.SE

Official code: nokia-steward/codesearch (37 stars, Jupyter Notebook, BSD-3-Clause, last commit 2023-05-22).

Abstract

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.

Show full abstract

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.

View on arXivView PDF

Code Implementations(1)

BSD-3-Clause

Models and datasets for annotated code search.

377Jupyter Notebook, PythonAug 27, 20203 years agoBSD-3-Clause
code-reusecode-searchdeep-learningmachine-learningnatural-language-processing+1 more

Similar Papers

Cite this paper

@article{heyman2020neural,
  title  = {Neural Code Search Revisited: Enhancing Code Snippet Retrieval through Natural Language Intent},
  author = {Geert Heyman and Tom Van Cutsem},
  year   = {2020},
  eprint = {2008.12193},
  archivePrefix = {arXiv},
  url    = {https://arxiv.org/abs/2008.12193}
}

Add a badge to your README

Shows whether official code is linked for this paper.

Code of Paper badge
[![Code of Paper](https://codeofpaper.com/badge/2008.12193.svg)](https://codeofpaper.com/paper/2008.12193)

Discussion