Suggesting Extract Class Refactoring Opportunities by Measuring Strength of Method Interactions

Giuseppe Pappalardo, Emiliano Tramontana · 2013

For improving the modularity of a large software system, metrics can be valuable to help finding refactoring opportunities for classes. We define a novel metric that is intended to suggest how closely connected are the elements of a class. The metric characterises the strength of the coupling between methods of a class, based on invocations and the size of the parameters involved, as well as attribute accesses. The assessment of the strength of interactions turns out to be valuable in providing an indication on the possible changes that classes need to become more modular and prone to be reused. According to the computed metric and the assessment of system-wide relationships between classes, we are able to suggest Extract Class refactoring opportunities. The capability of the proposed approach to evaluate object-oriented systems is demonstrated by analysing a large software system.

Read the paper · More papers on PaperTik