Are Slice-Based Cohesion Metrics Actually Useful in Effort-Aware Post-Release Fault-Proneness Prediction? An Empirical Study

Background. Slice-based cohesion metrics leverage program slices with respect to the output variables of a module to quantify the strength of functional relatedness of the elements within the module. Although slice-based cohesion metrics have been proposed for many years, few empirical studies have been conducted to examine their actual usefulness in predicting fault-proneness. Objective. We aim to provide an in-depth understanding of the ability of slice-based cohesion metrics in effort-aware post-release fault-proneness prediction, i.e. their effectiveness in helping practitioners find post-release faults when taking into account the effort needed to test or inspect the code. Method. We use the most commonly used code and process metrics, including size, structural complexity, Halstead's software science, and code churn metrics, as the baseline metrics. First, we employ principal component analysis to analyze the relationships between slice-based cohesion metrics and the baseline metrics. Then, we use univariate prediction models to investigate the correlations between slice-based cohesion metrics and post-release fault-proneness. Finally, we build multivariate prediction models to examine the effectiveness of slice-based cohesion metrics in effort-aware post-release fault-proneness prediction when used alone or used together with the baseline code and process metrics. Results. Based on open-source software systems, our results show that: 1) slice-based cohesion metrics are not redundant with respect to the baseline code and process metrics; 2) most slice-based cohesion metrics are significantly negatively related to post-release fault-proneness; 3) slice-based cohesion metrics in general do not outperform the baseline metrics when predicting post-release fault-proneness; and 4) when used with the baseline metrics together, however, slice-based cohesion metrics can produce a statistically significant and practically important improvement of the effectiveness in effort-aware post-release fault-proneness prediction. Conclusion. Slice-based cohesion metrics are complementary to the most commonly used code and process metrics and are of practical value in the context of effort-aware post-release fault-proneness prediction.

[1]  Jacob Cohen Statistical Power Analysis for the Behavioral Sciences , 1969, The SAGE Encyclopedia of Research Design.

[2]  Tracy Hall,et al.  Fault Analysis in OSS Based on Program Slicing Metrics , 2009, 2009 35th Euromicro Conference on Software Engineering and Advanced Applications.

[3]  Sunghun Kim,et al.  Bug Classification Using Program Slicing Metrics , 2006, 2006 Sixth IEEE International Workshop on Source Code Analysis and Manipulation.

[4]  David W. Binkley,et al.  An empirical study of slice-based cohesion and coupling metrics , 2007, TSEM.

[5]  Les Hatton,et al.  Reexamining the Fault Density-Component Size Connection , 1997, IEEE Softw..

[6]  Jehad Al Dallal Fault prediction and the discriminative powers of connectivity-based object-oriented class cohesion metrics , 2012, Inf. Softw. Technol..

[7]  Akif Günes Koru,et al.  Comparing high-change modules and modules with the highest measurement values in two large-scale open-source products , 2005, IEEE Transactions on Software Engineering.

[8]  Tracy Hall,et al.  A Theoretical and Empirical Analysis of Three Slice-Based Metrics for Cohesion , 2010, Int. J. Softw. Eng. Knowl. Eng..

[9]  Norman E. Fenton,et al.  Quantitative Analysis of Faults and Failures in a Complex Software System , 2000, IEEE Trans. Software Eng..

[10]  Tracy Hall,et al.  Using Program Slicing to Identify Faults in Software , 2005, Beyond Program Slicing.

[11]  S. Danicic,et al.  Cohesion Metrics , 1995 .

[12]  David W. Binkley,et al.  Program slicing , 2008, 2008 Frontiers of Software Maintenance.

[13]  Hareton K. N. Leung,et al.  An in-depth study of the potentially confounding effect of class size in fault prediction , 2014, TSEM.

[14]  Tracy Hall,et al.  A Systematic Literature Review on Fault Prediction Performance in Software Engineering , 2012, IEEE Transactions on Software Engineering.

