Publication Type

Book Chapter

Version

publishedVersion

Publication Date

6-2021

Abstract

During the development and maintenance of a software system, developers produce many digital artifacts besides source code, e.g., requirement documents, code comments, change history, bug reports, etc. Such artifacts are valuable for developers to understand and maintain the software system. However, creating software artifacts can be burdensome and developers sometimes neglect to write and maintain important artifacts. This problem can be alleviated by software artifact generation tools, which can assist developers in creating software artifacts and automatically generate artifacts to replace existing empty ones. The focus of this chapter is automated software artifact generation (hereon, SAG) using seq2seq learning. This research direction is inspired by the similarities between natural language generation (NLG) and SAG and the effectiveness of seq2seq models on NLG tasks. When applied to SAG, seq2seq models are able to automatically learn generation patterns from massive software artifact data and adaptively adopt such learned patterns for generation. Compared to template-based and IR-based techniques, seq2seq-model-based approaches do not require expensive manual efforts to summarize and implement templates or rules, are not limited to term-based summaries, are able to produce novel expressions and can be more general. In addition, seq2seq learning is developing rapidly and there are more and more publicly available software artifacts on the Internet, which make seq2seq-model-based SAG a timely and promising research direction. This chapter aims to provide a comprehensive introduction to this research direction, i.e., seq2seq-model-based SAG. Specifically, we first introduce the preliminary knowledge of seq2seq models, including the RNN, the encoder-decoder model, the attention mechanism, and some commonly-used evaluation metrics for SAG (Sec. 5.2). Next, three case studies, i.e., code comment generation, pull request description generation, and app review response generation, are presented to illustrate how to build SE-task-specific parallel corpora for seq2seq models and how to customize seq2seq models in a SE-task-specific way (Secs. 5.3–5.5).

Discipline

Artificial Intelligence and Robotics | Software Engineering

Research Areas

Software and Cyber-Physical Systems

Publication

Artificial intelligence: Methods for software engineering

Editor

M. Kalech, R. Abreu, & M. Last

First Page

111

Last Page

140

ISBN

9789811239939

Identifier

10.1142/9789811239922_0005

Publisher

World Scientific

City or Country

Singapore

Copyright Owner and License

Publisher

Additional URL

https://doi.org/10.1142/9789811239922_0005

Share

COinS