摘要
度量数据的分布信息对于理解和使用面向对象软件度量有重要意义.人们对面向对象软件规模度量、耦合度度量乃至继承维度的度量数据的分布都有研究,但对除内聚度缺乏度LCOM之外的内聚度度量数据的分布却缺乏研究.已有的实证研究表明,LCOM并不是好的内聚度度量,因此探讨其他内聚度度量数据分布很有必要.对包括内聚度缺乏度、基于连通性的内聚度度量和基于相似性的内聚度度量总共17个度量指标在112个Java开源软件项目的分布情况进行实证研究,对每个度量指标的每个项目数据使用幂律分布和对数正态分布进行拟合,并使用荟萃分析方法对拟合结果进行了分析.实证研究结果表明,非规范化的内聚度量可使用对数正态分布和幂律分布拟合,但规范化的基于相似性的内聚度量(包括CC、LSCC、SCOM和SCC)需要排除方法数小于等于1或字段数为0的特殊类才能使用对数正态分布拟合,而基于连通性的内聚度度量(包括TCC、LCC、DCD和DCI)则只有对应的非规范化版本的数据才符合对数正态分布或幂律分布.实证研究可帮助人们更好地理解和使用内聚度度量,特别是可以帮助人们如何利用已有的方法确定内聚度度量的阈值.
The distribution information of measurement data is important for understanding and using object-oriented software metrics. However, there is no research on the distribution of objectoriented software cohesion metrics except the CK metric LCOM. Unfortunately, existing studies show that LCOM is not a good metric for class cohesion of object-oriented software. Therefore, it is necessary to investigate the distribution of other cohesion metrics. Based on 112 Java open-source software systems, the distribution of measurement data of 17 cohesion metrics, including those lack of cohesion metrics (e.g. LCOM1, LCOM2, LCOM3, LCOM4, LCOMS),connectivity-based cohesionmetrics (e.g. TCC, LCC, DCI, DCD), and similarity-based cohesion metrics (e.g. CC, LSCC, SCOM, SCC), are investigated empirically in this paper. The results show that the data of non-normalized cohesion metric can be fitted into log-normal distribution and power law distribution, whereas the data of similarity-based cohesion metrics should be fitted into log-normal distribution only when excluding those special class with at most one method and without field data, and, for connectiyitybased cohesion metrics, the data of their corresponding non-normalized cohesion metric follow log-normal distribution and power law distribution. This study provides important information for researchers to understand and use cohesion metrics, in particular, to identify thresholds for these metrics using the approaches in the literatures.
作者
周晓聪
赖蔚
温剑丰
ZHOU Xiao-Cong;LAI Wei;WEN Jian-Feng(School of Data and Computer Science,Sun Yat-Sen University,Guangzhou 510275,China;School of Computer Science,Guangdong Polytechnic Normal University,Guangzhou 510665,China)
出处
《软件学报》
EI
CSCD
北大核心
2018年第10期3051-3067,共17页
Journal of Software
基金
广东省自然科学基金(2015A030310394)
广东省重大科技专项(2016B030305006
2014B010112001)
国家自然科学基金(61672546)~~
关键词
面向对象软件
内聚度度量
统计分布
实证研究
object-oriented software
cohesion metrics
statistic distribution
empirical study