arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2110.08512cs.SEcs.AI
收藏

AugmentedCode:检查代码检索模型中自然语言资源的效果

AugmentedCode: Examining the Effects of Natural Language Resources in Code Retrieval Models

Fujitsu Research of America(富士通美国研究院);North Carolina State University(北卡罗来纳州立大学);Fujitsu Research Ltd.(富士通研究有限公司)

Mehdi Bahrami, N. C. Shrikanth, Yuji Mizobuchi, Lei Liu, Masahiro Fukuyori, Wei-Peng Chen, Kazuki Munakata

摘要:

代码检索允许软件工程师通过自然语言查询来搜索代码,这依赖于自然语言处理和软件工程技术。在代码检索方面,已经有几次尝试,从搜索片段代码到函数代码。本文介绍了增强代码检索(AugmentedCode),它利用代码中已有的信息,构造增强的程序设计语言来提高代码检索模型的性能。我们策划了一个大型的Python语料库,并展示了增强程序设计语言的框架和结果,该语言在CodeSearchNet和CodeBERT上的表现优于平均倒数排名(MRR)分别为0.73和0.96。性能更好的微调增强代码检索模型发表在https://huggingface.co/Fujitsu/AugCode的HuggingFace上,演示视频可在https://youtu.be/mnZrUTANjGs上获得。

英文摘要:

Code retrieval is allowing software engineers to search codes through a natural language query, which relies on both natural language processing and software engineering techniques. There have been several attempts on code retrieval from searching snippet codes to function codes. In this paper, we introduce Augmented Code (AugmentedCode) retrieval which takes advantage of existing information within the code and constructs augmented programming language to improve the code retrieval models' performance. We curated a large corpus of Python and showcased the the framework and the results of augmented programming language which outperforms on CodeSearchNet and CodeBERT with a Mean Reciprocal Rank (MRR) of 0.73 and 0.96, respectively. The outperformed fine-tuned augmented code retrieval model is published in HuggingFace at https://huggingface.co/Fujitsu/AugCode and a demonstration video is available at: https://youtu.be/mnZrUTANjGs .

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

↑