arrow
返回

SeTransformer: A Transformer-Based Code Semantic Parser for Code Comment Generation

delete2023-03-01
delete22
PRE
AI
李
李征 (Zheng Li)
Y
Yonghao Wu
宾
宾朋 (Bin Peng)
陈翔 封面图
陈翔 (Xiang Chen)
Z
Zeyu Sun
Y
Yong Liu *
P
Paul Doyle
DOI:10.1109/TR.2022.3154773delete
delete原文链接
delete原文求助
delete分享
delete收藏
摘要

摘要

En 中文
Automated code comment generation technologies can help developers understand code intent, which can significantly reduce the cost of software maintenance and revision. The latest studies in this field mainly depend on deep neural networks, such as convolutional neural networks and recurrent neural network. However, these methods may not generate high-quality and readable code comments due to the long-term dependence problem, which means that the code blocks used to summarize information are far from each other. Owing to the long-term dependence problem, these methods forget the previous input data's feature information during the training process. In this article, to solve the long-term dependence problem and extract both the text and structure information from the program code, we propose a novel improved-Transformer-based comment generation method, named SeTransformer. Specifically, the SeTransformer utilizes the code tokens and an abstract syntax tree (AST) of programs to extract information as the inputs, and then, it leverages the self-attention mechanism to analyze the text and structural features of code simultaneously. Experimental results based on public corpus gathered from large-scale open-source projects show that our method can significantly outperform five state-of-the-art baselines (such as Hybrid-DeepCom and AST-attendgru). Furthermore, we also conduct a questionnaire survey for developers, and the results show that the SeTransformer can generate higher quality comments than those of other baselines.
Keyword:
Codes
Transformers
Computational modeling
Training
Convolutional neural networks
Feature extraction
Convolution
Code comment generation
convolutional neural network (CNN)
deep learning
program comprehension
Transformer

期刊

IEEE Transactions on Reliability 封面图
IEEE Transactions on Reliability
IF:
5.7
论文数:
2.8K
被引数:
8.5K

机构

B
Beijing University of Chemical Technology
学者数:
3.1W
论文数: 2.2W
被引数: 4.5W
P
peking university
学者数:
11.9W
论文数: 8.7W
被引数: 146
N
Nantong University
学者数:
1.9W
论文数: 1.1W
被引数: 2.0W
学者 查看更多机构
引用论文

引用论文

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
err分享
err收藏
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
err分享
err收藏
Types of Management
err1999-07-29
err0
PREAI
errRussell L Ackoff
err分享
err收藏
Non-Gaussian velocity distributions in optical lattices
err2004-01-01
err0
errOAAI
errJohan Jersblad; Harald Ellmann; Kristian Støchkel; Anders Kastberg; Laurent Sanchez-Palencia; Robin Kaiser
err分享
err收藏
Is pain relief after vaginal mesh and/or sling removal durable long term?
err2017-07-10
err0
PREAI
errKaren Jong; Shreeya Popat; Alana Christie; Philippe E. Zimmern
err分享
err收藏
Ontological Engineering: Principles, Methods, Tools and Languages
err2024-09-04
err0
PREAI
errOscar Corcho; Mariano Fernández-López; Asunción Gómez-Pérez
err分享
err收藏
学者 查看更多内容