PreciseBugCollector:可扩展、可执行且精准的缺陷修复集构建方法
PreciseBugCollector: Extensible, Executable and Precise Bug-fix Collection
AI总结:
针对现有缺陷数据集精准度与规模难以兼顾的问题,提出基于缺陷追踪器和缺陷注入器的多语言缺陷收集方法PreciseBugCollector,已构建含百万级缺陷的大规模精准数据集,适配工业场景需求。
摘要:
缺陷数据集对支撑深度学习技术解决与缺陷相关的软件维护任务至关重要。然而,现有缺陷数据集存在精准度和规模两方面的局限:要么是经过人工验证的小规模精准数据集,要么是通过简单提交信息处理得到的大规模但不精准的数据集。本文提出PreciseBugCollector,这是一种精准的多语言缺陷收集方法,能够克服上述两大局限。PreciseBugCollector基于两个创新组件:a)缺陷追踪器,用于将代码库仓库与外部缺陷仓库映射,以追踪缺陷类型信息;b)缺陷注入器,通过向正确的代码库中注入噪声生成项目特定缺陷,再针对其测试套件执行代码以获取测试失败信息。\n我们基于三个来源实现了PreciseBugCollector:1)关联国家漏洞数据集(NVD)的缺陷追踪器,用于收集通用型漏洞;2)关联OSS-Fuzz的缺陷追踪器,用于收集通用型缺陷;3)基于16条注入规则的缺陷注入器,用于生成项目级缺陷。截至目前,PreciseBugCollector包含从2968个开源项目中提取的1057818个缺陷。其中,12602个缺陷来自缺陷仓库(NVD和OSS-Fuzz),其余1045216个项目特定缺陷由缺陷注入器生成。考虑到挑战目标,我们认为缺陷注入方法在工业场景中极具价值,因为项目特定缺陷符合领域知识、共享同一代码库,且遵循工业项目采用的编码风格。
英文摘要:
Bug datasets are vital for enabling deep learning techniques to address software maintenance tasks related to bugs. However, existing bug datasets suffer from precise and scale limitations: they are either small-scale but precise with manual validation or large-scale but imprecise with simple commit message processing. In this paper, we introduce PreciseBugCollector, a precise, multi-language bug collection approach that overcomes these two limitations. PreciseBugCollector is based on two novel components: a) A bug tracker to map the codebase repositories with external bug repositories to trace bug type information, and b) A bug injector to generate project-specific bugs by injecting noise into the correct codebases and then executing them against their test suites to obtain test failure messages. We implement PreciseBugCollector against three sources: 1) A bug tracker that links to the national vulnerability data set (NVD) to collect general-wise vulnerabilities, 2) A bug tracker that links to OSS-Fuzz to collect general-wise bugs, and 3) A bug injector based on 16 injection rules to generate project-wise bugs. To date, PreciseBugCollector comprises 1057818 bugs extracted from 2968 open-source projects. Of these, 12602 bugs are sourced from bug repositories (NVD and OSS-Fuzz), while the remaining 1045216 project-specific bugs are generated by the bug injector. Considering the challenge objectives, we argue that a bug injection approach is highly valuable for the industrial setting, since project-specific bugs align with domain knowledge, share the same codebase, and adhere to the coding style employed in industrial projects.
机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。