arXivDaily arXiv每日学术速递 周一至周五更新
arXiv周末暂无论文更新,休息一下吧,周末愉快~~
arXiv 1703.06300cs.SE
收藏

代码中带有异味的缺陷预测

Defect prediction with bad smells in code

Jarosław Hryszko, Lech Madeyski, Marta Dąbrowska, Piotr Konopka

摘要:

背景资料:软件中的缺陷预测对于开发项目来说是非常有益的,因为预测是非常有效的,并且容易出现缺陷的区域被正确地预测。获得有效的软件缺陷预测的关键因素之一是正确选择用于数据集准备的度量。目的:本研究的目的是验证,是否代码气味度量,收集使用Microsoft CodeAnalysis工具,添加到基本度量集,可以提高缺陷预测在工业软件开发项目。结果如下:我们验证了,如果数据集扩展的代码气味来源的指标,改变缺陷预测的有效性,通过比较预测结果的数据集与代码气味导向的指标。结果,我们观察到,当使用用难闻气味度量扩展的数据集时,缺陷预测的有效性只有很小的提高:平均准确度值增加了0.0091,并保持在误差范围内。然而,当仅使用基于代码气味的度量用于预测(没有基本度量集)时,这样的过程产生了令人惊讶的高准确度(0.8249)和F测量(0.8286)结果。我们还详细阐述了当使用两个不同的度量源来准备一组一致的数据时,我们观察到的数据异常和问题。结论:通过代码气味源度量扩展数据集不会显着提高预测效率。取得的结果并不能补偿收集额外指标所需的努力。然而,我们观察到,仅基于代码气味的缺陷预测仍然非常有效,特别是在几乎不使用其他度量的情况下可以使用。

英文摘要:

Background: Defect prediction in software can be highly beneficial for development projects, when prediction is highly effective and defect-prone areas are predicted correctly. One of the key elements to gain effective software defect prediction is proper selection of metrics used for dataset preparation. Objective: The purpose of this research is to verify, whether code smells metrics, collected using Microsoft CodeAnalysis tool, added to basic metric set, can improve defect prediction in industrial software development project. Results: We verified, if dataset extension by the code smells sourced metrics, change the effectiveness of the defect prediction by comparing prediction results for datasets with and without code smells-oriented metrics. In a result, we observed only small improvement of effectiveness of defect prediction when dataset extended with bad smells metrics was used: average accuracy value increased by 0.0091 and stayed within the margin of error. However, when only use of code smells based metrics were used for prediction (without basic set of metrics), such process resulted with surprisingly high accuracy (0.8249) and F-measure (0.8286) results. We also elaborated data anomalies and problems we observed when two different metric sources were used to prepare one, consistent set of data. Conclusion: Extending the dataset by the code smells sourced metric does not significantly improve the prediction effectiveness. Achieved result did not compensate effort needed to collect additional metrics. However, we observed that defect prediction based on the code smells only is still highly effective and can be used especially where other metrics hardly be used.

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