一句话:提出依赖敏感增量调试方法 C2D2,通过依赖概率与矩阵搜索高效提取真实缺陷的关键变更。
数据驱动技术有望自动定位和修复缺陷,但其效果依赖缺陷数据集的质量与规模,而人工从真实缺陷中隔离最小 bug-inducing 或 bug-fixing 变更(即关键变更)仍十分困难。传统 delta debugging 在学术基准上能提取关键变更,但面对依赖关系复杂的真实缺陷时效率与准确性受限。本文提出 C2D2:一种依赖敏感的 delta debugging 方法,它估计代码变更元素之间的依赖概率,引入基于矩阵的搜索机制来应对缺失依赖导致的编译错误,并提供混合机制以在增量调试过程中灵活选择变更元素。在 Defects4J 和真实回归缺陷数据集上的实验表明,C2D2 相比 ddmin 显著更高效且效果相当,相比当前最佳的 ProbDD 显著更有效且更高效;与人工隔离的关键变更相比,C2D2 在 Defects4J 中 56% 的案例、回归数据集中 86% 的案例产生相同或更好的结果,说明其能自动提取关键变更并减少构建大规模真实缺陷数据集的人工负担。
Data-driven techniques are promising for automatically locating and fixing bugs, which can reduce enormous time and effort for developers. However, the effectiveness of these techniques heavily relies on the quality and scale of bug datasets. Despite that emerging approaches to automatic bug dataset construction partially provide a solution for scalability, data quality remains a concern. Specifically, it remains a barrier for humans to isolate the minimal set of bug-inducing or bug-fixing changes, known as critical changes. Although delta debugging (DD) techniques are capable of extracting critical changes on benchmark datasets in academia, the efficiency and accuracy are still limited when dealing with real-world bugs, where code change dependencies could be overly complicated. In this paper, we propose C2D2, a novel delta debugging approach for critical change extraction, which estimates the probabilities of dependencies between code change elements. C2D2 considers the probabilities of dependencies and introduces a matrix-based search mechanism to resolve compilation errors (CE) caused by missing dependencies. It also provides hybrid mechanisms for flexibly selecting code change elements during the DD process. Experiments on Defect4J and a real-world regression bug dataset reveal that C2D2 is significantly more efficient than the traditional DD algorithm ddmin with competitive effectiveness, and significantly more effective and more efficient than the state-of-the-art DD algorithm ProbDD. Furthermore, compared to human-isolated critical changes, C2D2 produces the same or better critical change results in 56% cases in Defects4J and 86% cases in the regression dataset, demonstrating its usefulness in automatically extracting critical changes and saving human efforts in constructing large-scale bug datasets with real-world bugs.
DOI 原文 ·
@inproceedings{paperbot8614,
title = {C2D2: Extracting Critical Changes for Real-World Bugs with Dependency-Sensitive Delta Debugging},
author = {Xuezhi Song and Yijian Wu and Shuning Liu and Bihuan Chen and Yun Lin and Xin Peng},
booktitle = {ISSTA},
year = {2024},
doi = {10.1145/3650212.3652129}
}