An exploratory study of api changes and usages based on apache and eclipse ecosystems

Frameworks are widely used in modern software development to reduce development costs. They are accessed through their Application Programming Interfaces (APIs), which specify the contracts with client programs. When frameworks evolve, API backward-compatibility cannot always be guaranteed and client programs must upgrade to use the new releases. Because framework upgrades are not cost-free, observing API changes and usages together at fine-grained levels is necessary to help developers understand, assess, and forecast the cost of each framework upgrade. Whereas previous work studied API changes in frameworks and API usages in client programs separately, we analyse and classify API changes and usages together in 22 framework releases from the Apache and Eclipse ecosystems and their client programs. We find that (1) missing classes and methods happen more often in frameworks and affect client programs more often than the other API change types do, (2) missing interfaces occur rarely in frameworks but affect client programs often, (3) framework APIs are used on average in 35 % of client classes and interfaces, (4) most of such usages could be encapsulated locally and reduced in number, and (5) about 11 % of APIs usages could cause ripple effects in client programs when these APIs change. Based on these findings, we provide suggestions for developers and researchers to reduce the impact of API evolution through language mechanisms and design strategies.

[1]  Marco Tulio Valente,et al.  Documenting APIs with examples: Lessons learned with the APIMiner platform , 2013, 2013 20th Working Conference on Reverse Engineering (WCRE).

[2]  Ralf Lämmel,et al.  Multi-dimensional exploration of API usage , 2013, 2013 21st International Conference on Program Comprehension (ICPC).

[3]  Miryung Kim,et al.  An Empirical Study of API Stability and Adoption in the Android Ecosystem , 2013, 2013 IEEE International Conference on Software Maintenance.

