arXivDaily arXiv每日学术速递 周一至周五更新
arXiv周末暂无论文更新,休息一下吧,周末愉快~~
arXiv 2203.02700cs.SEcs.AIcs.LG
收藏

RACE:检索增强提交消息生成

RACE: Retrieval-Augmented Commit Message Generation

Xi’an Jiaotong University(西安交通大学);Sun Yat-sen University(中山大学);Fudan University(复旦大学);Microsoft Research(微软研究院);The University of Newcastle(纽卡斯尔大学)

Ensheng Shi, Yanlin Wang, Wei Tao, Lun Du, Hongyu Zhang, Shi Han, Dongmei Zhang, Hongbin Sun

摘要:

提交消息对于软件开发和维护非常重要。许多基于神经网络的方法已经被提出并在自动提交消息生成方面显示出有希望的结果。但是,生成的提交消息可能是重复的或冗余的。在本文中,我们提出了RACE,一种新的检索增强神经提交消息生成方法,它将检索到的类似提交作为范例,并利用它来生成准确的提交消息。由于检索到的提交消息可能并不总是准确地描述当前代码差异的内容/意图,我们还提出了一个范例引导器,它学习检索到的和当前代码差异之间的语义相似性,然后基于相似性引导提交消息的生成。我们在一个大型公共数据集上用五种程序设计语言进行了广泛的实验。实验结果表明,RACE算法的性能优于所有的基线算法。此外,RACE可以提高现有Seq 2Seq模型在提交消息生成中的性能。

英文摘要:

Commit messages are important for software development and maintenance. Many neural network-based approaches have been proposed and shown promising results on automatic commit message generation. However, the generated commit messages could be repetitive or redundant. In this paper, we propose RACE, a new retrieval-augmented neural commit message generation method, which treats the retrieved similar commit as an exemplar and leverages it to generate an accurate commit message. As the retrieved commit message may not always accurately describe the content/intent of the current code diff, we also propose an exemplar guider, which learns the semantic similarity between the retrieved and current code diff and then guides the generation of commit message based on the similarity. We conduct extensive experiments on a large public dataset with five programming languages. Experimental results show that RACE can outperform all baselines. Furthermore, RACE can boost the performance of existing Seq2Seq models in commit message generation.

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

↑