一句话:构建首个 commit-issue 关联数据集并提出 ExGroFi 范式,将关联信息引入训练,显著提升提交信息生成效果。
提交信息生成(CMG)旨在为代码提交自动生成自然语言描述,但现有方法多从代码改动出发,难以说明提交原因。本文从数据集与方法两个角度探究 commit 与 issue 的关联,构建首个以相关 commit 与 issue 配对为基础的数据集,包含无标签平行部分和有标签部分,后者由人工标注 issue 中的理性信息。作者提出 ExGroFi(Extraction, Grounding, Ene-tuning)范式,将 commit-issue 关联引入模型训练。实验在多种当前最优 CMG 模型上验证,ExGroFi 增强后的模型性能显著优于原模型。
Commit message generation (CMG) is a challenging task in automated software engineering that aims to generate natural language descriptions of code changes for commits. Previous methods all start from the modified code snippets, outputting commit messages through template-based, retrieval-based, or learning-based models. While these methods can summarize what is modified from the perspective of code, they struggle to provide reasons for the commit. The correlation between commits and issues that could be a critical factor for generating rational commit messages is still unexplored. In this work, we delve into the correlation between commits and issues from the perspective of dataset and methodology. We construct the first dataset anchored on combining correlated commits and issues. The dataset consists of an unlabeled commit-issue parallel part and a labeled part in which each example is provided with human-annotated rational information in the issue. Furthermore, we propose ExGroFi (Extraction, Grounding, Ene-tuning), a novel paradigm that can introduce the correlation between commits and issues into the training phase of models. To evaluate whether it is effective, we perform comprehensive experiments with various state-of-the-art CMG models. The results show that compared with the original models, the performance of ExGroFi-enhanced models is significantly improved.
DOI 原文 · arXiv · PDF(开放获取) · DBLP
@inproceedings{WangTHRSYL23,
title = {Delving into Commit-Issue Correlation to Enhance Commit Message Generation Models},
author = {Liran Wang and Xunzhu Tang and Yichen He and Changyu Ren and Shuhua Shi and Chaoran Yan and Zhoujun Li},
booktitle = {ASE},
year = {2023},
doi = {10.1109/ase56229.2023.00050}
}