{'fraction_non_alphanumeric': 0.012108980827447022, 'fraction_numerical': 0.0, 'mean_word_length': 5.238993710691824, 'pattern_counts': {'":': 0, '<': 0, '<?xml version=': 0, '>': 0, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
Suggesting Extract Class Refactoring Opportunities by Measuring Strength of Method Interactions

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.