On the Link Between Refactoring Activity and Class Cohesion Through the Prism of Two Cohesion-Based Metrics

Steve Counsell, Giuseppe Destefanis, Steve Swift, Mahir Arzoky, Davide Taibi

Research output: Chapter in Book/Report/Conference proceedingConference contributionScientificpeer-review

1 Citation (Scopus)

Abstract

The practice of refactoring has evolved over the past thirty
years to become standard developer practice; for almost the same
amount of time, proposals for measuring object-oriented cohesion
have also been suggested. Yet, we still know very little about their
inter-relationship empirically, despite the fact that classes exhibiting
low cohesion would be strong candidates for refactoring. In this
paper, we use a large set of refactorings to understand the
characteristics of two cohesion metrics from a refactoring
perspective. Firstly, through the well-known LCOM metric of
Chidamber and Kemerer and, secondly, the C3 metric proposed more recently by Marcus et al. Our research question is motivated by the premise that different refactorings will be applied to classes with low cohesion compared with those applied to classes with high cohesion. We used three open-source systems as a basis of our analysis and on data from the lower and upper quartiles of metric data. Results showed that the set of refactoring types across both upper and lower quartiles was broadly the same, although very different in actual numbers. The ‘rename method’ refactoring stood out from the rest, being applied over three times as often to classes with low cohesion than to classes with high cohesion.
Original languageEnglish
Title of host publicationOn the Link Between Refactoring Activity and Class Cohesion Through the Prism of Two Cohesion-Based Metrics
PublisherIEEE
Pages91-98
Number of pages8
ISBN (Electronic)9781728189130
DOIs
Publication statusPublished - 2020
Publication typeA4 Article in conference proceedings
EventInternational Conference on Software Quality, Reliability and Security - Macau, China
Duration: 11 Dec 202014 Dec 2020

Conference

ConferenceInternational Conference on Software Quality, Reliability and Security
Country/TerritoryChina
CityMacau
Period11/12/2014/12/20

Keywords

  • Refactoring
  • coupling
  • metrics
  • empirical

Publication forum classification

  • Publication forum level 1

Fingerprint

Dive into the research topics of 'On the Link Between Refactoring Activity and Class Cohesion Through the Prism of Two Cohesion-Based Metrics'. Together they form a unique fingerprint.

Cite this