Manuscript Offprint

arXiv:2610.25303

Beyond Similarity-Based Generation: Guiding Commit Message Generation with Issue-Commit Traceability

Chunying Zhou, Gong Chen, Xiaoyuan Xie, Yi Song, Yuxuan Yang, Peng He

Chunying Zhou*§, Gong Chen*§, Xiaoyuan Xie*¶, Yi Song†¶, Yuxuan Yang*, Peng He‡

*School of Computer Science, Wuhan University, Wuhan, China

†School of Cyber Science and Engineering, Wuhan University, Wuhan, China

‡School of Cyber Science and Technology, Hubei University, Wuhan, China

{zcy9838, chengongcg, xxie, yisong, yxyang3}@whu.edu.cn; penghe@hubu.edu.cn

Abstract—Commit messages provide records of code changes and help developers understand and maintain software. To reduce the manual effort involved in writing them, commit message generation (CMG) approaches automatically generate commit messages that describe code changes in natural language. Existing CMG approaches generally treat CMG as a standalone task and optimize generated messages primarily for similarity to developer-written references. However, this objective may not properly reflect the practical usefulness of generated commit messages. This limitation matters in current AI-assisted software engineering workflows, where commit messages are used as shared information to serve different software engineering activities. To fill this gap, we propose TraceMsg, which uses issue-commit traceability, a representative software engineering activity, to guide commit message generation. TraceMsg is a collaborative multi-agent framework that coordinates message generation, traceability reasoning, and feedback-guided refinement, allowing generated messages to serve traceability while using reasoning feedback to guide issue-conditioned refinement. We evaluate TraceMsg on six open-source projects. The experimental results show that TraceMsg achieves an average Hit@1 of 0.893 and an MRR of 0.911, improving Hit@1 and MRR by 13.16% and 38.75%, respectively, over the best baseline for each metric.

Index Terms—Commit Message Generation, Issue–Commit Traceability, Multi-Agent Collaboration, Software Maintenance

I. INTRODUCTION

COMMIT messages are important software artifacts that record the evolution of software systems and support various software engineering activities, including code review [1], program comprehension [2], software maintenance [3], and software evolution [4]. To reduce the manual effort of writing commit messages, extensive research has explored automatic commit message generation (CMG). Earlier CMG approaches derived commit messages from patterns learned from historical code changes and developer-written messages using task-specific retrieval or supervised models [5]–[9]. Recently, large language models (LLMs) have empowered CMG to directly interpret code changes and generate natural-language messages through prompting, reasoning, in-context learning, and retrieval augmentation [10]–[14]. These advances have substantially improved the fluency, specificity, and semantic quality of generated commit messages.

However, existing CMG approaches generally restrict CMG to a standalone task, with improvements primarily demonstrated through higher lexical and semantic similarity to developer-written references. Such an optimization objective may not properly reflect the practical usefulness of generated messages across software engineering activities. In practice, commit messages not only record individual code changes but also carry information that supports communication across different activities. For example, software maintenance often requires recovering missing links between issues and their fixing commits, which facilitates subsequent fix tracing. In this software activity, commit messages describe code changes in natural language, thereby providing textual evidence for matching issue reports with their commits. However, existing CMG approaches focus primarily on improving similarity to developer-written references. Such similarity captures textual correspondence but does not indicate whether a generated message provides the semantic connection between an issue report and its corresponding code change. Consequently, optimizing similarity scores alone may not be sufficient for generating messages that effectively serve the software engineering activities in which they are used.

More importantly, as LLM-based agents take on more software engineering activities previously performed by developers, commit messages are more frequently used to communicate information among agents within automated workflows. The ability of commit messages to serve different activities is therefore essential in current AI-assisted software engineering. Accordingly, CMG should no longer be treated as a static and isolated task, but as a dynamic process designed to serve various activities within automated software engineering workflows.

To address this limitation, we propose TraceMsg, a collaborative multi-agent framework that treats CMG as a process guided by a particular software engineering activity. Among common software engineering activities, we focus on issue-commit traceability because it is an important and representative software maintenance activity that supports maintenance history reconstruction, program understanding, and software evolution [15]–[19]. In AI-assisted software engineering, reliable issue-commit links can further provide LLM-based agents with historical problem-fix information for locating

§Chunying Zhou and Gong Chen contributed equally to this work.

Xiaoyuan Xie and Yi Song are the co-corresponding authors.

