Skip to main content
QUICK REVIEW

[Paper Review] Using Source Code Metrics and Ensemble Methods for Fault Proneness Prediction

Lov Kumar, Santanu Kumar Rath|arXiv (Cornell University)|Apr 14, 2017
Software Engineering ResearchComputer Science5 citations
TL;DR

This paper proposes an ensemble-based fault proneness prediction framework using optimized source code metrics to improve prediction accuracy and reduce fault removal costs. By applying Majority Voting Ensemble (MVE) with a curated set of metrics across 45 open-source projects, the method achieves superior performance and lower cost compared to individual models, particularly effective for projects with less than 55% faulty classes.

ABSTRACT

Software fault prediction model are employed to optimize testing resource allocation by identifying fault-prone classes before testing phases. Several researchers' have validated the use of different classification techniques to develop predictive models for fault prediction. The performance of the statistical models are proven to be influenced by the training and testing dataset. Ensemble method learning algorithms have been widely used because it combines the capabilities of its constituent models towards a dataset to come up with a potentially higher performance as compared to individual models (improves generalizability). In the study presented in this paper, three different ensemble methods have been applied to develop a model for predicting fault proneness. The efficacy and usefulness of a fault prediction model also depends on the source code metrics which are considered as the input for the model. In this paper, we propose a framework to validate the source code metrics and select the right set of metrics with the objective to improve the performance of the fault prediction model. The fault prediction models are then validated using a cost evaluation framework. We conduct a series of experiments on 45 open source project dataset. Key conclusions from our experiments are: (1) Majority Voting Ensemble (MVE) methods outperformed other methods; (2) selected set of source code metrics using the suggested source code metrics using validation framework as the input achieves better results compared to all other metrics; (3) fault prediction method is effective for software projects with a percentage of faulty classes lower than the threshold value (low - 54.82%, medium - 41.04%, high - 28.10%)

Motivation & Objective

  • To improve fault proneness prediction accuracy by combining multiple machine learning models through ensemble techniques.
  • To identify and validate a minimal, high-impact set of source code metrics that enhance model performance.
  • To evaluate the economic impact of fault prediction models using cost evaluation metrics such as normalized fault removal cost.
  • To determine the threshold percentage of faulty classes beyond which fault prediction becomes less cost-effective.
  • To generalize findings across diverse open-source software projects to improve model generalizability.

Proposed method

  • Employed three ensemble methods—Majority Voting Ensemble (MVE), Bagging, and Stacking—using base learners including logistic regression, artificial neural networks (ANN), and radial basis function (RBF) networks.
  • Selected source code metrics using a validation framework to filter out redundant or low-impact metrics, focusing on 16 key metrics including WMC, CBO, LCOM, and cyclomatic complexity (CC).
  • Calculated fault prediction performance using accuracy and F-Measure, with statistical significance tested via the Wilcoxon signed-rank test.
  • Integrated a cost evaluation model based on Wagner et al. [21] and Jones [6], computing estimated fault removal cost ($E_{cost}$) and testing cost ($T_{cost}$) to assess economic efficiency.
  • Applied logistic regression to model the probability of fault prediction usefulness based on the percentage of faulty classes, with a threshold of 0.5 for $P_{fault}$.
  • Used the PROMISE repository to collect 45 real-world open-source Java projects for cross-project evaluation, ensuring diverse and realistic dataset coverage.

Experimental results

Research questions

  • RQ1Which ensemble method yields the highest fault proneness prediction accuracy across diverse software projects?
  • RQ2Does selecting a reduced, validated set of source code metrics improve prediction performance compared to using all available metrics?
  • RQ3How does the fault prediction model’s economic efficiency vary with the percentage of faulty classes in a software project?
  • RQ4At what threshold of faulty class percentage does fault prediction become economically less useful?
  • RQ5Can the proposed ensemble model with optimized metrics consistently outperform individual classifiers across multiple open-source projects?

Key findings

  • Majority Voting Ensemble (MVE) outperformed other ensemble methods, achieving the highest median accuracy and lowest normalized fault removal cost.
  • The model using the selected set of source code metrics achieved significantly better performance than the model using all metrics, with a p-value < 0.05 from the Wilcoxon signed-rank test.
  • Fault prediction is most effective for projects with less than 54.82% (low), 41.04% (medium), or 28.10% (high) faulty classes, depending on cost parameters.
  • The MVE-based model reduced fault removal cost more effectively than other techniques, as shown by lower median values of normalized fault removal cost ($NE_{cost}$).
  • The logistic regression model confirmed that fault prediction is useful when the probability of faulty classes is below 0.5, with threshold values of 38.14% (LOGR) and 48.75% (ANN) for specific cost parameters.
  • The cost evaluation framework demonstrated that fault prediction is economically beneficial only when the fault rate is below a project-specific threshold, validating its practical applicability.

Read this paper

Open the full text in the Nubint reader and ask about any passage as you read.

Read this paper on Nubint

This review was generated by AI from the original paper. Please check the paper before citing it.