arrow
Return

Using Large Language Models for multi-level commit message generation for large diffs

delete2025-07-08
delete0
PRE
AI
A
Abhishek Kumar *
S
Sandhya Sankar
P
Partha Pratim Das
P
P. P. Chakrabarti
DOI:10.1016/j.infsof.2025.107831delete
deleteOriginal
deleteOriginal request for help
deleteShare
deleteSave
Abstract

Abstract

En 中文
Commit messages play a crucial role in version control systems, providing essential context and explanations for changes made to the codebase. Despite their importance, many commit messages are poorly written or entirely missing, leading to challenges in code comprehension, bug tracking, and project maintenance. This paper addresses two significant issues in existing automated commit message generation approaches: the limitations of using datasets with short token lengths and the reliance on a single commit message for multiple file changes. To overcome these challenges, we generate commit messages for diffs with larger token lengths, using the latest Large Language Models, including GPT-4o, Llama 3.1 70B & 8B, and Mistral Large. For evaluation, we conduct automatic assessments using metrics such as BLEU, ROUGE, METEOR, and CIDEr, as well as a human evaluation. Our findings indicate that GPT-4o and Llama 3.1 70B emerge as the best models for generating commit messages. Additionally, we propose a two-level approach that generates both an overall commit message and file-specific messages for each file change. To validate this approach, we surveyed developers to understand the problems they face with current commit messages and gather their feedback on our two-level approach. Our survey indicates that the two-level approach is effective and helps developers better understand complex and lengthy code diffs.

Journal

Information and Software Technology cover
Information and Software Technology
IF:
4.3
Papers:
3.8K
Citations:
7.7K

Organization

I
Indian Institute of Technology
Scholars:
1.5K
Papers: 749
Citations: 1.3W
A
Ashoka University
Scholars:
309
Papers: 234
Citations: 280
Cited Papers

Cited Papers

BLEU
err2001-01-01
err0
errOAAI
errKishore Papineni; Salim Roukos; Todd Ward; Wei-Jing Zhu
errShare
errSave
CoreGen: Contextualized Code Representation Learning for Commit Message Generation
err2021-10-01
err25
errOAAI
errNie, Lun Yiu; Gao, Cuiyun; Zhong, Zhicong; Lam, Wai; Liu, Yang; Xu, Zenglin
errShare
errSave
Automatic Commit Message Generation: A Critical Review and Directions for Future Work
err2024-04-01
err6
errOAAI
errZhang, Yuxia; Qiu, Zhiqing; Stol, Klaas-Jan; Zhu, Wenhui; Zhu, Jiaxin; Tian, Yingchen; Liu, Hui
errShare
errSave
Version Control System: A Review
err2018-01-01
err0
errOAAI
errNazatul Nurlisa Zolkifli; Amir Ngah; Aziz Deraman
errShare
errSave
Inside Commits: An Empirical Study on Commits in Open-Source Software
err
IF0
err2021-10-05
err0
PREAI
errMívian Ferreira; Diego Golçalves; Kecia Ferreira; Mariza Bigonha
errShare
errSave
Only diff Is Not Enough: Generating Commit Messages Leveraging Reasoning and Action of Large Language Model
err
IF0
err2024-07-12
err0
PREAI
errJiawei Li; David Faragó; Christian Petrov; Iftekhar Ahmed
errShare
errSave
ATOM: Commit Message Generation Based on Abstract Syntax Tree and Hybrid Ranking
err2022-05-01
err47
errOAAI
errLiu, Shangqing; Gao, Cuiyun; Chen, Sen; Nie, Lun Yiu; Liu, Yang
errShare
errSave
researcher View more