Title
Effective approaches to combining lexical and syntactical information for code summarization.
Abstract
Natural language summaries of source codes are important during software development and maintenance. Recently, deep learning based models have achieved good performance on the task of automatic code summarization, which encode token sequence or abstract syntax tree (AST) of code with neural networks. However, there has been little work on the efficient combination of lexical and syntactical information of code for better summarization quality. In this paper, we propose two general and effective approaches to leveraging both types of information: a convolutional neural network that aims to better extract vector representation of AST node for downstream models; and a Switch Network that learns an adaptive weight vector to combine different code representations for summary generation. We integrate these approaches into a comprehensive code summarization model, which includes a sequential encoder for token sequence of code and a tree based encoder for its AST. We evaluate our model on a large Java dataset. The experimental results show that our model outperforms several state-of-the-art models on various metrics, and the proposed approaches contribute a lot to the improvements.
Year
DOI
Venue
2020
10.1002/spe.2893
SOFTWARE-PRACTICE & EXPERIENCE
Keywords
DocType
Volume
code summarization,deep learning,program comprehension
Journal
50.0
Issue
ISSN
Citations 
12.0
0038-0644
0
PageRank 
References 
Authors
0.34
0
3
Name
Order
Citations
PageRank
Ziyi Zhou123.74
Huiqun Yu210621.74
Guisheng Fan374.81