An experimental search-based approach to cohesion metric evaluation

An experimental search-based approach to cohesion metric evaluation
复制标题

DOI:
10.1007/s10664-016-9427-7
复制
发表时间:
2016-04
影响因子:
4.1
通讯作者:
Mel Ó Cinnéide;Iman Hemati Moghadam;M. Harman;S. Counsell;L. Tratt
Mel Ó Cinnéide;Iman Hemati Moghadam;M. Harman;S. Counsell;L. Tratt
中科院分区:
计算机科学2区
文献类型:
--
作者:
Mel Ó Cinnéide;Iman Hemati Moghadam;M. Harman;S. Counsell;L. Tratt

文献摘要

被引文献

相似文献

尽管进行了数十年的软件指标研究和实践,但人们对软件指标之间的相互关系知之甚少,也没有任何既定的方法来比较它们。我们提出了一种基于基于搜索的重构的新颖的实验技术,可以“动画化”指标并在实际环境中观察它们的行为。我们的目标是将指标提升到活跃的、固执己见的对象的水平,可以通过实验进行比较,以发现它们冲突的地方,并更好地理解冲突的根本原因。我们的实验方法包括半随机重构、重构以增加指标一致/不一致、重构以增加/减少一对指标之间的差距以及有针对性的假设检验。我们使用十个真实的 Java 系统将我们的方法应用于五个流行的内聚性指标,涉及 330,000 行代码和超过 78,000 次重构的应用。我们的结果表明,在 55% 的情况下,内聚性指标彼此不一致,基于低级相似性的类内聚 (LSCC) 是我们研究的一组指标的最佳代表,而敏感类内聚 (SCOM) 是最不具有代表性的,并且我们发现了所检查指标之间的一些迄今为止未知的差异。我们还使用我们的方法来研究将继承包含在内聚度量定义中的影响,并发现这样做会极大地改变度量。
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.