Towards improving interface modularity in legacy Java software through automated refactoring

The skeletal implementation pattern is a software design pattern consisting of defining an abstract class that provides a partial interface implementation. However, since Java allows only single class inheritance, if implementers decide to extend a skeletal implementation, they will not be allowed to extend any other class. Also, discovering the skeletal implementation may require a global analysis. Java 8 enhanced interfaces alleviate these problems by allowing interfaces to contain (default) method implementations, which implementers inherit. Java classes are then free to extend a different class, and a separate abstract class is no longer needed; developers considering implementing an interface need only examine the interface itself. We argue that both these benefits improve software modularity, and discuss our ongoing work in developing an automated refactoring tool that would assist developers in taking advantage of the enhanced interface feature for their legacy Java software.

[1]  Giuseppe A. Di Lucca,et al.  Migrating legacy systems towards object-oriented platforms , 1997, 1997 Proceedings International Conference on Software Maintenance.

[2]  Cay S. Horstmann Java SE 8 for the Really Impatient , 2014 .

[3]  Adam Kiezun,et al.  Integrating Refactoring Support into a Java Development Tool , 2001, OOPSLA 2001.

[4]  Friedrich Steimann,et al.  Systematically refactoring inheritance to delegation in java , 2008, 2008 ACM/IEEE 30th International Conference on Software Engineering.

[5]  Raffi Khatchadourian,et al.  Automated refactoring of legacy Java software to enumerated types , 2007, 2007 IEEE International Conference on Software Maintenance.

[6]  Emerson R. Murphy-Hill,et al.  Manual refactoring changes with automated refactoring validation , 2014, ICSE.

[7]  Michael D. Ernst,et al.  Converting java programs to use generic libraries , 2004, OOPSLA '04.

[8]  Frank Tip,et al.  Refactoring for generalization using type constraints , 2003, OOPSLA 2003.

[9]  Melina Mongiovi Safira: a tool for evaluating behavior preservation , 2011, OOPSLA Companion.

[10]  Michael D. Ernst,et al.  Refactoring sequential Java code for concurrency via concurrent libraries , 2009, 2009 IEEE 31st International Conference on Software Engineering.

[11]  Eli Tilevich,et al.  Annotation refactoring: inferring upgrade transformations for legacy applications , 2008, OOPSLA.

[12]  Hausi A. Müller,et al.  Code migration through transformations: an experience report , 2010, Conference of the Centre for Advanced Studies on Collaborative Research.

[13]  William F. Opdyke,et al.  Refactoring object-oriented frameworks , 1992 .

[14]  Gustavo Soares Soares Automated behavioral testing of refactoring engines , 2012, SPLASH '12.

[15]  Ying Zou,et al.  A framework for migrating procedural code to object-oriented platforms , 2001, Proceedings Eighth Asia-Pacific Software Engineering Conference.

[16]  Amer Diwan,et al.  Converting Java classes to use generics , 2004, OOPSLA '04.

[17]  Eli Tilevich,et al.  Cloud refactoring: automated transitioning to cloud-based services , 2013, Automated Software Engineering.

[18]  Laurie Hendren,et al.  Soot: a Java bytecode optimization framework , 2010, CASCON.

[19]  Frank Tip,et al.  Refactoring for Parameterizing Java Classes , 2007, 29th International Conference on Software Engineering (ICSE'07).

[20]  Bjarne Stroustrup,et al.  Rejuvenating C++ programs through demacrofication , 2012, 2012 28th IEEE International Conference on Software Maintenance (ICSM).

[21]  Frank Tip,et al.  Efficiently Refactoring Java Applications to Use Generic Libraries , 2005, ECOOP.