...
首页> 外文期刊>ACM transactions on software engineering and methodology >A Precise Method-Method Interaction-Based Cohesion Metric for Object-Oriented Classes
【24h】

A Precise Method-Method Interaction-Based Cohesion Metric for Object-Oriented Classes

机译:面向对象类的基于方法-方法交互的精确内聚度量

获取原文
获取原文并翻译 | 示例

摘要

The building of highly cohesive classes is an important objective in object-oriented design. Class cohesion refers to the relatedness of the class members, and it indicates one important aspect of the class design quality. A meaningful class cohesion metric helps object-oriented software developers detect class design weaknesses and refactor classes accordingly. Several class cohesion metrics have been proposed in the literature. Most of these metrics are applicable based on low-level design information such as attribute references in methods. Some of these metrics capture class cohesion by counting the number of method pairs that share common attributes. A few metrics measure cohesion more precisely by considering the degree of interaction, through attribute references, between each pair of methods. However, the formulas applied by these metrics to measure the degree of interaction cause the metrics to violate important mathematical properties, thus undermining their construct validity and leading to misleading cohesion measurement. In this paper, we propose a formula that precisely measures the degree of interaction between each pair of methods, and we use it as a basis to introduce a low-level design class cohesion metric (LSCC). We verify that the proposed formula does not cause the metric to violate important mathematical properties. In addition, we provide a mechanism to use this metric as a useful indicator for refactoring weakly cohesive classes, thus showing its usefulness in improving class cohesion. Finally, we empirically validate LSCC. Using four open source software systems and eleven cohesion metrics, we investigate the relationship between LSCC, other cohesion metrics, and fault occurrences in classes. Our results show that LSCC is one of three metrics that explains more accurately the presence of faults in classes. LSCC is the only one among the three metrics to comply with important mathematical properties, and statistical analysis shows it captures a measurement dimension of its own. This suggests that LSCC is a better alternative, when taking into account both theoretical and empirical results, as a measure to guide the refactoring of classes. From a more general standpoint, the results suggest that class quality, as measured in terms of fault occurrences, can be more accurately explained by cohesion metrics that account for the degree of interaction between each pair of methods.
机译:建立高度凝聚力的类是面向对象设计中的重要目标。班级凝聚力是班级成员之间的联系,是班级设计质量的重要方面。一个有意义的类内聚度量标准可以帮助面向对象的软件开发人员检测类设计的弱点并相应地重构类。文献中已经提出了几种类别的内聚度量。这些度量标准中的大多数适用于基于低级设计的信息,例如方法中的属性引用。其中一些度量标准通过计算共享公共属性的方法对的数量来捕获类内聚。一些度量标准通过考虑每对方法之间通过属性引用进行的交互程度来更精确地测量内聚性。但是,这些度量用于度量交互程度的公式导致度量违反重要的数学属性,从而破坏了它们的构造有效性并导致误导性的内聚性度量。在本文中,我们提出了一个精确测量每对方法之间相互作用程度的公式,并以此为基础引入了低级设计类内聚度量(LSCC)。我们验证所提出的公式不会导致度量标准违反重要的数学属性。此外,我们提供了一种机制,可以将该指标用作重构弱内聚类的有用指标,从而显示出其在改善类内聚性方面的有用性。最后,我们凭经验验证LSCC。使用四个开源软件系统和十一个内聚度量,我们研究了LSCC,其他内聚度量和类中故障发生之间的关系。我们的结果表明,LSCC是三个指标之一,可以更准确地解释类中故障的存在。 LSCC是三个指标中唯一符合重要数学属性的指标,统计分析表明LSCC拥有自己的测量维度。这表明,考虑到理论和经验结果,作为指导类重构的一种方法,LSCC是更好的选择。从更一般的角度来看,结果表明,通过考虑每对方法之间的交互程度的内聚度量,可以更准确地解释根据故障发生来衡量的类质量。

著录项

相似文献

  • 外文文献
  • 中文文献
  • 专利
获取原文

客服邮箱:kefu@zhangqiaokeyan.com

京公网安备:11010802029741号 ICP备案号:京ICP备15016152号-6 六维联合信息科技 (北京) 有限公司©版权所有
  • 客服微信

  • 服务号