An experimental search-based approach to cohesion metric evaluation

被引:13
作者
Cinneide, Mel O. [1 ]
Moghadam, Iman Hemati [2 ]
Harman, Mark [2 ]
Counsell, Steve [3 ]
Tratt, Laurence [4 ]
机构
[1] Univ Coll Dublin, Sch Comp Sci, Dublin, Ireland
[2] UCL, Dept Comp Sci, London, England
[3] Brunel Univ, Dept Comp Sci, London, England
[4] Kings Coll London, Dept Informat, London, England
基金
英国工程与自然科学研究理事会; 爱尔兰科学基金会;
关键词
Refactoring; Software metrics; Empirical studies;
D O I
10.1007/s10664-016-9427-7
中图分类号
TP31 [计算机软件];
学科分类号
081202 ; 0835 ;
摘要
In spite of several decades of software metrics research and practice, there is little understanding of how software metrics relate to one another, nor is there any established methodology for comparing them. We propose a novel experimental technique, based on search-based refactoring, to 'animate' metrics and observe their behaviour in a practical setting. Our aim is to promote metrics to the level of active, opinionated objects that can be compared experimentally to uncover where they conflict, and to understand better the underlying cause of the conflict. Our experimental approaches include semi-random refactoring, refactoring for increased metric agreement/disagreement, refactoring to increase/decrease the gap between a pair of metrics, and targeted hypothesis testing. We apply our approach to five popular cohesion metrics using ten real-world Java systems, involving 330,000 lines of code and the application of over 78,000 refactorings. Our results demonstrate that cohesion metrics disagree with each other in a remarkable 55 % of cases, that Low-level Similarity-based Class Cohesion (LSCC) is the best representative of the set of metrics we investigate while Sensitive Class Cohesion (SCOM) is the least representative, and we discover several hitherto unknown differences between the examined metrics. We also use our approach to investigate the impact of including inheritance in a cohesion metric definition and find that doing so dramatically changes the metric.
引用
收藏
页码:292 / 329
页数:38
相关论文
共 78 条