ESGen: Commit Message Generation Based on Edit Sequence of Code Change

被引:0
|
作者
Chen, Xiangping [1 ]
Li, Yangzi [1 ]
Tang, Zhicao [1 ]
Huang, Yuan [1 ]
Zhou, Haojie [1 ]
Tang, Mingdong [2 ]
Zheng, Zibin [1 ]
机构
[1] Sun Yat Sen Univ, Guangzhou, Peoples R China
[2] Guangdong Univ Foreign Studies, Guangzhou, Peoples R China
基金
国家重点研发计划; 中国国家自然科学基金;
关键词
Commit Message Generation; Code Change; Edit Sequence; Bi-Encoder; Abstract Syntax Tree;
D O I
10.1145/3643916.3644414
中图分类号
TP31 [计算机软件];
学科分类号
081202 ; 0835 ;
摘要
Commit messages provide important information for comprehending the code changes, and a number of researchers try to generate commit messages by using an automatic way. These research on commit message generation has profited from the code tokens or code structures such as AST. Since the edit sequence of code change is also important for capturing the code change intent, we propose a new commit message generation method called ESGen, which extracts AST edit sequences of code changes as model input. Specifically, we employ an O(ND) difference algorithm to extract the edit sequence from AST by comparing the ASTs before and after applying the code changes. Then, we construct a Bi-Encoder, which encodes the textual information and the AST edit sequence information of code change. The experimental results show that ESGen outperforms other baseline models, improving the BLEU-4 to 15.14. Also, when applying the edit sequence to 7 baseline models, they improve the BLEU-4 scores of these models by an average of 8.5%. Additionally, a human evaluation confirmed the effectiveness of ESGen in generating commit messages.
引用
收藏
页码:112 / 124
页数:13
相关论文
共 50 条
  • [1] Commit Message Generation for Source Code Changes
    Xu, Shengbin
    Yao, Yuan
    Xu, Feng
    Gu, Tianxiao
    Tong, Hanghang
    Lu, Jian
    PROCEEDINGS OF THE TWENTY-EIGHTH INTERNATIONAL JOINT CONFERENCE ON ARTIFICIAL INTELLIGENCE, 2019, : 3975 - 3981
  • [2] Context-Encoded Code Change Representation for Automated Commit Message Generation
    Thanh Trong Vu
    Thanh-Dat Do
    Hieu Dinh Vo
    INTERNATIONAL JOURNAL OF SOFTWARE ENGINEERING AND KNOWLEDGE ENGINEERING, 2024, 34 (01) : 185 - 202
  • [3] FIRA: Fine-Grained Graph-Based Code Change Representation for Automated Commit Message Generation
    Dong, Jinhao
    Lou, Yiling
    Zhu, Qihao
    Sun, Zeyu
    Li, Zhilin
    Zhang, Wenjie
    Hao, Dan
    2022 ACM/IEEE 44TH INTERNATIONAL CONFERENCE ON SOFTWARE ENGINEERING (ICSE 2022), 2022, : 970 - 981
  • [4] CoreGen: Contextualized Code Representation Learning for Commit Message Generation
    Nie, Lun Yiu
    Gao, Cuiyun
    Zhong, Zhicong
    Lam, Wai
    Liu, Yang
    Xu, Zenglin
    NEUROCOMPUTING, 2021, 459 : 97 - 107
  • [5] Boosting Neural Commit Message Generation with Code Semantic Analysis
    Jiang, Shuyao
    34TH IEEE/ACM INTERNATIONAL CONFERENCE ON AUTOMATED SOFTWARE ENGINEERING (ASE 2019), 2019, : 1280 - 1282
  • [6] Combining Code Context and Fine-grained Code Difference for Commit Message Generation
    Xu, Shengbin
    Yao, Yuan
    Xu, Feng
    Gu, Tianxiao
    Tong, Hanghang
    13TH ASIA-PACIFIC SYMPOSIUM ON INTERNETWARE, INTERNETWARE 2022, 2022, : 242 - 251
  • [7] Capturing the context-aware code change via dynamic control flow graph for commit message generation
    Du, Yali
    Li, Ying
    Ma, Yi-Fan
    Li, Ming
    MACHINE LEARNING, 2025, 114 (04)
  • [8] Revisiting Learning-based Commit Message Generation
    Dong, Jinhao
    Lou, Yiling
    Hao, Dan
    Tan, Lin
    2023 IEEE/ACM 45TH INTERNATIONAL CONFERENCE ON SOFTWARE ENGINEERING, ICSE, 2023, : 794 - 805
  • [9] Multi-grained contextual code representation learning for commit message generation
    Wang, Chuangwei
    Zhang, Li
    Zhang, Xiaofang
    INFORMATION AND SOFTWARE TECHNOLOGY, 2024, 167
  • [10] Commit Message Generation from Code Differences using Hidden Markov Models
    Awad, Ahmed
    Nagaty, Khaled
    PROCEEDINGS OF 2019 8TH INTERNATIONAL CONFERENCE ON SOFTWARE AND INFORMATION ENGINEERING (ICSIE 2019), 2019, : 96 - 99