A Comprehensive Study of Bloated Dependencies in the Maven Ecosystem

César Soto-Valero, Nicolas Harrand, Martin Monperrus, Benoit Baudry
1/21/2020
cs.SE

Official code: ASSERT-KTH/depclean (364 stars, Java, MIT, last commit 2026-11-17).

Abstract

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.

Show full abstract

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.

View on arXivView PDF

Code Implementations(1)

MIT

DepClean automatically detects and removes unused dependencies in Java Maven projects. Paper: https://dx.doi.org/10.1007/s10664-020-09914-8)

36438Java, GroovyNov 29, 20192 weeks agoMIT
bloatwarebytecodedebloatingdependenciesjava+1 more

Similar Papers

Cite this paper

@article{sotovalero2020comprehensive,
  title  = {A Comprehensive Study of Bloated Dependencies in the Maven Ecosystem},
  author = {César Soto-Valero and Nicolas Harrand and Martin Monperrus and Benoit Baudry},
  year   = {2020},
  eprint = {2001.07808},
  archivePrefix = {arXiv},
  url    = {https://arxiv.org/abs/2001.07808}
}

Add a badge to your README

Shows whether official code is linked for this paper.

Code of Paper badge
[![Code of Paper](https://codeofpaper.com/badge/2001.07808.svg)](https://codeofpaper.com/paper/2001.07808)

Discussion