Write a Blog >>
ASE 2020
Mon 21 - Fri 25 September 2020 Melbourne, Australia
Wed 23 Sep 2020 00:20 - 00:40 at Koala - AI for Software Engineering (2) Chair(s): Tse-Hsun (Peter) Chen

Code comment generation which aims to automatically generate natural language descriptions for source code, is a crucial task in the field of automatic software development. Traditional comment generation methods use manually-crafted templates or information retrieval (IR) techniques to generate summaries for source code. In recent years, neural network-based methods which leveraged acclaimed encoder-decoder deep learning framework to learn comment generation patterns from a large-scale parallel code corpus, have achieved impressive results. However, these emerging methods only take code-related information as input. Software reuse is common in the process of software development, meaning that comments of similar code snippets are helpful for comment generation. Inspired by the IR-based and template-based approaches, in this paper, we propose a neural comment generation approach where we use the existing comments of similar code snippets as exemplars to guide comment generation. Specifically, given a piece of code, we first use an IR technique to retrieve a similar code snippet and treat its comment as an exemplar. Then we design a novel seq2seq neural network that takes the given code, its AST, its similar code, and its exemplar as input, and leverages the information from the exemplar to assist in the target comment generation based on the semantic similarity between the source code and the similar code. We evaluate our approach on a large-scale Java corpus, which contains about 2M samples, and experimental results demonstrate that our model outperforms the state-of-the-art methods by a substantial margin.

Wed 23 Sep
Times are displayed in time zone: (UTC) Coordinated Universal Time

00:00 - 01:00: AI for Software Engineering (2)Research Papers at Koala
Chair(s): Tse-Hsun (Peter) ChenConcordia University
00:00 - 00:20
A Deep Multitask Learning Approach for Requirements Discovery and Annotation from Open Forum
Research Papers
Mingyang LiISCAS, Lin ShiISCAS, Ye YangStevens institute of technology, Qing WangInstitute of Software, Chinese Academy of Sciences
00:20 - 00:40
Retrieve and Refine: Exemplar-based Neural Comment Generation
Research Papers
Bolin WeiPeking University, Yongmin LiPeking University, Ge LiPeking University, Xin XiaMonash University, Zhi JinPeking University
00:40 - 01:00
Where Shall We Log? Studying and Suggesting Logging Locations in Code Blocks
Research Papers
Zhenhao LiConcordia University, Tse-Hsun (Peter) ChenConcordia University, Weiyi ShangConcordia University