arrow
Return

CCMG: Enhancing Conventional Commit Message Generation With Hierarchical Context

delete2026-05-12
delete0
PRE
AI
W
Wenke Li
C
Chengwei Liu
Y
Yiran Zhang
X
Xuesen Lin
S
Suyuan Wang
F
Feng Wu
C
Cai Fu
刘洋 (Yang Liu)
DOI:10.1109/tse.2026.3692869delete
deleteOriginal
deleteOriginal request for help
deleteShare
deleteSave
Abstract

Abstract

En 中文
Automated commit message generation, which aims at generating natural language description from code change, allows developers to focus more on project maintenance and management. To ensure the quality of commit messages, most projects constrain their style and adopt the conventional commit specification. Conventional commit message generation has been significantly benefited from recent progress in Large Language Models (LLMs). However, previous approaches typically rely on only one or two type of information for the generation, ignoring a wide range of context information. Moreover, they often extract the context in a coarse-grained manner, missing critical details. To address this limitation, We propose CCMG, a novel hierarchical context-augmented <bold xmlns:mml="http://www.w3.org/1998/Math/MathML" xmlns:xlink="http://www.w3.org/1999/xlink"> <u>C</u></b>onventional <bold xmlns:mml="http://www.w3.org/1998/Math/MathML" xmlns:xlink="http://www.w3.org/1999/xlink"> <u>C</u></b>ommit <bold xmlns:mml="http://www.w3.org/1998/Math/MathML" xmlns:xlink="http://www.w3.org/1999/xlink"> <u>M</u></b>essage <bold xmlns:mml="http://www.w3.org/1998/Math/MathML" xmlns:xlink="http://www.w3.org/1999/xlink"> <u>G</u></b>eneration framework, which incorporates project-agnostic and project-specific context. For project agnostic context, CCMG retrieves and refines the relevant commits to align conventional commit specification from large-scale corpus. For project-specific context, CCMG provides a wide range of software context information from the perspective of project, code, and style. Finally, CCMG designs two-stage prompt strategy to focus on conventional message inference and commit type adaptation. Compared with the state-of-the-art LLM-based approaches (i.e., OMG and OMEGA), experiment results show that CCMG achieves an average improvement of 31.45% based on human evaluation in commit message generation and improves accuracy by 21.00% and F1 score by 20.88% in commit type classification.
Keywords:
Automatic commit message generation
conventional commit specification
large language model

Journal

IEEE Transactions on Software Engineering cover
IEEE Transactions on Software Engineering
IF:
5.6
Papers:
2.8K
Citations:
1.1W

Organization

T
tencent technology (shenzhen) company ltd.
Scholars:
3
Papers: 3
Citations: 0
T
tsinghua university
Scholars:
11.7W
Papers: 10.0W
Citations: 137
N
Nanyang Technological University
Scholars:
4.9W
Papers: 4.8W
Citations: 8.1W
N
nankai university
Scholars:
4.7W
Papers: 3.2W
Citations: 74
H
huazhong university of science and technology
Scholars:
2.5W
Papers: 7.5K
Citations: 5
researcher View more organizations