Commit Message Generation for Source Code Changes

Commit Message Generation for Source Code Changes
复制标题

DOI:
10.24963/ijcai.2019/552
复制
发表时间:
2019-08
期刊:
--
影响因子:
--
通讯作者:
Shengbin Xu;Yuan Yao;F. Xu;Tianxiao Gu;Hanghang Tong;Jian Lu
Shengbin Xu;Yuan Yao;F. Xu;Tianxiao Gu;Hanghang Tong;Jian Lu
中科院分区:
其他
文献类型:
--
作者:
Shengbin Xu;Yuan Yao;F. Xu;Tianxiao Gu;Hanghang Tong;Jian Lu

文献摘要

被引文献

相似文献

提交消息是用自然语言描述源代码变化的信息,对于理解程序和软件演化是必不可少的。不幸的是,由于缺乏直接的动机,提交消息有时会被开发人员忽略,因此有必要自动生成此类消息。现有技术采用基于学习的方法,例如神经机器翻译模型来解决提交消息生成问题。然而,他们往往忽视代码结构信息,并遭受词汇表问题。在本文中,我们提出CoDiSum来解决上述两个限制。特别地,我们首先从源代码更改中提取代码结构和代码语义,然后联合建模这两个信息源,以便更好地学习代码更改的表示。此外,我们增加了复制机制的模型,以进一步减轻词汇表的问题。在真实的数据上的实验结果表明,该方法在准确生成提交消息方面明显优于现有技术。
Commit messages, which summarize the source code changes in natural language, are essential for program comprehension and software evolution understanding. Unfortunately, due to the lack of direct motivation, commit messages are sometimes neglected by developers, making it necessary to automatically generate such messages. State-of-the-art adopts learning based approaches such as neural machine translation models for the commit message generation problem. However, they tend to ignore the code structure information and suffer from the out-of-vocabulary issue. In this paper, we propose CoDiSum to address the above two limitations. In particular, we first extract both code structure and code semantics from the source code changes, and then jointly model these two sources of information so as to better learn the representations of the code changes. Moreover, we augment the model with copying mechanism to further mitigate the out-of-vocabulary issue. Experimental evaluations on real data demonstrate that the proposed approach significantly outperforms the state-of-the-art in terms of accurately generating the commit messages.