The impact of accounting for special methods in the measurement of object-oriented class cohesion on refactoring and fault prediction activities

被引:21
作者
Al Dallal, Jehad [1 ]
机构
[1] Kuwait Univ, Dept Informat Sci, Safat 13060, Kuwait
关键词
Object-oriented design; Class quality; Class cohesion; Cohesion metric; Special methods; Refactoring Fault prediction; PRACT.-EXPER; 2000; METRICS SUITE; QUALITY; CHAE; HEUNG; SEOK; KWON; YONG; RAE;
D O I
10.1016/j.jss.2011.12.006
中图分类号
TP31 [计算机软件];
学科分类号
081202 ; 0835 ;
摘要
Class cohesion is a key attribute that is used to assess the design quality of a class, and it refers to the extent to which the attributes and methods of the class are related. Typically, classes contain special types of methods, such as constructors, destructors, and access methods. Each of these special methods has its own characteristics, which can artificially affect the class cohesion measurement. Several metrics have been proposed in the literature to indicate class cohesion during high- or low-level design phases. The impact of accounting for special methods in cohesion measurement has not been addressed for most of these metrics. This paper empirically explores the impact of including or excluding special methods on cohesion measurements that were performed using 20 existing class cohesion metrics. The empirical study applies the metrics that were considered to five open-source systems under four different scenarios, including (1) considering all special methods, (2) ignoring only constructors, (3) ignoring only access methods, and (4) ignoring all special methods. This study empirically explores the impact of including special methods in cohesion measurement for two applications of interest to software practitioners, including refactoring and predicting faulty classes. The results of the empirical studies show that the cohesion values for most of the metrics considered differ significantly across the four scenarios and that this difference significantly affects the refactoring decisions, but does not significantly affect the abilities of the metrics to predict faulty classes. (C) 2011 Elsevier Inc. All rights reserved.
引用
收藏
页码:1042 / 1057
页数:16
相关论文
共 50 条
[1]  
Abdi H., 2007, Encyclopedia of Measurement and Statistics, P651, DOI DOI 10.4135/9781412952644.N299
[2]   Investigating effect of Design Metrics on Fault Proneness in Object-Oriented Systems [J].
Aggarwal, K. K. ;
Singh, Yogesh ;
Kaur, Arvinder ;
Malhotra, Ruchika .
JOURNAL OF OBJECT TECHNOLOGY, 2007, 6 (10) :127-141
[3]   Software similarity-based functional cohesion metric [J].
Al Dallal, J. .
IET SOFTWARE, 2009, 3 (01) :46-57
[4]  
Al Dallal J., 2010, INT J COMPUTER SCI, V4, P45
[5]  
Al Dallal J., 2012, INFORM SOFT IN PRESS
[6]   A Precise Method-Method Interaction-Based Cohesion Metric for Object-Oriented Classes [J].
Al Dallal, Jehad ;
Briand, Lionel C. .
ACM TRANSACTIONS ON SOFTWARE ENGINEERING AND METHODOLOGY, 2012, 21 (02)
[7]   Improving the applicability of object-oriented class cohesion metrics [J].
Al Dallal, Jehad .
INFORMATION AND SOFTWARE TECHNOLOGY, 2011, 53 (09) :914-928
[8]   Measuring the Discriminative Power of Object-Oriented Class Cohesion Metrics [J].
Al Dallal, Jehad .
IEEE TRANSACTIONS ON SOFTWARE ENGINEERING, 2011, 37 (06) :788-804
[9]   An object-oriented high-level design-based class cohesion metric [J].
Al Dallal, Jehad ;
Briand, Lionel C. .
INFORMATION AND SOFTWARE TECHNOLOGY, 2010, 52 (12) :1346-1361
[10]  
[Anonymous], ACM SIGSOFT SOFTWARE