运用包围学习评估静态分析推理的有效性
Assessing Validity of Static Analysis Warnings using Ensemble Learning
摘要:
静态分析(SA)工具用于识别代码中的潜在弱点,并在代码开发过程中提前修复这些弱点。在具有高复杂性的遗留代码库中,这些基于规则的静态分析工具通常会在报告实际警告的同时报告大量错误警告。尽管SA工具发现了许多隐藏的错误,但它们被大量的虚假警告所掩盖。开发人员花费大量的时间和精力来识别真正的警告。除了影响开发人员的生产力外,由于这一挑战,真正的bug也会被遗漏。为了解决这个问题,我们提出了一个基于机器学习(ML)的学习过程,该过程使用源代码、历史提交数据和分类器集成来优先考虑给定警告列表中的True警告。该工具集成到开发工作流中,以过滤掉错误警告并优先考虑实际错误。我们评估了我们的方法对网络C代码,从一个大的数据池的静态分析警告报告的工具。开发人员会不时地处理这些警告,将其标记为真实的bug或假警报。ML模型在对代码功能进行全面监督的情况下进行训练。我们的研究结果证实,在传统的静态分析报告中应用深度学习是一种可以大幅降低误报率的可靠方法。
英文摘要:
Static Analysis (SA) tools are used to identify potential weaknesses in code and fix them in advance, while the code is being developed. In legacy codebases with high complexity, these rules-based static analysis tools generally report a lot of false warnings along with the actual ones. Though the SA tools uncover many hidden bugs, they are lost in the volume of fake warnings reported. The developers expend large hours of time and effort in identifying the true warnings. Other than impacting the developer productivity, true bugs are also missed out due to this challenge. To address this problem, we propose a Machine Learning (ML)-based learning process that uses source codes, historic commit data, and classifier-ensembles to prioritize the True warnings from the given list of warnings. This tool is integrated into the development workflow to filter out the false warnings and prioritize actual bugs. We evaluated our approach on the networking C codes, from a large data pool of static analysis warnings reported by the tools. Time-to-time these warnings are addressed by the developers, labelling them as authentic bugs or fake alerts. The ML model is trained with full supervision over the code features. Our results confirm that applying deep learning over the traditional static analysis reports is an assuring approach for drastically reducing the false positive rates.
机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。