[15]  Victor R. Basili,et al.  Software errors and complexity: an empirical investigation , 1993 .

[16]  Y. Benjamini,et al.  Controlling the false discovery rate: a practical and powerful approach to multiple testing , 1995 .

[17]  Tim Menzies,et al.  Data Mining Static Code Attributes to Learn Defect Predictors , 2007, IEEE Transactions on Software Engineering.

[18]  J. W. Hunt,et al.  An Algorithm for Differential File Comparison , 2008 .

[19]  Yuming Zhou,et al.  Examining the Potentially Confounding Effect of Class Size on the Associations between Object-Oriented Metrics and Change-Proneness , 2009, IEEE Transactions on Software Engineering.

[20]  James M. Bieman,et al.  Effects of software changes on module cohesion , 1992, Proceedings Conference on Software Maintenance 1992.

[21]  Edward Yourdon,et al.  Structured design : fundamentals of a discip!ine of computer proqram and system desiqn , 1979 .

[22]  Maurice H. Halstead,et al.  Elements of software science (Operating and programming systems series) , 1977 .

[23]  N. Nagappan,et al.  Use of relative code churn measures to predict system defect density , 2005, Proceedings. 27th International Conference on Software Engineering, 2005. ICSE 2005..

[24]  Tracy Hall,et al.  Program slicing-based cohesion measurement: the challenges of replicating studies using metrics , 2011, WETSoM '11.

