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
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.