paperbot · PL 论文追踪

全部论文 待读 收藏

P2 Automatic Generation of Pull Request Descriptions

自动生成 Pull Request 描述
ASE 2019 34th IEEE/ACM International Conference on Automated Software Engineering (ASE)2019匹配度 2/10 · 该论文属于基于seq2seq的PR描述自动生成,是软件工程/开发者工具方向的NLP应用,并未涉及静态分析、形式化验证、浮点程序分析或贝叶斯程序分析,也未使用LLM/Agent,因此与用户核心研究方向匹配度很低。引用 111 inbox
Zhongxin Liu, Xin Xia, Christoph Treude, David Lo, Shanping Li
crossref: 2026-09-12

AI 速览

一句话:提出基于 commit message 与代码注释的 seq2seq 方法,自动生成 Pull Request 描述。

Pull Request(PR)描述有助于评审者快速理解变更,但大量 PR 缺少描述:在 333K+ PR 数据集中超过 34% 为空。论文将 PR 描述生成视为文本摘要任务,以 PR 中的 commit message 和新增加的源码注释为输入,采用序列到序列模型,并针对软件工件中的未登录词引入指针生成器(pointer generator),同时用强化学习和特殊损失函数直接优化 ROUGE。作者构建了超过 41K 个 PR 的数据集,用 ROUGE 和人工评估验证;结果表明该方法在两个基线上均有显著提升。

问题
PR 描述能帮助评审者理解变更,但许多 PR 未写描述,影响评审效率与 PR 被接受的可能性;如何自动生成有用的 PR 描述。
方法
将问题建模为文本摘要,基于 commit message 和新增源码注释,使用带指针生成器的 seq2seq 模型,并用强化学习与特殊损失函数直接优化 ROUGE。
评估
在自建的 41K+ PR 数据集上,使用 ROUGE 和人工评估与两个基线比较,结果表明方法显著优于基线。
原文摘要(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.

链接与引用

DOI 原文 ·

BibTeX
@inproceedings{paperbot5293,
  title = {Automatic Generation of Pull Request Descriptions},
  author = {Zhongxin Liu and Xin Xia and Christoph Treude and David Lo and Shanping Li},
  booktitle = {ASE},
  year = {2019},
  doi = {10.1109/ase.2019.00026}
}