[25]  A. Zeller,et al.  Predicting Defects for Eclipse , 2007, Third International Workshop on Predictor Models in Software Engineering (PROMISE'07: ICSE Workshops 2007).

[26]  David A. Belsley,et al.  Regression Analysis and its Application: A Data-Oriented Approach.@@@Applied Linear Regression.@@@Regression Diagnostics: Identifying Influential Data and Sources of Collinearity , 1981 .

[27]  Daniel J. Paulish,et al.  An empirical investigation of software fault distribution , 1993, [1993] Proceedings First International Software Metrics Symposium.

[28]  Raed Shatnawi,et al.  The effectiveness of software metrics in identifying error-prone classes in post-release software evolution process , 2008, J. Syst. Softw..

[29]  Nikolai Kosmatov,et al.  Frama-C - A Software Analysis Perspective , 2012, SEFM.

[30]  Andreas Zeller,et al.  Mining metrics to predict component failures , 2006, ICSE.

[31]  Lionel C. Briand,et al.  Exploring the relationships between design measures and software quality in object-oriented systems , 2000, J. Syst. Softw..

[32]  Lionel C. Briand,et al.  A systematic and comprehensive investigation of methods to build and evaluate fault prediction models , 2010, J. Syst. Softw..

[33]  Mary Shaw,et al.  Experiences and results from initiating field defect prediction and product test prioritization efforts at ABB Inc. , 2006, ICSE.

[34]  L. Leemis Applied Linear Regression Models , 1991 .

[35]  Al DallalJehad Fault prediction and the discriminative powers of connectivity-based object-oriented class cohesion metrics , 2012 .

[36]  Yuming Zhou,et al.  On the ability of complexity metrics to predict fault-prone classes in object-oriented systems , 2010, J. Syst. Softw..

[37]  W. W. Muir,et al.  Regression Diagnostics: Identifying Influential Data and Sources of Collinearity , 1980 .

[38]  Lionel C. Briand,et al.  A Controlled Experiment for Evaluating Quality Guidelines on the Maintainability of Object-Oriented Designs , 2001, IEEE Trans. Software Eng..

[39]  Khaled El Emam,et al.  The Confounding Effect of Class Size on the Validity of Object-Oriented Metrics , 2001, IEEE Trans. Software Eng..

[40]  Taghi M. Khoshgoftaar,et al.  The Detection of Fault-Prone Programs , 1992, IEEE Trans. Software Eng..

[41]  Premkumar T. Devanbu,et al.  Comparing static bug finders and statistical prediction , 2014, ICSE.

[42]  Maurice H. Halstead,et al.  Elements of software science , 1977 .

[43]  Akito Monden,et al.  Revisiting common bug prediction findings using effort-aware models , 2010, 2010 IEEE International Conference on Software Maintenance.

[44]  Harald C. Gall,et al.  Cross-project defect prediction: a large scale experiment on data vs. domain vs. process , 2009, ESEC/SIGSOFT FSE.

[45]  Audris Mockus,et al.  A large-scale empirical study of just-in-time quality assurance , 2013, IEEE Transactions on Software Engineering.

[46]  Niclas Ohlsson,et al.  Predicting Fault-Prone Software Modules in Telephone Switches , 1996, IEEE Trans. Software Eng..

[47]  Karl J. Ottenstein,et al.  The program dependence graph in a software development environment , 1984, SDE 1.

[48]  David W. Binkley,et al.  Slice-based cohesion metrics and software intervention , 2004, 11th Working Conference on Reverse Engineering.

[49]  Glenford J. Myers,et al.  Structured Design , 1999, IBM Syst. J..

[50]  Doreen Meier,et al.  Structured Design Fundamentals Of A Discipline Of Computer Program And Systems Design , 2016 .

[51]  Rainer Koschke,et al.  Effort-Aware Defect Prediction Models , 2010, 2010 14th European Conference on Software Maintenance and Reengineering.

[52]  Laurie A. Williams,et al.  Evaluating Complexity, Code Churn, and Developer Activity Metrics as Indicators of Software Vulnerabilities , 2011, IEEE Transactions on Software Engineering.

[53]  J. Neter,et al.  Applied Linear Regression Models , 1983 .

[54]  James M. Bieman,et al.  Program slices as an abstraction for cohesion measurement , 1998, Inf. Softw. Technol..

[55]  Austen Rainer,et al.  An Introduction to Slice-Based Cohesion and Coupling Metrics , 2009 .

[56]  Premkumar T. Devanbu,et al.  Recalling the "imprecision" of cross-project defect prediction , 2012, SIGSOFT FSE.

[57]  Tracy Hall,et al.  An Analysis of the "Inconclusive' Change Report Category in OSS Assisted by a Program Slicing Metric , 2010, 2010 36th EUROMICRO Conference on Software Engineering and Advanced Applications.

[58]  Donald Eugene. Farrar,et al.  Multicollinearity in Regression Analysis; the Problem Revisited , 2011 .

[59]  Witold Pedrycz,et al.  A comparative analysis of the efficiency of change metrics and static code attributes for defect prediction , 2008, 2008 ACM/IEEE 30th International Conference on Software Engineering.

[60]  Meilir Page-Jones,et al.  The practical guide to structured systems design , 1980 .

[61]  Lawrence K. Saul,et al.  A Generalized Linear Model for Principal Component Analysis of Binary Data , 2003, AISTATS.

[62]  James M. Bieman,et al.  Measuring Functional Cohesion , 1994, IEEE Trans. Software Eng..

[63]  Jehad Al Dallal Software similarity-based functional cohesion metric , 2009, IET Softw..

[64]  Linda M. Ott,et al.  Slice based metrics for estimating cohesion , 1993, [1993] Proceedings First International Software Metrics Symposium.

[65]  Jehad Al Dallal Measuring the Discriminative Power of Object-Oriented Class Cohesion Metrics , 2011, IEEE Transactions on Software Engineering.

[66]  Victor R. Basili,et al.  Software errors and complexity: an empirical investigation0 , 1984, CACM.

[67]  James E. Tomayko,et al.  The structural complexity of software an experimental test , 2005, IEEE Transactions on Software Engineering.

[68]  Linda M. Ott,et al.  The Relationship Between Slices And Module Cohesion , 1989, 11th International Conference on Software Engineering.

[69]  Victor R. Basili,et al.  A validation of object oriented metrics as quality indicators , 1996 .