<p>Numerous Software Defect Prediction (SDP) approaches have been extensively studied within the object-oriented (OO) programming paradigm. However, there has been little to no empirical research on defect prediction for functional programming (FP) languages such as Haskell. This work presents the first comprehensive investigation into SDP for Haskell, addressing two key objectives. First, we construct novel SDP datasets derived from Haskell packages, extracting software metrics (SMs) at the function level directly from source code. Second, we propose a new SDP framework tailored to Haskell, which predicts defects using SM thresholding. A detailed statistical analysis reveals that the distribution of most SMs is significantly right-skewed. To mitigate this, we apply three transformation techniques to normalize the distributions and derive robust SM thresholds. Based on these thresholds, we introduce an unsupervised majority voting (UMV) ensemble algorithm for defect prediction. Our approach is evaluated on four Haskell package datasets using performance metrics including accuracy, F-measure (FM), Matthews Correlation Coefficient (MCC), average silhouette width, and defect-wise boxplots. The proposed UMV method consistently outperforms other unsupervised approaches, achieving an average accuracy of 93.43%, FM of 0.965, and MCC of 0.733. These results validate the effectiveness of the UMV model for defect prediction in Haskell. Given its performance and independence from labeled data, the proposed SM-based UMV approach holds promise for practical use in software reliability assessment within industry settings where labeled data is unavailable.</p>

错误:搜索内容不能为空,请输入英文关键词
错误:关键词超出字数限制,请精简
高级检索

Unsupervised Software Defect Prediction in Haskell: A Metrics-Driven Ensemble Approach Using Function-Level Thresholding

  • Rakesh Kumar,
  • Amrita Chaturvedi

摘要

Numerous Software Defect Prediction (SDP) approaches have been extensively studied within the object-oriented (OO) programming paradigm. However, there has been little to no empirical research on defect prediction for functional programming (FP) languages such as Haskell. This work presents the first comprehensive investigation into SDP for Haskell, addressing two key objectives. First, we construct novel SDP datasets derived from Haskell packages, extracting software metrics (SMs) at the function level directly from source code. Second, we propose a new SDP framework tailored to Haskell, which predicts defects using SM thresholding. A detailed statistical analysis reveals that the distribution of most SMs is significantly right-skewed. To mitigate this, we apply three transformation techniques to normalize the distributions and derive robust SM thresholds. Based on these thresholds, we introduce an unsupervised majority voting (UMV) ensemble algorithm for defect prediction. Our approach is evaluated on four Haskell package datasets using performance metrics including accuracy, F-measure (FM), Matthews Correlation Coefficient (MCC), average silhouette width, and defect-wise boxplots. The proposed UMV method consistently outperforms other unsupervised approaches, achieving an average accuracy of 93.43%, FM of 0.965, and MCC of 0.733. These results validate the effectiveness of the UMV model for defect prediction in Haskell. Given its performance and independence from labeled data, the proposed SM-based UMV approach holds promise for practical use in software reliability assessment within industry settings where labeled data is unavailable.