A large-scale empirical study on Java library migrations: prevalence, trends, and rationales
Hao He, Runzhi He, Haiqiao Gu, Minghui Zhou
Abstract
With the rise of open-source software and package hosting platforms, reusing 3rd-party libraries has become a common practice. Due to various failures during software evolution, a project may remove a used library and replace it with another library, which we call library migration. Despite substantial research on dependency management, the understanding of how and why library migrations occur is still lacking. Achieving this understanding may help practitioners optimize their library selection criteria, develop automated approaches to monitor dependencies, and provide migration suggestions for their libraries or software projects. In this paper, through a fine-grained commit-level analysis of 19,652 Java GitHub projects, we extract the largest migration dataset to-date (1,194 migration rules, 3,163 migration commits). We show that 8,065 (41.04%) projects having at least one library removal, 1,564 (7.96%, lower-bound) to 5,004 (25.46%, upper-bound) projects have at least one migration, and a median project with migrations has 2 to 4 migrations in total. We discover that library migrations are dominated by several domains (logging, JSON, testing and web service) presenting a long tail distribution. Also, migrations are highly unidirectional in that libraries are either mostly abandoned or mostly chosen in our project corpus. A thematic analysis on related commit messages, issues, and pull requests identifies 14 frequently mentioned migration reasons (e.g., lack of maintenance, usability, integration, etc), 7 of which are not discussed in previous work. Our findings can be operationalized into actionable insights for package hosting platforms, project maintainers, and library developers. We provide a replication package at https://doi.org/10.5281/zenodo.4816752.
Ask about this paper
Your agent reads all of it.
Lune indexed this paper to the last equation, along with the top-tier papers that cite it. Ask a question and the answer quotes them.
Your agent calls
Luneget_paper_fulltext
Free to start. No credit card required.
Terminal
Install the CLIlune papers fulltext b1fc983f-3e89-4c36-9799-a103e79cc130Cited by top-tier papers11
- Towards Understanding Third-party Library Dependency in C/C++ EcosystemWei Tang, Zhengzi Xu, Chengwei Liu, Jiahui Wu et al.ASE 2022 · 64 citations
- Understanding Breaking Changes in the WildDhanushka Jayasuriya, Valerio Terragni, Jens Dietrich, Samuel Ou et al.ISSTA 2023 · 19 citations
- Understanding and Remediating Open-Source License Incompatibilities in the PyPI EcosystemWeiwei Xu, Hao He, Kai Gao, Minghui ZhouASE 2023 · 13 citations
- Understanding the Impact of APIs Behavioral Breaking Changes on Client ApplicationsDhanushka Jayasuriya, Valerio Terragni, Jens Dietrich, Kelly BlincoeFSE 2024 · 8 citations
- Recommending Analogical APIs via Knowledge Graph EmbeddingMingwei Liu, Yanjun Yang, Yiling Lou, Xin Peng et al.FSE 2023 · 8 citations
Builds on5
- Small World with High Risks: A Study of Security Threats in the npm EcosystemMarkus Zimmermann, Cristian-Alexandru Staicu, Cam Tenny, Michael PradelUSENIX Security 2019 · 281 citations
- Selecting third-party libraries: the practitioners' perspectiveEnrique Larios Vargas, Maurício Finavaro Aniche, Christoph Treude, Magiel Bruntink et al.FSE 2020 · 81 citations
- Heard it through the Gitvine: an empirical study of tool diffusion across the npm ecosystemHemank Lamba, Asher Trockman, Daniel Armanios, Christian Kästner et al.FSE 2020 · 19 citations
- M3: Semantic API MigrationsBruce Collie, Philip Ginsbach, Jackson Woodruff, Ajitha Rajan et al.ASE 2020 · 14 citations
- Team Discussions and Dynamics During DevOps Tool Adoptions in OSS ProjectsLikang Yin, Vladimir FilkovASE 2020 · 7 citations
Related papers
- Understanding type changes in JavaAmeya Ketkar, Nikolaos Tsantalis, Danny DigFSE 2020 · 17 citations
- Characterizing Python Library MigrationsMohayeminul Islam, Ajay Kumar Jha, Ildar Akhmetov, Sarah NadiFSE 2024 · 3 citations
- Studying Test Annotation Maintenance in the WildDong Jae Kim, Nikolaos Tsantalis, Tse-Hsun Peter Chen, Jinqiu YangICSE 2021 · 20 citations
- A longitudinal analysis of bloated Java dependenciesCésar Soto-Valero, Thomas Durieux, Benoit BaudryFSE 2021 · 47 citations
- Understanding the Response to Open-Source Dependency Abandonment in the npm EcosystemCourtney Miller, Mahmoud Jahanshahi, Audris Mockus, Bogdan Vasilescu et al.ICSE 2025 · 5 citations
