Mining version control system for automatically generating commit comment

Yuan Huang,Qiaoyang Zheng,Xiangping Chen,Yingfei Xiong,Zhiyong Liu,Xiaonan Luo
DOI: https://doi.org/10.1109/ESEM.2017.56
2017-01-01
Abstract:ABSTRACTCommit comments increasingly receive attention as an important complementary component in code change comprehension. To address the comment scarcity issue, a variety of automatic approaches for commit comment generation have been intensively proposed. However, most of these approaches mechanically outline a superficial level summary of the changed software entities, the change intent behind the code changes is lost (e.g., the existing approaches cannot generate such comment: "fixing null pointer exception"). Considering the comments written by developers often describe the intent behind the code change, we propose a method to automatically generate commit comment by reusing the existing comments in version control system. Specifically, for an input commit, we apply syntax, semantic, pre-syntax, and pre-semantic similarities to discover the similar commits from half a million commits, and recommend the reusable comments to the input commit from the ones of the similar commits. We evaluate our approach on 7 projects. The results show that 9.1% of the generated comments are good, 27.7% of the generated comments need minor fix, and 63.2% are bad, and we also analyze the reasons that make a comment available or unavailable.
What problem does this paper attempt to address?