prior fixes, reasoning about repair strategies, and validating code changes. This makes issue-commit traceability a suitable activity for integrating commit message generation with practical use. Instead of treating CMG as an isolated text generation task, TraceMsg formulates it as a dynamic process of message generation, traceability reasoning, and feedback-guided refinement. Specifically, a Generation Agent analyzes commit diffs and produces structured commit messages containing both implementation changes and inferred development intent. These generated messages are then used for issue-commit traceability reasoning by a Traceability Agent. Based on the traceability results, a Feedback Agent identifies missing or ambiguous intent information and provides feedback to refine the generated messages. Through this dynamic process, TraceMsg treats generated commit messages as shared information for issue-commit traceability, using traceability outcomes to assess their practical usefulness and guide their issue-conditioned refinement.

The main contributions of this paper are summarized as follows:

• A practical usability perspective. We propose a new perspective in which CMG is guided by how effectively generated messages serve software engineering activities rather than by their static similarity to developer-written references. This perspective reflects the practical usefulness of generated messages across these activities.

• A collaborative multi-agent framework. We propose TraceMsg, a collaborative multi-agent framework that enables CMG to serve a particular software engineering activity in AI-assisted workflows. TraceMsg uses issue-commit traceability as a representative activity and coordinates three agents to form a dynamic process of message generation, traceability reasoning, and feedback-guided refinement.

• A comprehensive evaluation. We conduct extensive experiments on six open-source projects to evaluate the effectiveness of TraceMsg and investigate the practical usefulness of generated commit messages in issue-commit traceability.

The remainder of this paper is organized as follows. Section II introduces CMG and its evaluation, presents a motivating example, and outlines our solution strategies. Section III presents the overall framework of TraceMsg. Section IV describes the experimental setup, followed by the experimental results and analysis in Section V. Section VI provides analyses of parameter sensitivity, backbone robustness, and efficiency. Section VII discusses the threats to validity of this work. Section VIII reviews related work, and Section IX concludes the paper.

References (50)

  • Modern code reviews—survey of literature and practice
  • Large language models for code analysis: Do LLMs really do their job?
  • Deeparc: Modularizing neural networks for the model maintenance
  • A survey on large language models for software engineering
  • Neural-machine-translation-based commit message generation: how far are we?
  • Cc2vec: distributed representations of code changes
  • Automatically generating commit messages from diffs using neural machine translation
  • Generating commit messages from diffs using pointer-generator network
  • Fira: fine-grained graph-based code change representation for automated commit message generation
  • Only diff is not enough: Generating commit messages leveraging reasoning and action of large language model
  • Automated commit message generation with large language models: An empirical study and beyond
  • Coracmg: Contextual retrieval-augmented framework for commit message generation
  • Automatic commit message generation: A critical review and directions for future work
  • An empirical study on commit message generation using llms via in-context learning
  • Linkanchor: An autonomous llm-based agent for issue-to-commit link recovery
  • Back to the basics: Rethinking issue-commit linking with llm-assisted retrieval
  • Ealink: An efficient and accurate pre-trained framework for issue-commit link recovery
  • Semi-supervised pre-processing for learning-based traceability framework on real-world software projects
  • Traceability transformed: Generating more accurate links with pre-trained bert models
  • What makes a good commit message?
  • Commit message matters: Investigating impact and evolution of commit message quality
  • Bleu: a method for automatic evaluation of machine translation
  • Meteor: An automatic metric for mt evaluation with improved correlation with human judgments
  • Rouge: A package for automatic evaluation of summaries
  • BERTScore: Evaluating Text Generation with BERT
  • Sentence-BERT: Sentence embeddings using Siamese BERT-networks
  • Is ChatGPT good at search? investigating large language models as reranking agents
  • The faiss library
  • Comparing the sensitivity of information retrieval metrics
  • On information retrieval metrics designed for evaluation with incomplete relevance assessments
  • Judging llm-as-a-judge with mt-bench and chatbot arena
  • Prometheus: Inducing fine-grained evaluation capability in language models
  • G-eval: NLG evaluation using gpt-4 with better human alignment
  • American Cyanamid Pearl River, NY, 1963, vol. 1
  • Cliff’s delta calculator: A non-parametric effect size program for two groups of observations
  • Kappa coefficients in medical research
  • Get to the point: Summarization with pointer-generator networks
  • React: Synergizing reasoning and acting in language models
  • The missing links: bugs and bug-fix commits
  • Relink: recovering links between bugs and changes
  • Multilayered approach for recovering links between bug reports and fixes
  • Discovering loners and phantoms in commit and issue data
  • Fair and balanced? bias in bug-fix datasets
  • Deeplink: Recovering issue-commit links based on deep learning
  • Automated recovery of issue-commit links leveraging both textual and non-textual data
  • Btlink: automatic link recovery between issues and commits based on pre-trained bert model
  • Promptlink: Multi-template prompt learning with adversarial training for issue-commit link recovery
  • Mplinker: Multi-template prompt-tuning with adversarial training for issue-commit link recovery
  • Recurrent neural network based language model
  • BERT: Pretraining of deep bidirectional transformers for language understanding