arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2103.11321cs.SE
收藏

基于软件故障树和SonarQube规则的故障预测。机器还是深度学习?

Fault Prediction based on Software Metrics and SonarQube Rules. Machine or Deep Learning?

Francesco Lomio, Sergio Moreschini, Valentina Lenarduzzi

摘要:

背景开发人员花费更多的时间来修复错误和重构代码,以增加可维护性,而不是开发新功能。研究人员调查了代码质量对错误倾向的影响,重点关注代码气味和代码度量。Objective.我们的目标是推进故障诱导提交预测的基础上SonarQube考虑每个规则和度量提供的贡献。法我们设计并进行了一个案例研究,在33个Java项目中使用SonarQube和SZZ进行分析,以识别错误诱导和错误修复提交。此外,我们使用机器和深度学习模型研究了每个SonarQube规则和度量的故障倾向。结果我们分析了77,932次提交,其中包含40,890个错误,并被超过174个SonarQube规则感染,违反了1900万次,在此基础上计算了该工具可用的24个软件指标。与机器学习模型相比,深度学习提供了更准确的故障检测精度,并允许我们准确地识别每个SonarQube规则的故障预测能力。结果表明,在174条违规规则中,有14条规则的重要性大于1%,约占总错误倾向重要性的30%,其余165条规则的错误倾向性可以忽略不计。结论未来的工作可能会考虑采用时间序列分析和异常检测技术,以更好,更准确地检测影响故障倾向的规则。

英文摘要:

Background. Developers spend more time fixing bugs and refactoring the code to increase the maintainability than developing new features. Researchers investigated the code quality impact on fault-proneness focusing on code smells and code metrics. Objective. We aim at advancing fault-inducing commit prediction based on SonarQube considering the contribution provided by each rule and metric. Method. We designed and conducted a case study among 33 Java projects analyzed with SonarQube and SZZ to identify fault-inducing and fault-fixing commits. Moreover, we investigated fault-proneness of each SonarQube rule and metric using Machine and Deep Learning models. Results. We analyzed 77,932 commits that contain 40,890 faults and infected by more than 174 SonarQube rules violated 1,9M times, on which there was calculated 24 software metrics available by the tool. Compared to machine learning models, deep learning provide a more accurate fault detection accuracy and allowed us to accurately identify the fault-prediction power of each SonarQube rule. As a result, fourteen of the 174 violated rules has an importance higher than 1\% and account for 30\% of the total fault-proneness importance, while the fault proneness of the remaining 165 rules is negligible. Conclusion. Future works might consider the adoption of timeseries analysis and anomaly detection techniques to better and more accurately detect the rules that impact fault-proneness.

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

↑