Context-Encoded Code Change Representation for Automated Commit Message Generation

被引:0
|
作者
Thanh Trong Vu [1 ]
Thanh-Dat Do [1 ]
Hieu Dinh Vo [1 ]
机构
[1] VNU Univ Engn & Technol, Fac Informat Technol, Hanoi, Vietnam
关键词
Code change representation; automated commit message generation; program dependence; program slices;
D O I
10.1142/S0218194023500493
中图分类号
TP18 [人工智能理论];
学科分类号
081104 ; 0812 ; 0835 ; 1405 ;
摘要
Changes in source code are an inevitable part of software development. They are the results of indispensable activities such as fixing bugs or improving functionality. Descriptions for code changes (commit messages) help people better understand the changes. However, due to the lack of motivation and time pressure, writing high-quality commit messages remains reluctantly considered. Several methods have been proposed with the aim of automated commit message generation. However, the existing methods are still limited because they only utilize either the changed codes or the changed codes combined with their surrounding statements. This paper proposes a method to represent code changes by combining the changed codes and the unchanged codes which have program dependence on the changed codes. Specifically, we first create program dependence graphs (PDGs) of source code before and after the change. After that, slices related to the changed code from these PDGs are extracted. These slices are then merged to represent the change. This method overcomes the limitations of current representations while improving the performance of 5/6 of state-of-the-art commit message generation methods by up to 15% in METEOR, 14% in ROUGE-L, and 10% in BLEU-4.
引用
收藏
页码:185 / 202
页数:18
相关论文
共 14 条
  • [1] 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
  • [2] 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
  • [3] 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
  • [4] ESGen: Commit Message Generation Based on Edit Sequence of Code Change
    Chen, Xiangping
    Li, Yangzi
    Tang, Zhicao
    Huang, Yuan
    Zhou, Haojie
    Tang, Mingdong
    Zheng, Zibin
    PROCEEDINGS 2024 32ND IEEE/ACM INTERNATIONAL CONFERENCE ON PROGRAM COMPREHENSION, ICPC 2024, 2024, : 112 - 124
  • [5] Multi-grained contextual code representation learning for commit message generation
    Wang, Chuangwei
    Zhang, Li
    Zhang, Xiaofang
    INFORMATION AND SOFTWARE TECHNOLOGY, 2024, 167
  • [6] 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)
  • [7] 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
  • [8] Quality Assurance for Automated Commit Message Generation
    Wang, Bei
    Yan, Meng
    Liu, Zhongxin
    Xu, Ling
    Xia, Xin
    Zhang, Xiaohong
    Yang, Dan
    2021 IEEE INTERNATIONAL CONFERENCE ON SOFTWARE ANALYSIS, EVOLUTION AND REENGINEERING (SANER 2021), 2021, : 260 - 271
  • [9] 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
  • [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