about
CodeSum: Translate Program Language to Natural Language (arxiv.org)
1 point by lainon on Aug 8, 2017 | hide | past | pdf | discuss on HN

In plain words: A tool writes short English descriptions of source code by reading the tree of the code's grammatical structure in a fixed order that keeps it clear and unambiguous. On large Java, C#, and SQL code collections, its summaries beat the best earlier systems.

Abstract

During software maintenance, programmers spend a lot of time on code comprehension. Reading comments is an effective way for programmers to reduce the reading and navigating time when comprehending source code. Therefore, as a critical task in software engineering, code summarization aims to generate brief natural language descriptions for source code. In this paper, we propose a new code summarization model named CodeSum. CodeSum exploits the attention-based sequence-to-sequence (Seq2Seq) neural network with Structure-based Traversal (SBT) of Abstract Syntax Trees (AST). The AST sequences generated by SBT can better present the structure of ASTs and keep unambiguous. We conduct experiments on three large-scale corpora in different program languages, i.e., Java, C#, and SQL, in which Java corpus is our new proposed industry code extracted from Github. Experimental results show that our method CodeSum outperforms the state-of-the-art significantly.

Xing Hu, Yuhan Wei, Ge Li, Zhi Jin
arXiv:1708.01837 · cs.SE · submitted Aug 6, 2017 · updated Jan 31, 2018
abstract · pdf · We have some additional experiments on this work

add comment on HN