Deep Code Comment Generation

By Xing Hu, Ge Li, Xin Xia, David Lo, Zhi Jin. 2018

791 citations recorded by the source corpus.

During software maintenance, code comments help developers comprehend programs and reduce additional time spent on reading and navigating source code. Unfortunately, these comments are often 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 generated comments aim to help developers understand the functionality of Java methods. DeepCom applies Natural Language Processing (NLP) techniques to learn from a large code corpus and generates comments from learned features. We use a deep neural network that analyzes structural information of Java methods for better comments generation. We conduct experiments on a large-scale Java corpus built from 9,714 open source projects from GitHub. We evaluate the experimental results on a machine translation metric. Experimental results demonstrate that our method DeepCom outperforms the state-of-the-art by a substantial margin.

Subfields: Artificial Intelligence, Information Systems, Natural Language Processing, Code Generation & Program Synthesis, Signal Processing

How researchers see this paper

The researchers whose trusted networks rank it highest, strongest advocate first. Every researcher gets a different order.

In Artificial Intelligence

  1. Mohit Bansal
  2. Graham Neubig
  3. Jianfeng Gao
  4. Luke S. Zettlemoyer
  5. Zhiyuan Liu
  6. Maosong Sun
  7. Percy Liang
  8. Furu Wei

In Information Systems

  1. Prem Devanbu
  2. Miltiadis Allamanis
  3. Baishakhi Ray
  4. Uri Alon
  5. Toufique Ahmed
  6. Eran Yahav
  7. Charles Sutton
  8. Saikat Chakraborty

In Natural Language Processing

  1. Prem Devanbu
  2. Toufique Ahmed
  3. Graham Neubig
  4. Uri Alon
  5. Omer Levy
  6. Nan Duan
  7. Eran Yahav
  8. Mohit Bansal

In Code Generation & Program Synthesis

  1. Prem Devanbu
  2. Toufique Ahmed
  3. Charles Sutton
  4. Miltiadis Allamanis
  5. Baishakhi Ray
  6. Ge Li
  7. Hongyu Zhang
  8. Rafael-Michael Karampatsis

In Signal Processing

  1. Uri Alon
  2. Eran Yahav
  3. Baishakhi Ray
  4. Saikat Chakraborty
  5. Omer Levy
  6. Shaked Brody
  7. Miltiadis Allamanis
  8. Prem Devanbu

Citations in the corpus