arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2206.10430cs.SE
收藏

自动提取请求标题生成

Automatic Pull Request Title Generation

Ting Zhang, Ivana Clairine Irsan, Ferdian Thung, DongGyun Han, David Lo, Lingxiao Jiang

摘要:

Pull Requests(PR)是现代协作编码平台(如GitHub)上的一种机制。PR允许开发人员告诉其他人他们的代码更改可以合并到存储库中的另一个分支中。在将更改合并到分支之前,PR需要由存储库的核心团队进行审查和批准。通常,评审员需要在提供评审之前确定符合其兴趣的PR。默认情况下,请购单排列在显示请购单标题的列表视图中。因此,希望有一个精确和简洁的标题,这对评审人员和其他开发人员都有好处。然而,开发人员通常不会提供好的标题;我们发现许多现有的PR标题要么长度不合适(即,太短或太长)或无法传达有用信息,这可能导致PR被忽略或拒绝。因此,需要自动技术来帮助开发人员起草高质量的标题。在本文中,我们介绍的任务,自动生成公关标题。我们将任务制定为一句话总结任务。为了便于对这项任务的研究,我们构建了一个由来自495个GitHub存储库的43,816个PR组成的数据集。我们评估了自动PR标题生成任务的最先进的摘要方法。我们利用ROUGE指标来自动评估摘要方法并进行手动评估。实验结果表明,BART是产生满意的PR标题的最佳技术,ROUGE-1,ROUGE-2和ROUGE-L的F1分数分别为47.22,25.27和43.12。人工评估还显示,BART生成的标题是首选。

英文摘要:

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 a precise and concise title, 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 manual 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 manual evaluation also shows that the titles generated by BART are preferred.

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