arXivDaily arXiv每日学术速递 周一至周五更新
感恩节,周五至周末无更新,大家顺遂。周一再来吧
arXiv 2009.01959cs.LGcs.CLcs.SEstat.ML
收藏

CoNCRA:一种卷积神经网络代码检索方法

CoNCRA: A Convolutional Neural Network Code Retrieval Approach

IPT - Institute for Technological Research(技术研究所);Northern Arizona University (NAU)(北亚利桑那大学)

Marcelo de Rezende Martins, Marco A. Gerosa

AI总结:

本文提出CoNCRA,一种基于卷积神经网络的语义代码检索方法,利用局部词语交互在Stack Overflow数据集上将SOTA平均提升5%,并在近80%的情况下将最相关代码片段排入前三。

摘要:

软件开发人员通常使用通用搜索引擎来搜索代码。然而,这些搜索引擎无法在语义上找到代码,除非代码附带描述。我们提出了一种语义代码搜索技术:一种基于卷积神经网络的代码检索方法(CoNCRA)。我们的技术旨在找到与开发人员用自然语言表达的意图最匹配的代码片段。我们在一个由从 Stack Overflow 收集的问题和代码片段组成的数据集上评估了我们方法的有效性。我们的初步结果表明,我们的技术优先考虑局部交互(相邻的词语),平均将最先进水平(SOTA)提高了 5%,在近 80% 的情况下将最相关的代码片段检索到前 3(三)个位置。因此,我们的技术很有前景,可以提高语义代码检索的有效性。

英文摘要:

Software developers routinely search for code using general-purpose search engines. However, these search engines cannot find code semantically unless it has an accompanying description. We propose a technique for semantic code search: A Convolutional Neural Network approach to code retrieval (CoNCRA). Our technique aims to find the code snippet that most closely matches the developer's intent, expressed in natural language. We evaluated our approach's efficacy on a dataset composed of questions and code snippets collected from Stack Overflow. Our preliminary results showed that our technique, which prioritizes local interactions (words nearby), improved the state-of-the-art (SOTA) by 5% on average, retrieving the most relevant code snippets in the top 3 (three) positions by almost 80% of the time. Therefore, our technique is promising and can improve the efficacy of semantic code retrieval.

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

↑