Title
Towards Context-Aware Code Comment Generation.
Abstract
Code comments are vital for software maintenance and comprehension, but many software projects suffer from the lack of meaningful and up-to-date comments in practice. This paper presents a novel approach to automatically generate code comments at a function level by targeting object-oriented programming languages. Unlike prior work that only uses information locally available within the target function, our approach leverages broader contextual information by considering all other functions of the same class. To propagate and integrate information beyond the scope of the target function, we design a novel learning framework based on the bidirectional gated recurrent unit and a graph attention network with a pointer mechanism. We apply our approach to produce code comments for Java methods and compare it against four strong baseline methods. Experimental results show that our approach outperforms most methods by a large margin and achieves a comparable result with the state-of-the-art method.
Year
DOI
Venue
2020
10.18653/V1/2020.FINDINGS-EMNLP.350
EMNLP
DocType
Volume
Citations 
Conference
2020.findings-emnlp
0
PageRank 
References 
Authors
0.34
0
5
Name
Order
Citations
PageRank
Xiaohan Yu127.79
Quzhe Huang200.34
Zheng Wang321518.10
Yansong Feng473564.17
Dongyan Zhao599896.35