Quais Pull Requests são Aceitos e Por Que? Um estudo sobre pacotes populares do 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.
Resumo
Fundo: Integradores de Pull Requests (PRs) frequentemente enfrentam desafios relacionados a múltiplos PRs concorrentes; portanto, a capacidade de avaliar quais PRs terão maior probabilidade de serem aceitos pode ajudá-los a equilibrar sua carga de trabalho. Os criadores de PRs beneficiam-se ao saber se certas características de seus PRs podem aumentar as chances de aceitação. Objetivo: Modelamos a probabilidade de um PR ser aceito dentro de um mês após sua criação utilizando um modelo Random Forest com 50 preditores representando propriedades do autor, do PR e do projeto para o qual o PR é submetido. Método: Foram analisados 483.988 PRs de 4.218 pacotes populares do NPM e selecionamos um subconjunto de 14 preditores suficientes para que um modelo Random Forest ajustado alcance alta precisão. Resultado: Foi alcançado um valor de AUC-ROC de 0,95 na previsão da aceitação de PRs. O modelo excluindo propriedades do PR que mudam após a submissão obteve um valor de AUC-ROC de 0,89. Testamos a utilidade do nosso modelo em cenários práticos treinando-o com dados históricos do pacote NPM bootstrap e prevendo se os PRs submetidos no futuro serão aceitos. Isso resultou em um valor de AUC-ROC de 0,94 com todos os 14 preditores e de 0,77 excluindo propriedades do PR que mudam após sua criação. Conclusão: Integradores de PRs podem utilizar nosso modelo para uma avaliação altamente precisa da qualidade de PRs abertos, e os criadores de PRs podem se beneficiar do modelo ao compreender quais características de seus PRs podem ser indesejáveis do ponto de vista dos integradores. O modelo pode ser implementado como uma ferramenta, o que planejaremos fazer como trabalho futuro.
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.