一句话:提出可扩展的多语言缺陷-修复收集方法,通过缺陷跟踪与定向注入生成可执行、精确的缺陷数据集。
现有缺陷数据集难以兼顾精确与规模:手工验证数据集精确但小,基于提交信息处理的大规模数据集不精确。本文提出 PreciseBugCollector,一种精确、多语言缺陷-修复收集方法。它包含两个组件:缺陷跟踪器将代码库与外部缺陷仓库(NVD、OSS-Fuzz)映射以追踪缺陷类型;缺陷注入器向正确代码库注入噪声,并在测试套件上执行以获取失败信息,从而生成项目特定缺陷。系统基于16条注入规则,已从2968个开源项目收集1,057,818个缺陷,其中12,602个来自缺陷仓库,1,045,216个由注入器生成。作者认为注入方法对工业场景有价值,因项目特定缺陷符合领域知识、共享代码库并遵循工业编码风格。
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 Precise-BugCollector, 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.
@inproceedings{YeCG23,
title = {PreciseBugCollector: Extensible, Executable and Precise Bug-Fix Collection: Solution for Challenge 8: Automating Precise Data Collection for Code Snippets with Bugs, Fixes, Locations, and Types},
author = {Ye He and Zimin Chen and Claire Le Goues},
booktitle = {ASE},
year = {2023},
doi = {10.1109/ase56229.2023.00163}
}