arrow
Return

Learning to represent code changes

delete2025-12-17
delete0
PRE
AI
X
Xunzhu Tang
H
Haoye Tian
W
Weiguo Pian
S
Saad Ezzini
A
Abdoul Kader Kaboré
A
Andrew Habib
K
Kisub Kim *
J
Jacques Klein
T
Tegawendé F. Bissyandé
DOI:10.1007/s10664-025-10763-6delete
deleteOriginal
deleteOriginal request for help
deleteShare
deleteSave
Abstract

Abstract

En 中文
Code change representation plays a pivotal role in automating numerous software engineering tasks, such as classifying code change correctness or generating natural language summaries of code changes. Recent studies have leveraged deep learning to derive effective code change representation, primarily focusing on capturing changes in token sequences or Abstract Syntax Trees (ASTs). However, these current state-of-the-art representations do not explicitly calculate the intention semantic induced by the change on the AST, nor do they effectively explore the surrounding contextual information of the modified lines. To address this, we propose a new code change representation methodology, Patcherizer, which we refer to as our tool. This innovative approach explores the intention features of the context and structure, combining the context around the code change along with two novel representations. These new representations capture the sequence intention inside the code changes in the code change and the graph intention inside the structural changes of AST graphs before and after the code change. This comprehensive representation allows us to better capture the intentions underlying a code change. Patcherizer builds on graph convolutional neural networks for the structural input representation of the intention graph and on transformers for the intention sequence representation. We assess the generalizability of Patcherizer ’s learned embeddings on three tasks: (1) Generating code change description in NL, (2) Predicting code change correctness in program repair, and (3) Code change intention detection. Experimental results show that the learned code change representation is effective for all three tasks and achieves superior performance to the state-of-the-art (SOTA) approaches. For instance, on the popular task of code change description generation (a.k.a. commit message generation), Patcherizer achieves an average improvement of 19.39%, 8.71%, and 34.03% in terms of BLEU, ROUGE-L, and METEOR metrics, respectively.
Keywords:
Code change representation
Code change correctness
Message generation

Journal

Empirical Software Engineering cover
Empirical Software Engineering
IF:
3.6
Papers:
2.0K
Citations:
5.3K

Organization

S
school of computing and communications
Scholars:
17
Papers: 9
Citations: 0
S
School of Computing and Information Systems
Scholars:
40
Papers: 28
Citations: 4
U
university of luxembourg
Scholars:
5.2K
Papers: 4.8K
Citations: 4
researcher View more organizations
Cited Papers

Cited Papers

BLEU
err2001-01-01
err0
errOAAI
errKishore Papineni; Salim Roukos; Todd Ward; Wei-Jing Zhu
errShare
errSave
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
Learning Human-Written Commit Messages to Document Code Changes
err2020-11-30
err0
PREAI
errYuan Huang; Nan Jia; Hao-Jie Zhou; Xiang-Ping Chen; Zi-Bin Zheng; Ming-Dong Tang
errShare
errSave
ProtTrans: Towards Cracking the Language of Life’s Code Through Self-Supervised Learning
err
IF0
err2020-07-12
err0
errOAAI
errAhmed Elnaggar; Michael Heinzinger; Christian Dallago; Ghalia Rehawi; Yu Wang; Llion Jones; Tom Gibbs; Tamas Feher; Christoph Angerer; Martin Steinegger; Debsindhu Bhowmik; Burkhard Rost
errShare
errSave
ChangeScribe: A Tool for Automatically Generating Commit Messages
err2015-05-01
err0
errOAAI
errMario Linares-Vasquez; Luis Fernando Cortes-Coy; Jairo Aponte; Denys Poshyvanyk
errShare
errSave
researcher View more