HyperAIHyperAI
2 months ago

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

Heyman, Geert ; Van Cutsem, Tom
Neural Code Search Revisited: Enhancing Code Snippet Retrieval through
  Natural Language Intent
Abstract

In this work, we propose and study annotated code search: the retrieval ofcode snippets paired with brief descriptions of their intent using naturallanguage queries. On three benchmark datasets, we investigate how coderetrieval systems can be improved by leveraging descriptions to better capturethe intents of code snippets. Building on recent progress in transfer learningand natural language processing, we create a domain-specific retrieval modelfor code annotated with a natural language description. We find that our modelyields significantly more relevant search results (with absolute gains up to20.6% in mean reciprocal rank) compared to state-of-the-art code retrievalmethods that do not use descriptions but attempt to compute the intent ofsnippets solely from unannotated code.

Neural Code Search Revisited: Enhancing Code Snippet Retrieval through Natural Language Intent | Latest Papers | HyperAI