论文标题

对Maven生态系统中肿的依赖性的全面研究

A Comprehensive Study of Bloated Dependencies in the Maven Ecosystem

论文作者

Soto-Valero, César, Harrand, Nicolas, Monperrus, Martin, Baudry, Benoit

论文摘要

构建自动化工具和软件包管理人员对软件开发产生了深远的影响。它们促进了第三方库的重复使用,支持应用程序代码及其外部依赖关系之间的明确分离,并自动化几个软件开发任务。但是,这些工具的广泛采用引入了与依赖管理有关的新挑战。在本文中,我们提出了一项关于一个这样一个挑战的原始研究:肿的依赖性的出现。 肿的依赖关系是使用应用程序编译的代码构建工具包的库,但实际上并不需要构建和运行应用程序。这种现象人为地增长了建筑二进制的大小,并增加了维护工作。我们提出了一种称为DepClean的工具,以分析Maven伪像中肿的依赖性的存在。我们分析了在Maven Central上托管的9,639个Java工件,其中总共包括723,444个依赖关系。我们的关键结果是,分析的依赖关系中有75.1%被肿。换句话说,将Maven工件的依赖性数量减少到其当前数量的1/4是可行的。我们还通过30个著名的开源项目进行了定性研究。我们的结果表明,开发人员注意他们的依赖性,并愿意消除肿的依赖性:开发人员接受并合并了18/21回答的拉动请求,总共消除了131个依赖关系。

Build automation tools and package managers have a profound influence on software development. They facilitate the reuse of third-party libraries, support a clear separation between the application's code and its external dependencies, and automate several software development tasks. However, the wide adoption of these tools introduces new challenges related to dependency management. In this paper, we propose an original study of one such challenge: the emergence of bloated dependencies. Bloated dependencies are libraries that the build tool packages with the application's compiled code but that are actually not necessary to build and run the application. This phenomenon artificially grows the size of the built binary and increases maintenance effort. We propose a tool, called DepClean, to analyze the presence of bloated dependencies in Maven artifacts. We analyze 9,639 Java artifacts hosted on Maven Central, which include a total of 723,444 dependency relationships. Our key result is that 75.1% of the analyzed dependency relationships are bloated. In other words, it is feasible to reduce the number of dependencies of Maven artifacts up to 1/4 of its current count. We also perform a qualitative study with 30 notable open-source projects. Our results indicate that developers pay attention to their dependencies and are willing to remove bloated dependencies: 18/21 answered pull requests were accepted and merged by developers, removing 131 dependencies in total.

扫码加入交流群

加入微信交流群

微信交流群二维码

扫码加入学术交流群,获取更多资源