Publication Type
Conference Proceeding Article
Version
acceptedVersion
Publication Date
11-2019
Abstract
Enabled by the pull-based development model, developers can easily contribute to a project through pull requests (PRs). When creating a PR, developers can add a free-form description to describe what changes are made in this PR and/or why. Such a description is helpful for reviewers and other developers to gain a quick understanding of the PR without touching the details and may reduce the possibility of the PR being ignored or rejected. However, developers sometimes neglect to write descriptions for PRs. For example, in our collected dataset with over 333K PRs, more than 34% of the PR descriptions are empty. To alleviate this problem, we propose an approach to automatically generate PR descriptions based on the commit messages and the added source code comments in the PRs. We regard this problem as a text summarization problem and solve it using a novel sequence-to-sequence model. To cope with out-of-vocabulary words in software artifacts and bridge the gap between the training loss function of the sequence-to-sequence model and the evaluation metric ROUGE, which has been shown to correspond to human evaluation, we integrate the pointer generator and directly optimize for ROUGE using reinforcement learning and a special loss function. We build a dataset with over 41K PRs and evaluate our approach on this dataset through ROUGE and a human evaluation. Our evaluation results show that our approach outperforms two baselines by significant margins.
Keywords
Document Generation, Pull Request, Sequence to Sequence Learning
Discipline
Databases and Information Systems | Software Engineering
Research Areas
Software and Cyber-Physical Systems
Publication
ASE '19: Proceedings of the 34th ACM/IEEE International Conference on Automated Software Engineering, San Diego, November 11-15
First Page
176
Last Page
188
ISBN
9781728125084
Identifier
10.1109/ASE.2019.00026
Publisher
ACM
City or Country
New York
Embargo Period
8-2-2023
Citation
LIU, Zhongxin; XIA, Xin; TREUDE, Christoph; LO, David; and LI, Shanping.
Automatic generation of pull request descriptions. (2019). ASE '19: Proceedings of the 34th ACM/IEEE International Conference on Automated Software Engineering, San Diego, November 11-15. 176-188.
Available at: https://ink.library.smu.edu.sg/sis_research/7948
Copyright Owner and License
Authors
Creative Commons License
This work is licensed under a Creative Commons Attribution-NonCommercial-No Derivative Works 4.0 International License.
Additional URL
https://doi.org/10.1109/ASE.2019.00026