[4]  Ralph E. Johnson,et al.  Refactoring-Aware Configuration Management for Object-Oriented Programs , 2007, 29th International Conference on Software Engineering (ICSE'07).

[5]  Jens Dietrich,et al.  On the Automation of Dependency-Breaking Refactorings in Java , 2013, 2013 IEEE International Conference on Software Maintenance.

[6]  Jing Li,et al.  The Qualitas Corpus: A Curated Collection of Java Code for Empirical Studies , 2010, 2010 Asia Pacific Software Engineering Conference.

[7]  Michael W. Godfrey,et al.  Using origin analysis to detect merging and splitting of source code entities , 2005, IEEE Transactions on Software Engineering.

[8]  Jens Dietrich,et al.  Broken promises: An empirical study into evolution problems in Java programs caused by library upgrades , 2014, 2014 Software Evolution Week - IEEE Conference on Software Maintenance, Reengineering, and Reverse Engineering (CSMR-WCRE).

[9]  Gabriele Bavota,et al.  How do API changes trigger stack overflow discussions? a study on the Android SDK , 2014, ICPC 2014.

[10]  Oscar Nierstrasz,et al.  Traits: Composable Units of Behaviour , 2002, ECOOP.

[11]  Wei Wu,et al.  AURA: a hybrid approach to identify framework evolution , 2010, 2010 ACM/IEEE 32nd International Conference on Software Engineering.

[12]  Qing Wang,et al.  Mining API mapping for language migration , 2010, 2010 ACM/IEEE 32nd International Conference on Software Engineering.

[13]  Tao Xie,et al.  SpotWeb: Detecting Framework Hotspots and Coldspots via Mining Open Source Code on the Web , 2008, 2008 23rd IEEE/ACM International Conference on Automated Software Engineering.

[14]  Arie van Deursen,et al.  Semantic Versioning versus Breaking Changes: A Study of the Maven Repository , 2014, 2014 IEEE 14th International Working Conference on Source Code Analysis and Manipulation.

[15]  Alexander Serebrenik,et al.  An empirical study of the evolution of Eclipse third-party plug-ins , 2010, IWPSE-EVOL '10.

[16]  Martin P. Robillard,et al.  Patterns of Knowledge in API Reference Documentation , 2013, IEEE Transactions on Software Engineering.

[17]  Eleni Stroulia,et al.  Differencing logical UML models , 2007, Automated Software Engineering.

[18]  Ralph E. Johnson,et al.  Automated Detection of Refactorings in Evolving Components , 2006, ECOOP.

[19]  William R. Cook,et al.  Mixin-based inheritance , 1990, OOPSLA/ECOOP '90.

[20]  Gabriele Bavota,et al.  The Evolution of Project Inter-dependencies in a Software Ecosystem: The Case of Apache , 2013, 2013 IEEE International Conference on Software Maintenance.

[21]  Emil Sekerinski,et al.  A Study of The Fragile Base Class Problem , 1998, ECOOP.

[22]  Yann-Gaël Guéhéneuc,et al.  MADMatch: Many-to-Many Approximate Diagram Matching for Design Comparison , 2013, IEEE Transactions on Software Engineering.

[23]  Eleni Stroulia,et al.  API-Evolution Support with Diff-CatchUp , 2007, IEEE Transactions on Software Engineering.

[24]  Miryung Kim,et al.  An empirical investigation into the role of API-level refactorings during software evolution , 2011, 2011 33rd International Conference on Software Engineering (ICSE).

[25]  Wei Wu,et al.  ACUA: API Change and Usage Auditor , 2014, 2014 IEEE 14th International Working Conference on Source Code Analysis and Manipulation.

[26]  Karl Pearson F.R.S. X. On the criterion that a given system of deviations from the probable in the case of a correlated system of variables is such that it can be reasonably supposed to have arisen from random sampling , 2009 .

[27]  Tao Xie,et al.  An Empirical Study on Evolution of API Documentation , 2011, FASE.

[28]  Andy Zaidman,et al.  Web API growing pains: Stories from client developers and their code , 2014, 2014 Software Evolution Week - IEEE Conference on Software Maintenance, Reengineering, and Reverse Engineering (CSMR-WCRE).

[29]  K. Pearson On the Criterion that a Given System of Deviations from the Probable in the Case of a Correlated System of Variables is Such that it Can be Reasonably Supposed to have Arisen from Random Sampling , 1900 .

[30]  Miryung Kim,et al.  Automatic Inference of Structural Changes for Matching across Program Versions , 2007, 29th International Conference on Software Engineering (ICSE'07).

[31]  Ralph E. Johnson,et al.  How do APIs evolve? A story of refactoring , 2006 .

[32]  Lu Zhang,et al.  A history-based matching approach to identification of framework evolution , 2012, 2012 34th International Conference on Software Engineering (ICSE).

[33]  Eleni Stroulia,et al.  JDeodorant: identification and application of extract class refactorings , 2011, 2011 33rd International Conference on Software Engineering (ICSE).

[34]  Ralph Johnson,et al.  Design patterns: elements of reuseable object-oriented software , 1994 .

[35]  Ralf Lämmel,et al.  Large-scale, AST-based API-usage analysis of open-source Java projects , 2011, SAC.

[36]  Martin P. Robillard,et al.  Improving API Usage through Automatic Detection of Redundant Code , 2009, 2009 IEEE/ACM International Conference on Automated Software Engineering.

[37]  Romain Robbes,et al.  How do developers react to API deprecation?: the case of a smalltalk ecosystem , 2012, SIGSOFT FSE.

[38]  Yann-Gaël Guéhéneuc,et al.  An empirical study on requirements traceability using eye-tracking , 2012, 2012 28th IEEE International Conference on Software Maintenance (ICSM).

[39]  Daqing Hou,et al.  Content Categorization of API Discussions , 2013, 2013 IEEE International Conference on Software Maintenance.

[40]  Martin P. Robillard,et al.  A field study of API learning obstacles , 2011, Empirical Software Engineering.

[41]  Miryung Kim,et al.  A graph-based approach to API usage adaptation , 2010, OOPSLA.

[42]  David J. Sheskin,et al.  Handbook of Parametric and Nonparametric Statistical Procedures , 1997 .

[43]  R. Fisher 019: On the Interpretation of x2 from Contingency Tables, and the Calculation of P. , 1922 .

[44]  R. Fisher On the Interpretation of χ2 from Contingency Tables, and the Calculation of P , 2010 .

[45]  Arie van Deursen,et al.  Measuring software library stability through historical version analysis , 2012, 2012 28th IEEE International Conference on Software Maintenance (ICSM).

[46]  Robert J. Walker,et al.  Seeking the ground truth: a retroactive study on the evolution and migration of software libraries , 2012, SIGSOFT FSE.

[47]  Collin McMillan,et al.  ExPort: Detecting and visualizing API usages in large source code repositories , 2013, 2013 28th IEEE/ACM International Conference on Automated Software Engineering (ASE).

[48]  Joshua Bloch Effective Java (2nd Edition) (The Java Series) , 2008 .

[49]  Claes Wohlin,et al.  Experimentation in software engineering: an introduction , 2000 .

[50]  Alexander Serebrenik,et al.  Eclipse API usage: the good and the bad , 2013, Software Quality Journal.

[51]  Mira Mezini,et al.  Mining framework usage changes from instantiation code , 2008, 2008 ACM/IEEE 30th International Conference on Software Engineering.

[52]  Ralf,et al.  Swing to SWT and back: Patterns for API migration by wrapping , 2010, ICSM 2010.

[53]  Mauricio A. Saca Refactoring improving the design of existing code , 2017, 2017 IEEE 37th Central America and Panama Convention (CONCAPAN XXXVII).

[54]  Daqing Hou,et al.  Exploring the Intent behind API Evolution: A Case Study , 2011, 2011 18th Working Conference on Reverse Engineering.

[55]  Wei Wu,et al.  The impact of imperfect change rules on framework API evolution identification: an empirical study , 2014, Empirical Software Engineering.