arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 1909.09436cs.LGcs.IRcs.SEstat.ML
收藏

CodeSearchNet挑战:评估语义代码搜索的状态

CodeSearchNet Challenge: Evaluating the State of Semantic Code Search

Microsoft Research(微软研究院)

Hamel Husain, Ho-Hsiang Wu, Tiferet Gazit, Miltiadis Allamanis, Marc Brockschmidt

摘要:

语义代码搜索是在给定自然语言查询的情况下检索相关代码的任务。虽然与其他信息检索任务有关,但它需要弥合代码中使用的语言(通常缩写和高度技术性)与更适合描述模糊概念和想法的自然语言之间的差距。为了评估代码搜索的进展,我们发布了CodeSearchNet语料库,并提出了CodeSearchNet挑战赛,其中包括99个自然语言查询,以及来自CodeSearchNet语料库的大约4k个可能结果的专家相关性注释。该语料库包含来自六种程序设计语言(Go,Java,JavaScript,PHP,Python和Ruby)的开源代码的约600万个函数。CodeSearchNet语料库还包含自动生成的查询类自然语言,用于200万个函数,这些函数是通过机械抓取和预处理相关函数文档获得的。在本文中,我们描述了用于获取语料库和专家标签的方法,以及任务的一些简单的基线解决方案。我们希望CodeSearchNet Challenge鼓励研究人员和从业者进一步研究这个有趣的任务,并将举办一个竞赛和排行榜来跟踪挑战的进展。我们还热衷于在未来将CodeSearchNet Challenge扩展到更多的查询和程序设计语言。

英文摘要:

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.

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