A systematic mapping study on cross-project defect prediction

Steffen HerboldarXiv 2017

Introduction

Software quality assurance is a high-stakes game of resource allocation. Test managers must identify where bugs are likely to hide to focus limited time and budget effectively. Defect prediction tools assist in this by flagging "defect-prone" modules based on historical data. However, traditional models rely on Within-Project Defect Prediction (WPDP), which requires a project to have its own history of bugs—a "cold start" problem for brand-new projects or companies without data.

Cross-Project Defect Prediction (CPDP) is the proposed solution, using data from one project to predict bugs in another. While promising, the field has become a fragmented sea of different techniques, datasets, and metrics. This paper provides a comprehensive "map" of the CPDP landscape, analyzing 49 key studies published between 2002 and 2015 to systematize what we know and where the research is stalled.

Methodology

The study followed the rigorous Systematic Mapping Study guidelines of Kitchenham and Charters. The process began with a broad search to capture the diversity of terminology used in the field.

Table 1: Search terms and result counts illustrating the initial broad scope of the mapping study.

From approximately 6,000 hits, 49 relevant, peer-reviewed publications were identified and categorized based on five research questions: approaches used, underlying classifiers, datasets, performance metrics, and baselines for comparison. Notably, the study avoids a numerical meta-analysis because the experimental setups across these papers were too diverse for scientifically sound direct comparison.

The Seven Pillars of CPDP

The research identifies seven distinct strategies currently employed in the field:

  1. Instance Standardization: Rescaling data to minimize differences between projects.
  2. Classification Models: Tailoring algorithms specifically for cross-project shifts.
  3. Feature Selection: Picking metrics that translate effectively across different projects.
  4. Data Privacy: Techniques like MORPH that allow sharing defect data without revealing proprietary code.
  5. Metric Influence: Studying how specific metric types (e.g., complexity vs. process) affect prediction.
  6. Data Source Influence: Comparing the performance of open-source data when predicting proprietary bugs.
  7. Heterogeneous CPDP: Handling cases where source and target projects do not use the same metrics.

Relevancy filtering emerged as the most popular approach, appearing in 14 papers. This involves finding the "closest" data points in the source project to the target project to ensure training data is relevant to the prediction task.

Dataset Landscape and the "Comparison Crisis"

Nine public datasets form the backbone of CPDP research. The JURECZKO dataset is the most popular (used in 20 publications), followed by the NASA (MDP) set. Newer datasets like AEEEM and RELINK include more complex metrics like source code churn and manually verified labels.

However, a troubling trend was identified: researchers frequently use different subsets or versions of these datasets. This inconsistency, combined with a lack of standardized reporting, has created a "comparison crisis" where it is nearly impossible to determine which algorithms actually perform best.

Key Results and the Replication Gap

Logistic Regression and Naive Bayes remain the most popular classifiers due to their simplicity and interpretability. While Recall is the most reported metric, there is significant disagreement regarding other metrics like F-measure or AUC. Furthermore, there is no "gold standard" baseline for comparison; most studies compare against naive CPDP or WPDP models without a consistent benchmark.

Perhaps most critically, the study highlights a massive replication gap. Only 10 of the proposed approaches were ever re-used or replicated by other researchers. Most papers propose a "novel" method that is never independently validated.

Conclusion and Future Directions

The primary limitation in CPDP is not the algorithms themselves, but the culture of the research. To move the field forward, the community must adopt standardized reporting guidelines for data versions and metrics. Future work should shift away from inventing new algorithms toward replicating existing ones and solving the challenges of Heterogeneous CPDP, where different projects use entirely different metric sets.

Summary updated

BibTeX
@misc{herbold2017systematic,
  author = {Steffen Herbold},
  title = {{A systematic mapping study on cross-project defect prediction}},
  year = {2017},
  eprint = {1705.06429},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/1705.06429},
}
Figure