Delving into History: Retrieve Less but Augment More on Commit Message Generation

Read full text
Authors: Peng Lan, Jiakun Liu, Xinyu Zhong, Ning Gui, Lingfeng Bao, David Lo, Zhifang Liao
Cited by: 0
References: 37

Abstract

Commit messages are crucial to software development and maintenance, allowing developers to track code changes and collaborate effectively. Automating commit message generation (CMG) reduces developers’ manual effort and facilitates program comprehension and software maintenance. Previous approaches typically generate commit messages based solely on code changes, overlooking the valuable context provided by commit history. Moreover, different developers have varying background knowledge and work on different tasks, leading to diverse commit message styles. The commit history provides important context when developers handle different software development tasks across different repositories, yet its potential in CMG remains underexplored. To fill this gap, we propose a novel paradigm named HisRag , which retrieves relevant commit messages from commit history and uses them to enhance existing CMG approaches, improving the quality and relevance of generated commit messages. Extensive experiments showed that HisRag significantly enhances the performance of various CMG approaches. The average improvements on the B-NORM, BLEU, ROUGE-L, METEOR, Log-MNEXT, and BRSA are 65%, 78%, 38%, 42%, 37%, and 12%, and the human evaluation results indicate that HisRag can improve CMG approaches in terms of informativeness, conciseness, expressiveness, and acceptance rate, providing meaningful insights for future research on history retrieval-augmented CMG and practical application.

Fields of Study & Subjects

Software Engineering Research Software Engineering Techniques and Practices Topic Modeling

Publication details

Journal / source
ACM Transactions on Software Engineering and Methodology
Volume
35
Issue
10
Pages
1–29
Publication date
3 February 2026
Language
EN