How Does API Migration Impact Software Quality and Comprehension? An Empirical Study

Hussein Alrubaye,Deema Alshoaibi,Eman Alomar,Mohamed Wiem Mkaouer,Ali Ouni
DOI: https://doi.org/10.48550/arXiv.1907.07724
2020-10-02
Abstract:The migration process between different third-party software libraries is hard, complex and error-prone. Typically, during a library migration process, developers opt to replace methods from the retired library with other methods from a new library without altering the software behavior. However, the extent to which such a migration process to new libraries will be rewarded with an improved software quality is still unknown. In this paper, we aim at studying and analyzing the impact of library API migration on software quality. We conduct a large-scale empirical study on 9 popular API migrations, collected from a corpus of 57,447 open-source Java projects. We compute the values of commonly-used software quality metrics before and after a migration occurs. The statistical analysis of the obtained results provides evidence that library migrations are likely to improve different software quality attributes including significantly reduced coupling, increased cohesion, and improved code readability. Furthermore, we release an online portal that helps software developers to understand the pre-impact of a library migration on software quality and recommend migration examples that adopt the best design and implementation practices to improve software quality. Finally, we provide the software engineering community with a large scale dataset to foster research in software library migration.
Software Engineering
What problem does this paper attempt to address?
The problem that this paper attempts to solve is the impact of third - party software library migration on software quality and its comprehensibility. Specifically, the goal of the paper is to study the impact of API migration on software design quality. Through large - scale empirical research, the authors analyzed 9 popular API migration cases, which were collected from 57,447 open - source Java projects. They calculated the values of commonly used software quality indicators before and after the migration, and evaluated whether library migration can improve different quality attributes of software, such as reducing coupling, increasing cohesion, and improving code readability, by statistically analyzing the results. The main contributions of the paper include: 1. Released an online portal that shows actual migration fragments and their positive or negative impacts on coupling, cohesion, and readability. 2. Proposed a Migration Quality Score (MQS) for recommending migration examples that can ensure better software quality and understanding. 3. Verified the ability of MQS in recommending high - quality migration examples through surveys of senior software engineers, which is helpful for API reuse. Through these studies, the authors hope to support the software engineering community to better understand and handle the challenges in the library migration process while maintaining or improving software design quality and code readability.