arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2107.05373cs.SEcs.AI
收藏

Commit消息生成模型评价的实验研究

On the Evaluation of Commit Message Generation Models: An Experimental Study

Fudan University(复旦大学);Microsoft Research Asia(微软亚洲研究院);Xi’an Jiaotong University(西安交通大学);The University of Newcastle(纽卡斯尔大学)

Wei Tao, Yanlin Wang, Ensheng Shi, Lun Du, Shi Han, Hongyu Zhang, Dongmei Zhang, Wenqiang Zhang

摘要:

提交消息是代码更改的自然语言描述,对于程序理解和维护非常重要。然而,手动编写提交消息是费时费力的,特别是当代码频繁更新时。已经提出了利用生成或检索技术来自动生成提交消息的各种方法。为了更好地理解现有方法在解决这一问题时的表现,本文对最先进的模型和数据集进行了系统和深入的分析。我们发现:(1)在以前的工作中使用了BLEU度量的不同变体,这影响了对现有方法的评估和理解。(2)大多数现有的数据集只从Java存储库中抓取,而其他程序设计语言的存储库没有得到充分的探索。(3)数据集分割策略可以在很大程度上影响现有模型的性能。一些模型在按提交拆分数据集时表现出更好的性能,而其他模型在按时间戳或项目拆分数据集时表现更好。根据我们的研究结果,我们进行了人工评估,并找到了与任务的人类得分最相关的BLEU指标。我们还收集了一个大规模的、信息丰富的、多语言的提交消息数据集MCMD,并在这个数据集上评估了现有的模型。此外,我们在不同的数据集分割策略下进行了大量的实验,并提出了不同场景下合适的模型。基于实验结果和发现,我们提供了可行的建议,全面评估提交消息生成模型,并讨论可能的未来研究方向。我们相信这项工作可以帮助从业者和研究人员更好地评估和选择自动提交消息生成的模型。

英文摘要:

Commit messages are natural language descriptions of code changes, which are important for program understanding and maintenance. However, writing commit messages manually is time-consuming and laborious, especially when the code is updated frequently. Various approaches utilizing generation or retrieval techniques have been proposed to automatically generate commit messages. To achieve a better understanding of how the existing approaches perform in solving this problem, this paper conducts a systematic and in-depth analysis of the state-of-the-art models and datasets. We find that: (1) Different variants of the BLEU metric are used in previous works, which affects the evaluation and understanding of existing methods. (2) Most existing datasets are crawled only from Java repositories while repositories in other programming languages are not sufficiently explored. (3) Dataset splitting strategies can influence the performance of existing models by a large margin. Some models show better performance when the datasets are split by commit, while other models perform better when the datasets are split by timestamp or by project. Based on our findings, we conduct a human evaluation and find the BLEU metric that best correlates with the human scores for the task. We also collect a large-scale, information-rich, and multi-language commit message dataset MCMD and evaluate existing models on this dataset. Furthermore, we conduct extensive experiments under different dataset splitting strategies and suggest the suitable models under different scenarios. Based on the experimental results and findings, we provide feasible suggestions for comprehensively evaluating commit message generation models and discuss possible future research directions. We believe this work can help practitioners and researchers better evaluate and select models for automatic commit message generation.

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