arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2601.18844cs.SEcs.AI
收藏

利用大语言模型减少静态bug检测中的误报:一项行业内的实证研究

Reducing False Positives in Static Bug Detection with LLMs: An Empirical Study in Industry

Fudan University(复旦大学);Tencent(腾讯)

Xueying Du, Jiayi Feng, Yi Zou, Wei Xu, Jie Ma, Wei Zhang, Sisi Liu, Xin Peng, Yiling Lou

AI总结:

本研究利用大语言模型在腾讯企业环境中减少静态代码分析中的误报,通过实证研究展示LLM在工业场景下的高效性和成本效益。

摘要:

静态分析工具(SATs)在学术界和工业界被广泛采用,以提高软件质量,但其实际应用常常受到高误报率的阻碍,尤其是在大规模企业系统中。这些误报需要大量的手动检查,导致工业代码审查效率严重低下。尽管最近的研究展示了大语言模型(LLMs)在开源基准上减少误报的潜力,但其在真实企业环境中的有效性仍不清楚。为了填补这一空白,我们在中国最大的IT公司之一腾讯进行了一项首次全面的实证研究,评估了多种基于LLM的误报减少技术。使用腾讯企业定制化的SAT在其大规模广告和营销服务软件中的数据,我们构建了一个包含433个警报(328个假阳性,105个真阳性)的数据集,涵盖三种常见的bug类型。通过与开发人员访谈和分析数据,我们的结果突显了假阳性现象的普遍性,这浪费了大量人工努力(例如,每个警报的 manual inspection 需要10-20分钟)。同时,我们的结果表明LLMs在工业环境中减少误报的巨大潜力(例如,LLM和静态分析的混合技术可消除94-98%的假阳性,同时保持高召回率)。此外,基于LLM的技术具有成本效益,每个警报的成本低至2.1-109.5秒和$0.0011-$0.12,相比手动审查节省了数量级的费用。最后,我们的案例分析进一步识别了LLM在工业环境中减少误报的主要局限性。

英文摘要:

Static analysis tools (SATs) are widely adopted in both academia and industry for improving software quality, yet their practical use is often hindered by high false positive rates, especially in large-scale enterprise systems. These false alarms demand substantial manual inspection, creating severe inefficiencies in industrial code review. While recent work has demonstrated the potential of large language models (LLMs) for false alarm reduction on open-source benchmarks, their effectiveness in real-world enterprise settings remains unclear. To bridge this gap, we conduct the first comprehensive empirical study of diverse LLM-based false alarm reduction techniques in an industrial context at Tencent, one of the largest IT companies in China. Using data from Tencent's enterprise-customized SAT on its large-scale Advertising and Marketing Services software, we construct a dataset of 433 alarms (328 false positives, 105 true positives) covering three common bug types. Through interviewing developers and analyzing the data, our results highlight the prevalence of false positives, which wastes substantial manual effort (e.g., 10-20 minutes of manual inspection per alarm). Meanwhile, our results show the huge potential of LLMs for reducing false alarms in industrial settings (e.g., hybrid techniques of LLM and static analysis eliminate 94-98% of false positives with high recall). Furthermore, LLM-based techniques are cost-effective, with per-alarm costs as low as 2.1-109.5 seconds and $0.0011-$0.12, representing orders-of-magnitude savings compared to manual review. Finally, our case analysis further identifies key limitations of LLM-based false alarm reduction in industrial settings.

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

↑