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 条
  • [21] Change the neural code, change the message
    Maarten Kamermans
    Nature Neuroscience, 2015, 18 : 4 - 6
  • [22] Message Adaptor Code Generation
    Gibbs, Ivan
    Ghazaleh, Husam
    Dascalu, Sergiu
    2011 9TH IEEE INTERNATIONAL CONFERENCE ON INDUSTRIAL INFORMATICS (INDIN), 2011,
  • [23] Neurala-Machine-Transiation-Based Commit Message Generation: How Far Are We?
    Liu, Zhongxin
    Xia, Xin
    Hassan, Ahmed E.
    Lo, David
    Xing, Zhenchang
    Wang, Xinyu
    PROCEEDINGS OF THE 2018 33RD IEEE/ACM INTERNATIONAL CONFERENCE ON AUTOMTED SOFTWARE ENGINEERING (ASE' 18), 2018, : 373 - 384
  • [24] Commit Message Generation via ChatGPT: How Far Are We?
    Wu, Yifan
    Li, Ying
    Yu, Siyu
    PROCEEDINGS 2024 IEEE/ACM FIRST INTERNATIONAL CONFERENCE ON AI FOUNDATION MODELS AND SOFTWARE ENGINEERING, FORGE 2024, 2024, : 124 - 129
  • [25] Self-Edit: Fault-Aware Code Editor for Code Generation
    Zhang, Kechi
    Li, Zhuo
    Li, Jia
    Li, Ge
    Jin, Zhi
    PROCEEDINGS OF THE 61ST ANNUAL MEETING OF THE ASSOCIATION FOR COMPUTATIONAL LINGUISTICS, ACL 2023, VOL 1, 2023,
  • [26] RECURSIVE CODE GENERATION BASED ON M-SEQUENCE
    POTTER, JM
    ELECTRONICS LETTERS, 1980, 16 (22) : 858 - 859
  • [27] Automatic Commit Message Generation: A Critical Review and Directions for Future Work
    Zhang, Yuxia
    Qiu, Zhiqing
    Stol, Klaas-Jan
    Zhu, Wenhui
    Zhu, Jiaxin
    Tian, Yingchen
    Liu, Hui
    IEEE TRANSACTIONS ON SOFTWARE ENGINEERING, 2024, 50 (04) : 816 - 835
  • [28] KADEL: Knowledge-Aware Denoising Learning for Commit Message Generation
    Tao, Wei
    Zhou, Yucheng
    Wang, Yanlin
    Zhang, Hongyu
    Wang, Haofen
    Zhang, Wenqiang
    ACM TRANSACTIONS ON SOFTWARE ENGINEERING AND METHODOLOGY, 2024, 33 (05)
  • [29] Retrieve-Guided Commit Message Generation with Semantic Similarity And Disparity
    Li, Zhihan
    Cheng, Yi
    Yang, Haiyang
    Kuang, Li
    Zhang, Lingyan
    2022 29TH ASIA-PACIFIC SOFTWARE ENGINEERING CONFERENCE, APSEC, 2022, : 357 - 366
  • [30] Triaging Incoming Change Requests: Bug or Commit History, or Code Authorship?
    Linares-Vasquez, Mario
    Hossen, Kamal
    Dang, Hoang
    Kagdi, Huzefa
    Gethers, Malcom
    Poshyvanyk, Denys
    2012 28TH IEEE INTERNATIONAL CONFERENCE ON SOFTWARE MAINTENANCE (ICSM), 2012, : 451 - 460