Impact of Refactoring on OO Metrics: A Study on the Extract Class, Extract Superclass, Encapsulate Field and Pull up Method
Iyad Alazzam, Belal Mustafa Abuata, Ghada Mhediat · International Journal of Machine Learning and Computing · 2020
Refactoring is the key to improve software maintainability, reduce complexity and get clear code with the ability to understand and modify it in efficient way. In this paper we present four refactoring techniques which are: Extract Class, Extract Superclass, Encapsulate Field and Pull up Method to discover their effect on multi Object Oriented metrics and factors. The main objective of this study is to help the developers and maintenance engineers in choosing the best possible refactoring technique based on determined goals. The results demonstrate that the types of refactoring techniques have distinctive impact on the metrics values. The results show that all contemplated refactoring techniques increase the Cyclomatic number value (VG). However, the Encapsulate Field has no impact on: Coupling between Objects, Depth of Inheritance, Number of children and Outward Coupling metrics.