どのプルリクエストが承認され、なぜなのか:人気のある NPM パッケージに関する研究
Which Pull Requests Get Accepted and Why? A study of popular NPM Packages
Which Pull Requests Get Accepted and Why? A study of popular NPM Packages
@misc{dey2020which,
title = {Which Pull Requests Get Accepted and Why? A study of popular NPM Packages},
author = {Tapajit Dey and Audris Mockus},
year = {2020},
eprint = {2003.01153},
archivePrefix = {arXiv},
primaryClass = {cs.SE},
url = {https://arxiv.org/abs/2003.01153}
}
Dey, T., & Mockus, A. (2020). Which Pull Requests Get Accepted and Why? A study of popular NPM Packages [Preprint]. arXiv. https://doi.org/10.48550/arXiv.2003.01153
DEY T, MOCKUS A. Which Pull Requests Get Accepted and Why? A study of popular NPM Packages[EB/OL]. (2020-03-02)[2026-11-29]. https://arxiv.org/abs/2003.01153.
要旨
背景:プルリクエスト(PR)統合者は、複数の並行 PR に対処する際に課題に直面することが多く、どの PR が承認されるかを予測する能力は、作業負荷のバランスに役立ちます。PR 作成者は、自身の PR の特定の特性が承認確率を高める可能性があるかを知ることで利益を得られます。目的:著者、PR、および PR が投稿されるプロジェクトの特性を表す 50 つの予測変数を用いたランダムフォレストモデルを用いて、PR の作成から 1 ヶ月以内に承認される確率をモデル化しました。方法:4,218 つの人気の NPM パッケージから 483,988 つの PR を分析し、調整されたランダムフォレストモデルが高精度を達成するために十分であると考えられる 14 つの予測変数のサブセットを選択しました。結果:PR の承認を予測する AUC-ROC 値は 0.95 を達成しました。投稿後に変更される PR の特性を除外したモデルでは、AUC-ROC 値は 0.89 でした。NPM パッケージ bootstrap の歴史的データを用いてモデルを訓練し、将来投稿される PR が承認されるかを予測することで、実用的なシナリオにおけるモデルの有用性を検証しました。すべての 14 つの予測変数を用いた場合、AUC-ROC 値は 0.94 であり、作成後に変更される PR の特性を除外した場合は 0.77 でした。結論:PR 統合者は、当社のモデルを用いてオープンな PR の品質を高精度で評価できます。また、PR 作成者は、統合者の視点から望ましくない PR の特性を理解することで、このモデルから利益を得られます。本モデルはツールとして実装可能であり、今後の作業として計画しています。
Background: Pull Request (PR) Integrators often face challenges in terms of multiple concurrent PRs, so the ability to gauge which of the PRs will get accepted can help them balance their workload. PR creators would benefit from knowing if certain characteristics of their PRs may increase the chances of acceptance. Aim: We modeled the probability that a PR will be accepted within a month after creation using a Random Forest model utilizing 50 predictors representing properties of the author, PR, and the project to which PR is submitted. Method: 483,988 PRs from 4218 popular NPM packages were analysed and we selected a subset of 14 predictors sufficient for a tuned Random Forest model to reach high accuracy. Result: An AUC-ROC value of 0.95 was achieved predicting PR acceptance. The model excluding PR properties that change after submission gave an AUC-ROC value of 0.89. We tested the utility of our model in practical scenarios by training it with historical data for the NPM package bootstrap and predicting if the PRs submitted in future will be accepted. This gave us an AUC-ROC value of 0.94 with all 14 predictors, and 0.77 excluding PR properties that change after its creation. Conclusion: PR integrators can use our model for a highly accurate assessment of the quality of the open PRs and PR creators may benefit from the model by understanding which characteristics of their PRs may be undesirable from the integrators' perspective. The model can be implemented as a tool, which we plan to do as a future work.