Companion website for the following paper submitted to the Journal of Systems and Software

Predicting Software Defects with Causality Tests

Predicting Software Defects with Causality Tests

Cesar Couto1,2, Pedro Pires1,
Marco Tulio Valente1, Roberto S. Bigonha1, Nicolas Anquetil3
1Department of Computer Science, UFMG, Brazil
2Department of Computing, CEFET-MG, Brazil
3RMoD Team, INRIA, Lille, France
{cesarfmc,ppires,mtov,bigonha}@dcc.ufmg.br, nicolas.anquetil@inria.fr

Abstract

Defect prediction is an important challenge for software engineering research. Despite the relevance of the issue, most defect prediction approaches are based on linear or logistic regressions between the predictor and the presence of defects. However, it is well known that standard regression models cannot filter out spurious relations. Therefore, in this paper we propose a defect prediction approach centered on more robust evidences towards causality between source code metrics (as predictors) and the occurrence of defects. For this purpose, we rely on Granger Causality Test to evaluate whether past changes to a given time series of source code metrics are useful to forecast changes to a time series of defects. More specifically, our approach triggers alarms when changes made to the source code of a target system have a high chance of producing defects. We evaluated our approach in several life stages of four Java-based systems. Our approach reached an average precision of 50% in three out of the four systems we evaluated. Moreover, by comparing our approach with baselines that are not based on causality tests, it achieved a better precision.

Time Series of Metrics and Defects: Eclipse JDT Core , Eclipse PDE UI , Equinox , Lucene