ICSE-2019 A Neural Model for Generating Natural Language Summaries of Program Subroutines

· ICSE· · code-summarization

Paper: A Neural Model for Generating Natural Language Summaries of Program Subroutines

ast-attentiongru

1. Introduction

  1. Code is treated as both a textual token representation and an AST representation; to distinguish these two views, both are fed as input jointly.
  2. Two experimental settings are designed: (i) the standard setting, code tokens plus AST; (ii) the challenging setting, AST only, without code tokens.

2. Model

The authors propose ast-attendgru, an attention-based encoder–decoder architecture. For code representation, they use the token sequence and the structural AST; each branch is encoded separately. The architecture is shown below:

avatar

Dataset: a self-collected Java method corpus—51 million Java methods from 50,000 projects—yielding roughly 2.1M methods after preprocessing.

  • baselines:
    • attendgru
    • SBT (ICPC 18)
    • CODE-NN (Iyer 19)

<HR align=left color=#987cb9 SIZE=1>