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.
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 language | English |
---|---|
Title of host publication | On the Link Between Refactoring Activity and Class Cohesion Through the Prism of Two Cohesion-Based Metrics |
Publisher | IEEE |
Pages | 91-98 |
Number of pages | 8 |
ISBN (Electronic) | 9781728189130 |
DOIs | |
Publication status | Published - 2020 |
Publication type | A4 Article in conference proceedings |
Event | International Conference on Software Quality, Reliability and Security - Macau, China Duration: 11 Dec 2020 → 14 Dec 2020 |
Conference
Conference | International Conference on Software Quality, Reliability and Security |
---|---|
Country/Territory | China |
City | Macau |
Period | 11/12/20 → 14/12/20 |
Keywords
- Refactoring
- coupling
- metrics
- empirical
Publication forum classification
- Publication forum level 1