Software defect prediction using Bayesian networks

  • Authors:
  • Ahmet Okutan;Olcay Taner Yıldız

  • Affiliations:
  • Department of Computer Engineering, Işık University, Istanbul, Turkey and Meşrutiyet Koyu Universite Sokak, Istanbul, Turkey;Department of Computer Engineering, Işık University, Istanbul, Turkey and Meşrutiyet Koyu Universite Sokak, Istanbul, Turkey

  • Venue:
  • Empirical Software Engineering
  • Year:
  • 2014

Quantified Score

Hi-index 0.00

Visualization

Abstract

There are lots of different software metrics discovered and used for defect prediction in the literature. Instead of dealing with so many metrics, it would be practical and easy if we could determine the set of metrics that are most important and focus on them more to predict defectiveness. We use Bayesian networks to determine the probabilistic influential relationships among software metrics and defect proneness. In addition to the metrics used in Promise data repository, we define two more metrics, i.e. NOD for the number of developers and LOCQ for the source code quality. We extract these metrics by inspecting the source code repositories of the selected Promise data repository data sets. At the end of our modeling, we learn the marginal defect proneness probability of the whole software system, the set of most effective metrics, and the influential relationships among metrics and defectiveness. Our experiments on nine open source Promise data repository data sets show that response for class (RFC), lines of code (LOC), and lack of coding quality (LOCQ) are the most effective metrics whereas coupling between objects (CBO), weighted method per class (WMC), and lack of cohesion of methods (LCOM) are less effective metrics on defect proneness. Furthermore, number of children (NOC) and depth of inheritance tree (DIT) have very limited effect and are untrustworthy. On the other hand, based on the experiments on Poi, Tomcat, and Xalan data sets, we observe that there is a positive correlation between the number of developers (NOD) and the level of defectiveness. However, further investigation involving a greater number of projects is needed to confirm our findings.