Identification of refactoring opportunities introducing polymorphism

  • Authors:
  • Nikolaos Tsantalis;Alexander Chatzigeorgiou

  • Affiliations:
  • Department of Applied Informatics, University of Macedonia, 54006 Thessaloniki, Greece;Department of Applied Informatics, University of Macedonia, 54006 Thessaloniki, Greece

  • Venue:
  • Journal of Systems and Software
  • Year:
  • 2010

Quantified Score

Hi-index 0.00

Visualization

Abstract

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.