SEOct 23, 2019

Retrieve and Refine: Exemplar-based Neural Comment Generation

arXiv:1910.10419v1138 citationsHas Code
Originality Incremental advance
AI Analysis

This addresses the problem of generating better code comments for software developers, but it is incremental as it builds on traditional IR-based approaches and neural networks.

The paper tackles code comment generation by using existing comments from similar source code as exemplars to guide the process, resulting in a model that significantly outperforms state-of-the-art methods on a large-scale Java corpus.

Code comment generation is a crucial task in the field of automatic software development. Most previous neural comment generation systems used an encoder-decoder neural network and encoded only information from source code as input. Software reuse is common in software development. However, this feature has not been introduced to existing systems. Inspired by the traditional IR-based approaches, we propose to use the existing comments of similar source code as exemplars to guide the comment generation process. Based on an open source search engine, we first retrieve a similar code and treat its comment as an exemplar. Then we applied a seq2seq neural network to conduct an exemplar-based comment generation. We evaluate our approach on a large-scale Java corpus, and experimental results demonstrate that our model significantly outperforms the state-of-the-art methods.

Foundations

The foundational work for this paper's niche, ranked by how specifically the neighbourhood builds on it — not by global fame.

Your Notes