paperbot · PL 论文追踪

全部论文 待读 收藏

P2 Scaffle: bug localization on millions of files

Scaffle:百万级文件上的缺陷定位
ISSTA Proceedings of the 29th ACM SIGSOFT International Symposium on Software Testing and Analysis2020匹配度 3/10 · 该论文将机器学习与信息检索用于大规模崩溃缺陷定位,属于ML与软件工程/调试的交叉,具备工业级落地案例;但它不涉及静态分析、LLM/Agent、浮点程序分析或贝叶斯程序分析,与用户当前核心研究方向距离较远。引用 35 inbox
Michael Pradel, Vijayaraghavan Murali, Rebecca Qian, Mateusz Machalica, Erik Meijer, Satish Chandra
crossref: 2026-09-12

AI 速览

一句话:提出 Scaffle,将大规模崩溃缺陷定位拆分为机器学习行筛选与信息检索文件检索两步,在 Facebook 百万级异构代码库上取得 40%–60% 的 top-1 准确率。

论文研究如何在包含数百万个文件、多种编程语言的超大规模异构代码库中,仅凭崩溃痕迹定位需要修复的根因文件。已有方法难以扩展到该规模。Scaffle 的核心思路是将问题分解为两个更易处理的子问题:首先用训练好的机器学习模型预测原始崩溃痕迹中哪些行对定位缺陷最具信息量,然后将这些行作为查询输入基于信息检索的搜索引擎,从代码库中检索出最可能需要修改的文件路径。该方法不对崩溃痕迹的格式或产生它的语言作任何假设。作者在 Facebook 大规模工业代码库(含数百万可能缺陷位置、支撑数十亿用户所用工具)产生的数万条崩溃痕迹上进行评估,结果显示在 top-1(top-5)预测中正确预测待修复文件的比例为 40%–60%(50%–70%),并优于已有分类方法、可扩展的信息检索变体以及一组人工调优并已部署的工业启发式规则。

问题
超大规模、多语言的异构代码库中,仅凭崩溃痕迹定位需要修复的根因文件,已有方法难以扩展且依赖对痕迹格式或语言的假设。
方法
先用机器学习模型从原始崩溃痕迹中预测最具信息量的行,再将这些行输入基于信息检索的搜索引擎以检索出待修改的文件路径,全程不假设痕迹格式与编程语言。
评估
在 Facebook 工业级代码库产生的数万条崩溃痕迹上评估,top-1 准确率为 40%–60%,top-5 为 50%–70%,并与分类基线、可扩展 IR 变体及工业部署启发式规则进行对比。
原文摘要(Abstract)

Despite all efforts to avoid bugs, software sometimes crashes in the field, leaving crash traces as the only information to localize the problem. Prior approaches on localizing where to fix the root cause of a crash do not scale well to ultra-large scale, heterogeneous code bases that contain millions of code files written in multiple programming languages. This paper presents Scaffle, the first scalable bug localization technique, which is based on the key insight to divide the problem into two easier sub-problems. First, a trained machine learning model predicts which lines of a raw crash trace are most informative for localizing the bug. Then, these lines are fed to an information retrieval-based search engine to retrieve file paths in the code base, predicting which file to change to address the crash. The approach does not make any assumptions about the format of a crash trace or the language that produces it. We evaluate Scaffle with tens of thousands of crash traces produced by a large-scale industrial code base at Facebook that contains millions of possible bug locations and that powers tools used by billions of people. The results show that the approach correctly predicts the file to fix for 40% to 60% (50% to 70%) of all crash traces within the top-1 (top-5) predictions. Moreover, Scaffle improves over several baseline approaches, including an existing classification-based approach, a scalable variant of existing information retrieval-based approaches, and a set of hand-tuned, industrially deployed heuristics.

链接与引用

DOI 原文 ·

BibTeX
@inproceedings{paperbot6038,
  title = {Scaffle: bug localization on millions of files},
  author = {Michael Pradel and Vijayaraghavan Murali and Rebecca Qian and Mateusz Machalica and Erik Meijer and Satish Chandra},
  booktitle = {ISSTA},
  year = {2020},
  doi = {10.1145/3395363.3397356}
}