Skip to main content
Article
Deep code comment generation
ICPC '18: Proceedings of the 26th Conference on Program Comprehension, Gothenburg, Sweden, May 27-28
  • Xing HU, Peking University
  • Ge LI, Peking University
  • Xin XIA, Monash University
  • David LO, Singapore Management University
  • Zhi JIN, Peking University
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
ISBN
9781450357142
Identifier
10.1145/3196321.3196334
Publisher
ACM
City or Country
New York
Copyright Owner and License
Publisher
Creative Commons License
Creative Commons Attribution-NonCommercial-No Derivative Works 4.0 International
Additional URL
https://doi.org/10.1145/3196321.3196334
Citation Information
Xing HU, Ge LI, Xin XIA, David LO, et al.. "Deep code comment generation" ICPC '18: Proceedings of the 26th Conference on Program Comprehension, Gothenburg, Sweden, May 27-28 (2018) p. 200 - 210
Available at: http://works.bepress.com/david_lo/234/