Publication Type
Conference Proceeding Article
Version
publishedVersion
Publication Date
5-2018
Abstract
During software maintenance, code comments help developerscomprehend programs and reduce additional time spent on readingand navigating source code. Unfortunately, these comments areoften mismatched, missing or outdated in the software projects.Developers have to infer the functionality from the source code.This paper proposes a new approach named DeepCom to automatically generate code comments for Java methods. The generatedcomments aim to help developers understand the functionalityof Java methods. DeepCom applies Natural Language Processing(NLP) techniques to learn from a large code corpus and generatescomments from learned features. We use a deep neural networkthat analyzes structural information of Java methods for bettercomments generation. We conduct experiments on a large-scaleJava corpus built from 9,714 open source projects from GitHub. Weevaluate the experimental results on a machine translation metric. Experimental results demonstrate that our method DeepComoutperforms the state-of-the-art by a substantial margin.
Keywords
comment generation, deep learning, program comprehension
Discipline
Software Engineering
Research Areas
Data Science and Engineering
Publication
ICPC '18: Proceedings of the 26th Conference on Program Comprehension, Gothenburg, Sweden, May 27-28
First Page
200
Last Page
210
ISBN
9781450357142
Identifier
10.1145/3196321.3196334
Publisher
ACM
City or Country
New York
Citation
HU, Xing; LI, Ge; XIA, Xin; LO, David; and JIN, Zhi.
Deep code comment generation. (2018). ICPC '18: Proceedings of the 26th Conference on Program Comprehension, Gothenburg, Sweden, May 27-28. 200-210.
Available at: https://ink.library.smu.edu.sg/sis_research/4292
Copyright Owner and License
Publisher
Creative Commons License
This work is licensed under a Creative Commons Attribution-NonCommercial-No Derivative Works 4.0 International License.
Additional URL
https://doi.org/10.1145/3196321.3196334