Identification of refactoring opportunities introducing polymorphism

Polymorphism is one of the most important features offered by object-oriented programming languages, since it allows to extend/modify the behavior of a class without altering its source code, in accordance to the Open/Closed Principle. However, there is a lack of methods and tools for the identification of places in the code of an existing system that could benefit from the employment of polymorphism. In this paper we propose a technique that extracts refactoring suggestions introducing polymorphism. The approach ensures the behavior preservation of the code and the applicability of the refactoring suggestions based on the examination of a set of preconditions.

[1]  Ralph Johnson,et al.  design patterns elements of reusable object oriented software , 2019 .

[2]  Fernando Brito e Abreu,et al.  Evaluating the impact of object-oriented design on software quality , 1996, Proceedings of the 3rd International Software Metrics Symposium.

[3]  Alexander Chatzigeorgiou,et al.  JDeodorant: Identification and Removal of Type-Checking Bad Smells , 2008, 2008 12th European Conference on Software Maintenance and Reengineering.

[4]  Serge Demeyer,et al.  A study of quality improvements by refactoring , 2006 .

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

[6]  Leon Moonen,et al.  Java quality assurance by detecting code smells , 2002, Ninth Working Conference on Reverse Engineering, 2002. Proceedings..

[7]  Oscar Nierstrasz,et al.  Object-oriented reengineering patterns , 2004, Proceedings. 26th International Conference on Software Engineering.

[8]  Adrian Trifu,et al.  Towards Automated Restructuring of Object Oriented Systems , 2007, 11th European Conference on Software Maintenance and Reengineering (CSMR'07).

[9]  Mark Kent O'Keeffe,et al.  Getting the most from search-based refactoring , 2007, GECCO '07.

[10]  Mark Kent O'Keeffe,et al.  Search-based refactoring for software maintenance , 2008, J. Syst. Softw..

[11]  Andrew C. Myers,et al.  Subtypes vs. where clauses: constraining parametric polymorphism , 1995, OOPSLA.

[12]  Mel Ó Cinnéide,et al.  A methodology for the automated introduction of design patterns , 1999, Proceedings IEEE International Conference on Software Maintenance - 1999 (ICSM'99). 'Software Maintenance for Business Change' (Cat. No.99CB36360).

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

[14]  Shing-Chi Cheung,et al.  Do Maintainers Utilize Deployed Design Patterns Effectively? , 2007, 29th International Conference on Software Engineering (ICSE'07).

[15]  Shing-Chi Cheung,et al.  Work experience versus refactoring to design patterns: a controlled experiment , 2006, SIGSOFT '06/FSE-14.

[16]  David Lorge Parnas,et al.  Software aging , 1994, Proceedings of 16th International Conference on Software Engineering.

[17]  Walter F. Tichy,et al.  A Controlled Experiment in Maintenance Comparing Design Patterns to Simpler Solutions , 2001, IEEE Trans. Software Eng..

[18]  Peter Wendorff Assessment of Design Patterns during Software Reengineering: Lessons Learned from a Large Commercial Project , 2001, CSMR.

[19]  Robert C. Martin Agile Software Development, Principles, Patterns, and Practices , 2002 .

[20]  Mel O Cinn eide Automated application of design patterns: a refactoring approach , 2001 .

[21]  Dag I. K. Sjøberg,et al.  Evaluating the effect of a delegated versus centralized control style on the maintainability of object-oriented software , 2004, IEEE Transactions on Software Engineering.

[22]  Serge Demeyer,et al.  Refactor conditionals into polymorphism: what's the performance cost of introducing virtual calls? , 2005, 21st IEEE International Conference on Software Maintenance (ICSM'05).

[23]  Joshua Kerievsky,et al.  Refactoring to Patterns , 2004, XP/Agile Universe.