Analyzing 2.3 Million Maven Dependencies to Reveal an Essential Core in APIs
Preprint
Abstract
This paper addresses the following question: does a small, essential, core set of API members emerges from the actual usage of the API by client applications? To investigate this question, we study the 99 most popular libraries available in Maven Central and the 865,560 client programs that declare dependencies towards them, summing up to 2.3M dependencies. Our key findings are as follows: 43.5% of the dependencies declared by the clients are not used in the bytecode; all APIs contain a large part of rarely used types and a few frequently used types, and the ratio varies according to the nature of the API, its size and its design; we can systematically extract a reuse-core from APIs that is sufficient to provide for most clients, the median size of this subset is 17% of the API that can serve 83% of the clients. This study is novel both in its scale and its findings about unused dependencies and the reuse-core of APIs. Our results provide concrete insights to improve Maven's build process with a mechanism to detect unused dependencies. They also support the need to reduce the size of APIs to facilitate API learning and maintenance.Keywords
All Related Versions
This publication has 8 references indexed in Scilit:
- API trustworthiness: an ontological approach for software library adoptionSoftware Quality Journal, 2019
- An empirical comparison of dependency network evolution in seven software packaging ecosystemsEmpirical Software Engineering, 2018
- On the reaction to deprecation of clients of 4 + 1 popular Java APIs and the JDKEmpirical Software Engineering, 2017
- Semantic versioning and impact of breaking changes in the Maven repositoryJournal of Systems and Software, 2017
- fine-GRAPE: fine-grained APi usage extractor – an approach and dataset to investigate API usageEmpirical Software Engineering, 2016
- Understanding the API usage in JavaInformation and Software Technology, 2016
- Cascading extinctions and community collapse in model food websPhilosophical Transactions of the Royal Society B: Biological Sciences, 2009
- Effects of reuse on quality, productivity, and economicsIEEE Software, 1994