Commit messages are crucial to software development, allowing developers to track changes and collaborate effectively. Despite their utility, most commit messages lack important information since writing high-quality commit messages is tedious and time-consuming. The active research on commit message generation (CMG) has not yet led to wide adoption in practice. We argue that if we could shift the focus from commit message generation to commit message completion and use previous commit history as additional context, we could significantly improve the quality and the personal nature of the resulting commit messages. In this paper, we propose and evaluate both of these novel ideas. Since the existing datasets lack historical data, we collect and share a novel dataset called CommitChronicle, containing 10.7M commits across 20 programming languages. We use this dataset to evaluate the completion setting and the usefulness of the historical context for state-of-the-art CMG models and GPT-3.5-turbo. Our results show that in some contexts, commit message completion shows better results than generation, and that while in general GPT-3.5-turbo performs worse, it shows potential for long and detailed messages. As for the history, the results show that historical information improves the performance of CMG models in the generation task, and the performance of GPT-3.5-turbo in both generation and completion.
翻译:提交信息对软件开发至关重要,它使开发者能够追踪变更并有效协作。尽管具有实用性,但由于撰写高质量的提交信息既繁琐又耗时,大多数提交信息缺乏重要内容。当前活跃的提交信息生成(CMG)研究尚未在实践中得到广泛采用。我们认为,如果将关注点从提交信息生成转向提交信息补全,并将先前的提交历史作为额外语境,就能显著提升最终提交信息的质量与个性化程度。本文提出并评估了这两项创新理念。由于现有数据集缺乏历史数据,我们收集并发布了一个名为CommitChronicle的新数据集,包含20种编程语言的1070万次提交。我们利用该数据评估了补全设置及历史语境对现有最优CMG模型和GPT-3.5-turbo的效用。结果表明,在某些场景下,提交信息补全的效果优于生成;尽管GPT-3.5-turbo整体表现较差,但在生成长篇详细信息方面展现出潜力。关于历史信息,结果显示历史信息增强了CMG模型在生成任务中的性能,并同时提升了GPT-3.5-turbo在生成和补全任务中的表现。