arrow
Return

Towards Improving the Performance of Comment Generation Models by Using BytecodeInformation

delete2025-02-01
delete0
PRE
AI
黄袁 cover
黄袁 (Yuan Huang)
黄金波 cover
黄金波 (Jinbo Huang)
X
Xiangping Chen *
Z
Zibin Zheng
DOI:10.1109/TSE.2024.3523713delete
deleteOriginal
deleteOriginal request for help
deleteShare
deleteSave
Abstract

Abstract

En 中文
Code comment plays an important role in program understanding, and a large number of automatic comment generation methods have been proposed in recent years. To get a better effect of generating comments, many studies try to extract a variety of information (e.g., code tokens, AST traverse sequence, APIs call sequence) from source code as model input. In this study, we found that the bytecode compiled from the source code can provide useful information for comment generation, hence we propose to use the information from bytecode to assist the comment generation. Specifically, we extract the control flow graph (CFG) from the bytecode and propose a serialization method to obtain the CFG sequence that preserves the program structure. Then, we discuss three methods for introducing bytecode information for different models. We collected 390,000 Java methods from the maven repository, and created a dataset of 101,124 samples after deduplication and preprocessing to evaluate our method. The results show that introducing the information extracted from the bytecode can improve the BLEU-4 of 7 comment generation models.
Keywords:
Codes
Source coding
Data mining
Flow graphs
Transformers
Training
Software engineering
Neural networks
Java
Data models
Code comment
comment generation
control flow graph
bytecode

Journal

IEEE Transactions on Software Engineering cover
IEEE Transactions on Software Engineering
IF:
5.6
Papers:
2.9K
Citations:
1.1W

Organization

S
Sun Yat Sen University
Scholars:
9.9W
Papers: 7.2W
Citations: 95
Cited Papers

Cited Papers

err
IF0
err
err0
PREAI
err
errShare
errSave
SCALING WITH KNOWN UNCERTAINTY: A SYNTHESIS
err2006-01-01
err0
PREAI
errJIANGUO WU; HARBIN LI; K. BRUCE JONES; ORIE L. LOUCKS
errShare
errSave
Homeobox Gene Involvement in Normal Hematopoiesis and in the Pathogenesis of Childhood Leukemias
err2017-01-01
err0
PREAI
errMaria Adamaki; Maria Goulielmaki; Ioannis Christodoulou; Spiros Vlahopoulos; Vassilis Zoumpourlis
errShare
errSave
Anti-epithelial (anti-A549) antibodies: their nature, specificity and relevance to transplantation
err1995-09-01
err0
PREAI
errAB Abdul-Karim; AD Barnes; IS Bevan; AJ Howie; D Adu; HF Ross; C Raykundalia; D Catty
errShare
errSave
A Comparative Study on Method Comment and Inline Comment
err2023-07-22
err8
errOAAI
errHuang, Yuan; Guo, Hanyang; Ding, Xi; Shu, Junhuai; Chen, Xiangping; Luo, Xiapu; Zheng, Zibin; Zhou, Xiaocong
errShare
errSave
errShare
errSave
Establishment and characterization of a new triple-negative canine mammary cancer cell line
err2018-10-01
err0
PREAI
errHong Zhang; Shimin Pei; Bin Zhou; Huanan Wang; Hongchao Du; Di Zhang; Degui Lin
errShare
errSave
researcher View more