TG-CUP: A Transformer and GNN-Based Multi-Modal Comment Updating Method

Comments play a crucial role in code comprehension and maintenance. This is particularly vital when the code is changed, as comments should be promptly updated to maintain consistency between the code and the comments. Existing comment update methods usually treat code as natural language text, ignore the information of code structure, and often fail when code changes are not associated with comment updates (called a non-code-indicative update (NCIU)). Therefore, we propose a Transformer and Graph neural network-based Comment UPdate method (TG-CUP). The model integrates the information of old comment, code edit sequence, and AST-Difference Graph to update the outdated comments. The experimental results show that TG-CUP increased by 5.16% and 2.23% compared with the most advanced methods on Accuracy and Recall@5, and the performance on NCIUs is improved as well.

Authors

Institutions

Publication Details

Journal
ACM Transactions on Software Engineering and Methodology
Published
2024-12-12
DOI
https://doi.org/10.1145/3708474
Citations
2
Primary Topic
Software Engineering Research
Type
article
Field-Weighted Citation Impact
1.56
Controls
|||
ALL TIME
JAN
FEB
MAR
APR
MAY
JUN
JUL
AUG
SEP
OCT
article

TG-CUP: A Transformer and GNN-Based Multi-Modal Comment Updating Method

Zibin Zheng, Y. Chen, Xiangping Chen, Yuan Huang
2 citations
ACM Transactions on Software Engineering and Methodology
Software Engineering Research
1.56
article

TG-CUP: A Transformer and GNN-Based Multi-Modal Comment Updating Method

Zibin Zheng, Y. Chen, Xiangping Chen, Yuan Huang
article en
2 citations

Abstract

Comments play a crucial role in code comprehension and maintenance. This is particularly vital when the code is changed, as comments should be promptly updated to maintain consistency between the code and the comments. Existing comment update methods usually treat code as natural language text, ignore the information of code structure, and often fail when code changes are not associated with comment updates (called a non-code-indicative update (NCIU)). Therefore, we propose a Transformer and Graph neural network-based Comment UPdate method (TG-CUP). The model integrates the information of old comment, code edit sequence, and AST-Difference Graph to update the outdated comments. The experimental results show that TG-CUP increased by 5.16% and 2.23% compared with the most advanced methods on Accuracy and Recall@5, and the performance on NCIUs is improved as well.

ACM Transactions on Software Engineering and MethodologyVol. 34(3)
Sun Yat-sen University (CN)
Openalex Percentile: Top 12%
Software Engineering Research
1.56
AI Navigator

Ask Laika to Summarize, Analyze, and Connect papers live on the map.

Summarize Papers & Methodologies

Extract key findings, datasets, and comparative methods across publications.

Benchmark Rankings & Visual Analytics

Rank top research institutions, authors, funders, topics, and journals by Field-Weighted Citation Impact (FWCI) and paper volume with instant charts.

Connect Distant Disciplines

Bridge topological clusters on the map to find hidden collaborative intersections.