Skip to main content
QUICK REVIEW

[Paper Review] A Study of Library Migration in Java Software

Cédric Teyton, Jean‐Rémy Falleri|arXiv (Cornell University)|Jun 26, 2013
Software Engineering ResearchComputer Science11 references4 citations
TL;DR

This study proposes a static analysis-based approach to automatically detect library migrations in Java open source software by examining source code changes across versions. It analyzes 8,600 projects from GitHub, Google Code, and SourceForge, identifying 324 migrations—revealing that older projects are more likely to migrate, logging libraries are frequently replaced (especially to slf4j), and migrations are typically quick and single-commit changes.

ABSTRACT

Software intensively depends on external libraries whose relevance may change during its life cycle. As a consequence, software developers must periodically reconsider the libraries they depend on, and must think about \ extit{library migration}. To our knowledge, no existing study has been done to understand library migration although it is known to be an expensive maintenance task. Are library migrations frequent? For which software are they performed and when? For which libraries? For what reasons? The purpose of this paper is to answer these questions with the intent to help software developers that have to replace their libraries. To that extent, we have performed a statistical analysis of a large set of open source software to mine their library migration. To perform this analysis we have defined an approach that identifies library migrations in a pseudo-automatic fashion by analyzing the source code of the software. We have implemented this approach for the Java programming language and applied it on Java Open Source Software stored in large hosting services. The main result of our study is that library migration is not a frequent practice but depends a lot on the nature of the software as well as the nature of the libraries.

Motivation & Objective

  • To understand the frequency, timing, and motivations behind library migrations in Java software, which are known to be costly but under-researched.
  • To identify which types of software and libraries are most prone to migration, and to determine common reasons and effort levels involved.
  • To provide data-driven recommendations for developers considering library replacements by mining real-world migration patterns from open source projects.
  • To extend prior work by supporting all Java open source projects, not just those using Maven, increasing the generalizability of findings.

Proposed method

  • A dependency model abstracts software projects, their versions, and library dependencies to represent migration events as changes in library sets across versions.
  • A static analysis approach identifies library migrations by detecting changes in library usage in source code, without relying on build tools like Maven.
  • The method analyzes source code across multiple versions of projects hosted on GitHub, Google Code, and SourceForge to detect when one library is replaced by another.
  • Migration detection is based on the presence of specific library classes and packages in source files, with versioned dependencies inferred from code-level usage.
  • The approach is applied to 8,600 open source Java projects, resulting in the identification of 324 actual library migration events.
  • The study uses statistical analysis to answer research questions about migration frequency, target libraries, timing, reasons, and effort.

Experimental results

Research questions

  • RQ1Which software projects perform library migrations, and what proportion of projects are affected?
  • RQ2Which libraries are most frequently migrated, and are there patterns in source or target libraries?
  • RQ3When are migrations typically performed, and is there a temporal pattern?
  • RQ4What are the main reasons for library migrations, and how are they documented?
  • RQ5How much effort is typically required to perform a migration, measured in commits, time, and developers?

Key findings

  • Only 3.8% of the 8,600 analyzed projects performed at least one library migration, indicating that migration is not a frequent practice overall.
  • Older projects are significantly more likely to migrate than younger ones—10% of old projects migrated, compared to less than 1% of young projects.
  • Very few projects (less than 1%) performed two or more migrations during their lifetime, suggesting migration is typically a one-time effort.
  • The logging library category is the most active in migrations, with slf4j emerging as the primary target, replacing libraries like log4j and commons-logging.
  • Migrations are typically performed quickly: 90% of migrations were committed in a single commit, within one day, and by a single developer.
  • Only 12 migration logs contained explicit reasons, indicating a lack of documentation for migration motivations, limiting insight into driving factors.

Read this paper

Open the full text in the Nubint reader and ask about any passage as you read.

Read this paper on Nubint

This review was generated by AI from the original paper. Please check the paper before citing it.