Skip to main content
QUICK REVIEW

[论文解读] Which Pull Requests Get Accepted and Why? A study of popular NPM Packages

Tapajit Dey, Audris Mockus|arXiv (Cornell University)|Mar 2, 2020
Software Engineering Research参考文献 29被引用 12
一句话总结

本研究开发了一种随机森林模型,用于预测在流行 NPM 包中,拉取请求(PR)在一个月内被接受的可能性,使用来自作者活动、PR 元数据和项目上下文的 14 个关键预测因子。该模型的 AUC-ROC 达到 0.95,表明在预测 PR 接受方面具有高准确性,且开发者声誉指标和早期 PR 特征具有强大的预测能力。

ABSTRACT

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 extit{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.

研究动机与目标

  • 识别在流行 NPM 包中,哪些拉取请求最有可能在一个月内被接受。
  • 理解作者特征、PR 属性和项目上下文对 PR 接受概率的影响。
  • 构建一个预测模型,以支持 PR 整合者优先处理工作,以及贡献者改进其提交质量。
  • 仅使用合并前的 PR 属性评估模型性能,以确保其实际适用性。

提出的方法

  • 通过 GitHub API 从 4,218 个流行 NPM 包(月下载量 ≥10,000 次)中收集了 483,988 个 PR。
  • 提取了 50 个预测因子,涵盖作者活动(例如提交次数、项目数、代码块数)、PR 元数据(例如文件数量、修改行数)以及项目级特征(例如星标数、问题数)。
  • 基于历史 PR 接受数据训练随机森林分类器,以预测 PR 在创建后一个月内被接受的可能性。
  • 通过模型调优和特征重要性分析,筛选出 14 个最具预测力的特征。
  • 使用 AUC-ROC 在完整特征集和仅合并前特征集上评估模型性能。
  • 通过在历史数据上进行训练,并在 bootstrap 包的未来 PR 上进行测试,验证了其实际应用价值。

实验结果

研究问题

  • RQ1哪些拉取请求的特征最能预测其在提交后一个月内被接受?
  • RQ2开发者声誉和经验度量如何影响 PR 被接受的可能性?
  • RQ3在仅使用 PR 创建时可获得的信息的前提下,PR 接受程度在多大程度上可以被预测?
  • RQ4合并后 PR 属性(如评论、评审意见)的引入在多大程度上提升了预测准确性?

主要发现

  • 当使用全部 14 个选定预测因子时,模型的 AUC-ROC 达到 0.95,表明对 PR 接受的预测具有高准确性。
  • 即使排除合并后的 PR 属性(如评论、评审评论),AUC-ROC 仍达到 0.89,表明早期信号具有强大鲁棒性。
  • 在 bootstrap 包的未来 PR 上测试时,使用全部 14 个预测因子,模型 AUC-ROC 达到 0.94,证实了其实际预测能力。
  • 当排除合并后的 PR 属性时,模型性能下降至 AUC-ROC 0.77,凸显了动态交互信号的价值。
  • 在超过 700 个项目中拥有经验、提交超过 1,000 次、处理超过 3,000 个代码块的作者,其 PR 接受概率显著提高,表明存在声誉阈值效应。
  • 出人意料的是,项目流行度指标(如星标数、分叉数)和问题修复指标并非显著预测因子,表明其对接受决策影响有限。

更好的研究,从现在开始

从阅读论文到最终审阅,大幅缩短您的研究时间。

无需绑定信用卡

本解读由 AI 生成,并经人工编辑审核。