A Neural Model for Generating Natural Language Summaries of Program Subroutines

By Alexander LeClair, Siyuan Jiang, Collin McMillan. 2019

335 citations recorded by the source corpus.

Source code summarization -- creating natural language descriptions of source code behavior -- is a rapidly-growing research topic with applications to automatic documentation generation, program comprehension, and software maintenance. Traditional techniques relied on heuristics and templates built manually by human experts. Recently, data-driven approaches based on neural machine translation have largely overtaken template-based systems. But nearly all of these techniques rely almost entirely on programs having good internal documentation; without clear identifier names, the models fail to create good summaries. In this paper, we present a neural model that combines words from code with code structure from an AST. Unlike previous approaches, our model processes each data source as a separate input, which allows the model to learn code structure independent of the text in code. This process helps our approach provide coherent summaries in many cases even when zero internal documentation is provided. We evaluate our technique with a dataset we created from 2.1m Java methods. We find improvement over two baseline techniques from SE literature and one from NLP literature.

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

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. Prem Devanbu
  2. Toufique Ahmed
  3. Wasi Uddin Ahmad
  4. Baishakhi Ray
  5. Saikat Chakraborty
  6. Hongyu Zhang
  7. Kai-Wei Chang
  8. Gabriele Bavota

In Information Systems

  1. Prem Devanbu
  2. Baishakhi Ray
  3. Michele Tufano
  4. Hongyu Zhang
  5. Saikat Chakraborty
  6. Gabriele Bavota
  7. Denys Poshyvanyk
  8. Koushik Sen

In Software

  1. Prem Devanbu
  2. Toufique Ahmed
  3. Baishakhi Ray
  4. Armando Solar-Lezama
  5. Gabriele Bavota
  6. Michele Tufano
  7. Hongyu Zhang
  8. Koushik Sen

In Natural Language Processing

  1. Prem Devanbu
  2. Toufique Ahmed
  3. Michele Tufano
  4. Hongyu Zhang
  5. Gabriele Bavota
  6. Baishakhi Ray
  7. Shi Han
  8. Lun Du

In Code Generation & Program Synthesis

  1. Prem Devanbu
  2. Toufique Ahmed
  3. Baishakhi Ray
  4. Koushik Sen
  5. Wasi Uddin Ahmad
  6. Hongyu Zhang
  7. Saikat Chakraborty
  8. Armando Solar-Lezama

Citations in the corpus