CodeSearchNet Challenge: Evaluating the State of Semantic Code Search

Hamel Husain, Ho-Hsiang Wu, Tiferet Gazit, Miltiadis Allamanis, Marc Brockschmidt
9/20/2019
cs.LGcs.IRcs.SE

Official code: github/CodeSearchNet (2,441 stars, MIT, TensorFlow, last commit 2022-01-31).

Abstract

Semantic code search is the task of retrieving relevant code given a natural language query. While related to other information retrieval tasks, it requires bridging the gap between the language used in code (often abbreviated and highly technical) and natural language more suitable to describe vague concepts and ideas. To enable evaluation of progress on code search, we are releasing the CodeSearchNet Corpus and are presenting the CodeSearchNet Challenge, which consists of 99 natural language queries with about 4k expert relevance annotations of likely results from CodeSearchNet Corpus. The corpus contains about 6 million functions from open-source code spanning six programming languages (Go, Java, JavaScript, PHP, Python, and Ruby). The CodeSearchNet Corpus also contains automatically generated query-like natural language for 2 million functions, obtained from mechanically scraping and preprocessing associated function documentation. In this article, we describe the methodology used to obtain the corpus and expert labels, as well as a number of simple baseline solutions for the task. We hope that CodeSearchNet Challenge encourages researchers and practitioners to study this interesting task further and will host a competition and leaderboard to track the progress on the challenge. We are also keen on extending CodeSearchNet Challenge to more queries and programming languages in the future.

View on arXivView PDF

Code Implementations(1)

TensorFlowMIT

Datasets, tools, and benchmarks for representation learning of code.

2,441407Shell, PythonFeb 28, 20194 years agoMIT
bertcnndatadata-sciencedatasets+15 more

Similar Papers

Cite this paper

@article{husain2019codesearchnet,
  title  = {CodeSearchNet Challenge: Evaluating the State of Semantic Code Search},
  author = {Hamel Husain and Ho-Hsiang Wu and Tiferet Gazit and Miltiadis Allamanis and Marc Brockschmidt},
  year   = {2019},
  eprint = {1909.09436},
  archivePrefix = {arXiv},
  url    = {https://arxiv.org/abs/1909.09436}
}

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/1909.09436.svg)](https://codeofpaper.com/paper/1909.09436)

Discussion