Using the conceptual cohesion of classes for fault prediction in Object-Oriented systems

被引:165
作者
Marcus, Andrian [1 ]
Poshyvanyk, Denys [1 ]
Ferenc, Rudolf [2 ]
机构
[1] Wayne State Univ, Dept Comp Sci, Detroit, MI 48202 USA
[2] Univ Szeged, Dept Software Engn, H-6720 Szeged, Hungary
基金
美国国家科学基金会; 美国国家卫生研究院;
关键词
software cohesion; textual coherence; fault prediction; fault proneness; program comprehension; information retrieval; Latent Semantic Indexing;
D O I
10.1109/TSE.2007.70768
中图分类号
TP31 [计算机软件];
学科分类号
081202 ; 0835 ;
摘要
High cohesion is a desirable property of software as it positively impacts understanding, reuse, and maintenance. Currently proposed measures for cohesion in Object-Oriented (OO) software reflect particular interpretations of cohesion and capture different aspects of it. Existing approaches are largely based on using the structural information from the source code, such as attribute references, in methods to measure cohesion. This paper proposes a new measure for the cohesion of classes in OO software systems based on the analysis of the unstructured information embedded in the source code, such as comments and identifiers. The measure, named the Conceptual Cohesion of Classes (C3), is inspired by the mechanisms used to measure textual coherence in cognitive psychology and computational linguistics. This paper presents the principles and the technology that stand behind the C3 measure. A large case study on three open source software systems is presented which compares the new measure with an extensive set of existing metrics and uses them to construct models that predict software faults. The case study shows that the novel measure captures different aspects of class cohesion compared to any of the existing cohesion measures. In addition, combining C3 with existing structural cohesion metrics proves to be a better predictor of faulty classes when compared to different combinations of structural cohesion metrics.
引用
收藏
页码:287 / 300
页数:14
相关论文
共 80 条
[1]  
[Anonymous], ACM SIGSOFT SOFTWARE
[2]  
[Anonymous], 1994, COUPLING COHESION OB
[3]  
[Anonymous], P METRICS 01 APR 4 6
[4]  
[Anonymous], 1986, Principle Component Analysis
[5]  
[Anonymous], NRCERB1064
[6]  
[Anonymous], 1996, Software Metrics
[7]  
[Anonymous], P 1995 S SOFTW REUS
[8]   Recovering traceability links between code and documentation [J].
Antoniol, G ;
Canfora, G ;
Casazza, G ;
De Lucia, A ;
Merlo, E .
IEEE TRANSACTIONS ON SOFTWARE ENGINEERING, 2002, 28 (10) :970-983
[9]   Working session: Identification of lower-level artifacts [J].
Antoniol, G ;
Casazza, G ;
Merlo, AD .
8TH INTERNATIONAL WORKSHOP ON PROGRAM COMPREHENSION (IWPC 2000), PROCEEDINGS, 2000, :253-253
[10]   Dynamic coupling measurement for object-oriented software [J].
Arisholm, E ;
Briand, LC ;
Foyen, A .
IEEE TRANSACTIONS ON SOFTWARE ENGINEERING, 2004, 30 (08) :491-506