当前位置: X-MOL 学术Empir. Software Eng. › 论文详情
Our official English website, www.x-mol.net, welcomes your feedback! (Note: you will need to create a separate account there.)
On the impact of using trivial packages: an empirical case study on npm and PyPI
Empirical Software Engineering ( IF 3.5 ) Pub Date : 2020-01-09 , DOI: 10.1007/s10664-019-09792-9
Rabe Abdalkareem , Vinicius Oda , Suhaib Mujahid , Emad Shihab

Code reuse has traditionally been encouraged since it enables one to avoid re-inventing the wheel. Due to the npm left-pad package incident where a trivial package led to the breakdown of some of the most popular web applications such as Facebook and Netflix, some questioned such reuse. Reuse of trivial packages is particularly prevalent in platforms such as npm. To date, there is no study that examines the reason why developers reuse trivial packages other than in npm. Therefore, in this paper, we study two large platforms npm and PyPI. We mine more than 500,000 npm packages and 38,000 JavaScript applications and more than 63,000 PyPI packages and 14,000 Python applications to study the prevalence of trivial packages. We found that trivial packages are common, making up between 16.0% to 10.5% of the studied platforms. We performed surveys with 125 developers who use trivial packages to understand the reasons and drawbacks of their use. Our surveys revealed that trivial packages are used because they are perceived to be well implemented and tested pieces of code. However, developers are concerned about maintaining and the risks of breakages due to the extra dependencies trivial packages introduce. To objectively verify the survey results, we validate the most cited reason and drawback. We find that contrary to developers’ beliefs only around 28% of npm and 49% PyPI trivial packages have tests. However, trivial packages appear to be ‘deployment tested’ and to have similar test, usage and community interest as non-trivial packages. On the other hand, we found that 18.4% and 2.9% of the studied trivial packages have more than 20 dependencies in npm and PyPI, respectively.

中文翻译:

关于使用普通包的影响:关于 npm 和 PyPI 的实证案例研究

传统上鼓励代码重用,因为它可以避免重新发明轮子。由于 npm left-pad 包事件,一个微不足道的包导致一些最流行的网络应用程序(如 Facebook 和 Netflix)崩溃,一些人质疑这种重用。在 npm 等平台中,重复使用琐碎的包特别普遍。迄今为止,还没有研究检查开发人员为什么在 npm 之外重用普通包的原因。因此,在本文中,我们研究了两个大型平台 npm 和 PyPI。我们挖掘了超过 500,000 个 npm 包和 38,000 个 JavaScript 应用程序以及超过 63,000 个 PyPI 包和 14,000 个 Python 应用程序,以研究琐碎包的普遍性。我们发现琐碎的包很常见,占所研究平台的 16.0% 到 10.5%。我们对 125 名使用琐碎软件包的开发人员进行了调查,以了解使用它们的原因和缺点。我们的调查显示,使用琐碎的包是因为它们被认为是很好地实现和测试的代码片段。但是,开发人员担心维护和由于琐碎的包引入的额外依赖项而导致的损坏风险。为了客观验证调查结果,我们验证了引用最多的原因和缺点。我们发现与开发人员的看法相反,只有大约 28% 的 npm 和 49% 的 PyPI 琐碎包有测试。然而,平凡的包似乎经过“部署测试”,并且与非平凡的包具有类似的测试、使用和社区兴趣。另一方面,我们发现 18.4% 和 2.9% 的研究琐碎包在 npm 和 PyPI 中有超过 20 个依赖项,
更新日期:2020-01-09
down
wechat
bug