When should internal interfaces be promoted to public?

Commonly, software systems have public (and stable) interfaces, and internal (and possibly unstable) interfaces. Despite being discouraged, client developers often use internal interfaces, which may cause their systems to fail when they evolve. To overcome this problem, API producers may promote internal interfaces to public. In practice, however, API producers have no assistance to identify public interface candidates. In this paper, we study the transition from internal to public interfaces. We aim to help API producers to deliver a better product and API clients to benefit sooner from public interfaces. Our empirical investigation on five widely adopted Java systems present the following observations. First, we identified 195 promotions from 2,722 internal interfaces. Second, we found that promoted internal interfaces have more clients. Third, we predicted internal interface promotion with precision between 50%-80%, recall 26%-82%, and AUC 74%-85%. Finally, by applying our predictor on the last version of the analyzed systems, we automatically detected 382 public interface candidates.

[1]  Yana Momchilova Mileva,et al.  Mining Evolution of Object Usage , 2011, ECOOP.

[2]  Matthias Hauswirth,et al.  Use at your own risk: the Java unsafe API in the wild , 2015, OOPSLA.

[3]  Nicolas Anquetil,et al.  Domain specific warnings: Are they any better? , 2012, 2012 28th IEEE International Conference on Software Maintenance (ICSM).

[4]  Alexander Serebrenik,et al.  Survival of Eclipse third-party plug-ins , 2012, 2012 28th IEEE International Conference on Software Maintenance (ICSM).

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

[6]  Georgios Gousios,et al.  Untangling fine-grained code changes , 2015, 2015 IEEE 22nd International Conference on Software Analysis, Evolution, and Reengineering (SANER).

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

[8]  Marco Tulio Valente,et al.  Mining system specific rules from change patterns , 2013, 2013 20th Working Conference on Reverse Engineering (WCRE).

[9]  Marco Tulio Valente,et al.  How do developers react to API evolution? The Pharo ecosystem case , 2015, 2015 IEEE International Conference on Software Maintenance and Evolution (ICSME).

[10]  Bart Baesens,et al.  Benchmarking Classification Models for Software Defect Prediction: A Proposed Framework and Novel Findings , 2008, IEEE Transactions on Software Engineering.

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

[12]  Tom Mens,et al.  Automated support for framework-based software , 2003, International Conference on Software Maintenance, 2003. ICSM 2003. Proceedings..

[13]  Marco Tulio Valente,et al.  APIEvolutionMiner: Keeping API evolution under control , 2014, 2014 Software Evolution Week - IEEE Conference on Software Maintenance, Reengineering, and Reverse Engineering (CSMR-WCRE).

[14]  Ralph E. Johnson,et al.  The role of refactorings in API evolution , 2005, 21st IEEE International Conference on Software Maintenance (ICSM'05).

[15]  David Notkin,et al.  Semi-automatic update of applications in response to library changes , 1996, 1996 Proceedings of International Conference on Software Maintenance.

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

[17]  Tom Tourwé,et al.  Automated Support for Framework-Based Software Evolution , 2003 .

[18]  Andreas Zeller,et al.  Mining API Popularity , 2010, TAIC PART.

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

[20]  Hridesh Rajan,et al.  Boa: A language and infrastructure for analyzing ultra-large-scale software repositories , 2013, 2013 35th International Conference on Software Engineering (ICSE).

[21]  Martin P. Robillard,et al.  Recommending adaptive changes for framework evolution , 2011, 2008 ACM/IEEE 30th International Conference on Software Engineering.

[22]  Eric Braude,et al.  Best Principles in the Design of Shared Software , 2009, 2009 33rd Annual IEEE International Computer Software and Applications Conference.

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

[24]  Alexandre Bergel,et al.  Understanding and addressing exhibitionism in Java empirical research about method accessibility , 2016, Empirical Software Engineering.

[25]  Alexander Serebrenik,et al.  Analyzing the Eclipse API Usage: Putting the Developer in the Loop , 2013, 2013 17th European Conference on Software Maintenance and Reengineering.

[26]  R. Grissom,et al.  Effect sizes for research: A broad practical approach. , 2005 .

[27]  David Lo,et al.  Mining Quantified Temporal Rules: Formalism, Algorithms, and Evaluation , 2009, 2009 16th Working Conference on Reverse Engineering.

[28]  Marco Tulio Valente,et al.  Uncovering Causal Relationships between Software Metrics and Bugs , 2012, 2012 16th European Conference on Software Maintenance and Reengineering.

[29]  Benjamin Livshits,et al.  DynaMine: finding common error patterns by mining software revision histories , 2005, ESEC/FSE-13.

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

[31]  Ferdian Thung,et al.  Automatic Defect Categorization , 2012, 2012 19th Working Conference on Reverse Engineering.

[32]  Miryung Kim,et al.  Discovering and representing systematic code changes , 2009, 2009 IEEE 31st International Conference on Software Engineering.

[33]  David Lo,et al.  What are the characteristics of high-rated apps? A case study on free Android Applications , 2015, 2015 IEEE International Conference on Software Maintenance and Evolution (ICSME).

[34]  Tim Menzies,et al.  Better cross company defect prediction , 2013, 2013 10th Working Conference on Mining Software Repositories (MSR).

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

[36]  D. Zelterman Statistical Models for Causal Analysis , 1994 .

[37]  Marco Tulio Valente,et al.  Predicting software defects with causality tests , 2014, J. Syst. Softw..

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

[39]  Yann-Gaël Guéhéneuc,et al.  Can Lexicon Bad Smells Improve Fault Prediction? , 2012, 2012 19th Working Conference on Reverse Engineering.

[40]  Marco Tulio Valente,et al.  Apiwave: Keeping track of API popularity and migration , 2015, 2015 IEEE International Conference on Software Maintenance and Evolution (ICSME).

[41]  Tom Fawcett,et al.  Robust Classification for Imprecise Environments , 2000, Machine Learning.

[42]  Marco Tulio Valente,et al.  Automatic detection of system-specific conventions unknown to developers , 2015, J. Syst. Softw..

[43]  J. Henkel,et al.  CatchUp! Capturing and replaying refactorings to support API evolution , 2005, Proceedings. 27th International Conference on Software Engineering, 2005. ICSE 2005..

[44]  Oscar Nierstrasz,et al.  The Effect of Object-Oriented Frameworks on Developer Productivity , 1996, Computer.

[45]  Marco Tulio Valente,et al.  Identifying Utility Functions Using Random Forests , 2016, 2016 IEEE 23rd International Conference on Software Analysis, Evolution, and Reengineering (SANER).

[46]  Martin P. Robillard,et al.  Managing Concern Interfaces , 2006, 2006 22nd IEEE International Conference on Software Maintenance.

[47]  Chao Liu,et al.  Journal of Software Maintenance and Evolution: Research and Practice Mining Temporal Rules for Software Maintenance , 2022 .

[48]  Yi Zhang,et al.  Classifying Software Changes: Clean or Buggy? , 2008, IEEE Transactions on Software Engineering.