Pull requests (PRs) are a mechanism on modern collaborative coding platforms, such as GitHub. PRs allow developers to tell others that their code changes are available for merging into another branch in a repository. A PR needs to be reviewed and approved by the core team of the repository before the changes are merged into the branch. Usually, reviewers need to identify a PR that is in line with their interests before providing a review. By default, PRs are arranged in a list view that shows the titles of PRs. Therefore, it is desirable to have precise and concise titles, which is beneficial for both reviewers and other developers. However, it is often the case that developers do not provide good titles; we find that many existing PR titles are either inappropriate in length (i.e., too short or too long) or fail to convey useful information, which may result in PR being ignored or rejected. Therefore, there is a need for automatic techniques to help developers draft high-quality titles. In this paper, we introduce the task of automatic generation of PR titles. We formulate the task as a one-sentence summarization task. To facilitate the research on this task, we construct a dataset that consists of 43,816 PRs from 495 GitHub repositories. We evaluated the state-of-the-art summarization approaches for the automatic PR title generation task. We leverage ROUGE metrics to automatically evaluate the summarization approaches and conduct a human evaluation. The experimental results indicate that BART is the best technique for generating satisfactory PR titles with ROUGE-1, ROUGE-2, and ROUGE-L F1 scores of 47.22, 25.27, and 43.12, respectively. The human evaluation also shows that the titles generated by BART are preferred.
翻译:调试请求(PR)是现代合作编码平台(如GitHub)上的一种机制。 调试请求允许开发商告诉其他人,他们的代码更改可用于合并到存放处中的另一个分支。 调试请求需要由存储处核心团队审查和批准,然后合并到该处。 通常, 审评员需要在进行审查之前确定符合其利益的PR; 默认情况下, 将PR安排在显示PR标题的清单视图中。 因此, 最好有精确和简洁的标题, 这对于审评员和其他开发者都有好处。 然而, 开发商往往不提供好的标题; 我们发现, 许多现有的PR标题要么在长度(即太短或太长)上不合适, 或未能传递有用的信息, 可能导致PR受到忽视或拒绝。 因此, 需要自动技术来帮助开发者起草高质量的标题。 因此, 我们在此文件中引入了自动生成PR职称的任务。 我们还将任务作为一次性的合成任务来制定任务。 我们用 REGEO AL 18 和 RPR 排名 的排序, 我们用 RO 的排序来进行自动排序 。