论文标题
种族:检索提交消息生成
RACE: Retrieval-Augmented Commit Message Generation
论文作者
论文摘要
提交消息对于软件开发和维护很重要。已经提出了许多基于神经网络的方法,并显示了自动提交消息生成的有希望的结果。但是,生成的提交消息可能是重复的或多余的。在本文中,我们提出了种族,这是一种新的检索神经提交消息生成方法,该方法将所检索的类似提交视为示例,并利用它来生成准确的提交信息。由于检索到的提交消息可能并不总是准确地描述当前代码差异的内容/意图,因此我们还提出了一个示例性指南,该指南学习了检索到的和当前代码差异之间的语义相似性,然后根据相似性指导提交消息的生成。我们在具有五种编程语言的大型公共数据集上进行了广泛的实验。实验结果表明,种族可以胜过所有基准。此外,种族可以在提交消息生成中提高现有SEQ2SEQ模型的性能。
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.