[论文解读] What makes a good Node.js package? Investigating Users, Contributors, and Runnability
本研究通过分析开发者作为用户和贡献者视角,探究了优秀 Node.js 包的特征。通过对 33 名开发者的调查,识别出共享与独特的质量指标,并分析了 104,364 个 npm 包,发现可运行性——尤其是可执行代码片段和测试成功率——与包质量高度相关,且可通过文件数量和提交历史等特征进行预测。
The Node.js Package Manager (i.e., npm) archive repository serves as a critical part of the JavaScript community and helps support one of the largest developer ecosystems in the world. However, as a developer, selecting an appropriate npm package to use or contribute to can be difficult. To understand what features users and contributors consider important when searching for a good npm package, we conduct a survey asking Node.js developers to evaluate the importance of 30 features derived from existing work, including GitHub activity, software usability, and properties of the repository and documentation. We identify that both user and contributor perspectives share similar views on which features they use to assess package quality. We then extract the 30 features from 104,364 npm packages and analyse the correlations between them, including three software features that measure package ``runnability"; ability to install, build, and execute a unit test. We identify which features are negatively correlated with runnability-related features and find that predicting the runnability of packages is viable. Our study lays the groundwork for future work on understanding how users and contributors select appropriate npm packages.
研究动机与目标
- 理解开发人员在选择或贡献 npm 包时所使用的标准。
- 比较用户与贡献者对包质量特征的视角差异或一致性。
- 通过可安装性、可构建性和测试执行情况,评估 npm 包的可运行性。
- 基于来自 104,364 个包的实证数据,识别可运行性的预测特征。
- 为未来工作提供基础,以支持同时考虑用户与贡献者需求的包推荐和质量度量。
提出的方法
- 对 33 名 Node.js 开发者开展在线调查,评估 30 种包质量特征的重要性。
- 将特征分类为四类:文档、仓库、软件(可运行性)和 GitHub 活动。
- 使用 GH-Node.js 数据集收集并分析 104,364 个 npm 包的数据,以衡量可运行性及特征之间的相关性。
- 通过三项指标评估可运行性:包的安装成功率、构建成功率以及代码片段的测试执行成功率。
- 使用统计相关性分析识别特征与可运行性之间的关系。
- 基于特征重要性构建可运行性的预测模型,结果显示不同可运行性指标的预测能力存在差异。
实验结果
研究问题
- RQ1实践者认为哪些 npm 包特征对评估包质量具有相关性?
- RQ2用户与贡献者对包质量的视角在哪些方面不同或一致?
- RQ3包特征与可运行性(安装、构建、测试执行)之间存在何种相关性?
- RQ4能否使用静态特征和活动特征来预测 npm 包的可运行性?
- RQ5哪些特征对 npm 包的成功安装、构建和测试执行最具预测力?
主要发现
- 用户与贡献者对包质量的看法相似,30 项特征中有 50% 同时与两者相关。
- 文档和软件可运行性特征被用户组与贡献者组均视为高度重要。
- 仓库特征如文件数量和提交历史未被开发者视为质量指标。
- 在 104,364 个 npm 包中,92.95% 可成功安装,61.59% 的包在 README 中至少包含一个代码片段,但仅有 15.20% 的 220,324 个代码片段可执行。
- 在 2020 年更新的 11,127 个包中,73.68% 可成功构建,但仅有 7.40% 的包通过了所有测试用例,表明测试可运行性较低。
- 可运行性预测是可行的,文件数量和提交历史与可安装性高度相关,但与可构建性相关性较弱。
更好的研究,从现在开始
从阅读论文到最终审阅,大幅缩短您的研究时间。
无需绑定信用卡
本解读由 AI 生成,并经人工编辑审核。