[论文解读] Using Source Code Metrics and Ensemble Methods for Fault Proneness Prediction
本文提出了一种基于集成的缺陷易发性预测框架,通过优化的源代码度量来提高预测准确率并降低缺陷移除成本。通过在45个开源项目中应用经筛选的度量集与多数投票集成(MVE)方法,该方法在预测性能和成本方面均优于单一模型,尤其在缺陷类比例低于55%的项目中表现更优。
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%)
研究动机与目标
- 通过集成技术结合多个机器学习模型,提升缺陷易发性预测的准确率。
- 识别并验证一组最小但具有高影响力的源代码度量,以提升模型性能。
- 利用归一化缺陷移除成本等成本评估指标,评估缺陷预测模型的经济影响。
- 确定缺陷预测在经济上不再具有效用的缺陷类比例阈值。
- 在多样化的开源软件项目中推广研究成果,以提升模型的泛化能力。
提出的方法
- 采用三种集成方法——多数投票集成(MVE)、自助聚合(Bagging)和堆叠(Stacking),基础学习器包括逻辑回归、人工神经网络(ANN)和径向基函数(RBF)网络。
- 通过验证框架筛选源代码度量,剔除冗余或低影响力度量,聚焦于16个关键度量,包括WMC、CBO、LCOM和环路复杂度(CC)。
- 使用准确率和F-Measure评估缺陷预测性能,并通过Wilcoxon符号秩检验验证统计显著性。
- 基于Wagner等人[21]和Jones[6]的成本评估模型,计算估计缺陷移除成本($E_{cost}$)和测试成本($T_{cost}$),以评估经济效率。
- 使用逻辑回归建立缺陷预测有用性的概率模型,基于缺陷类比例,$P_{fault}$的阈值设为0.5。
- 使用PROMISE代码库收集45个真实世界的开源Java项目,用于跨项目评估,确保数据集的多样性和现实性。
实验结果
研究问题
- RQ1在多样化软件项目中,哪种集成方法能实现最高的缺陷易发性预测准确率?
- RQ2与使用全部可用度量相比,选择精简且经过验证的源代码度量集是否能提升预测性能?
- RQ3缺陷预测模型的经济效率如何随软件项目中缺陷类比例的变化而变化?
- RQ4当缺陷类比例达到何种阈值时,缺陷预测在经济上变得不再有用?
- RQ5所提出的集成模型结合优化度量是否能在多个开源项目中持续优于单一分类器?
主要发现
- 多数投票集成(MVE)优于其他集成方法,实现了最高的中位数准确率和最低的归一化缺陷移除成本。
- 使用选定度量集的模型性能显著优于使用全部度量的模型,Wilcoxon符号秩检验的p值 < 0.05。
- 缺陷预测对缺陷类比例低于54.82%(低)、41.04%(中)或28.10%(高)的项目最为有效,具体取决于成本参数。
- 基于MVE的模型在降低缺陷移除成本方面优于其他技术,表现为归一化缺陷移除成本($NE_{cost}$)的中位数更低。
- 逻辑回归模型确认,当缺陷类概率低于0.5时,缺陷预测具有实用性,特定成本参数下,LOGR和ANN的阈值分别为38.14%和48.75%。
- 成本评估框架表明,仅当缺陷率低于项目特定阈值时,缺陷预测才具有经济收益,验证了其实际适用性。
更好的研究,从现在开始
从阅读论文到最终审阅,大幅缩短您的研究时间。
无需绑定信用卡
本解读由 AI 生成,并经人工编辑审核。