漏洞数据集剖析:来自Defects4J的395个补片的剖析
Dissection of a Bug Dataset: Anatomy of 395 Patches from Defects4J
摘要:
精心设计和公开可用的错误数据集是推进故障定位和程序修复等研究领域的宝贵资产,因为它们可以直接和公平地比较竞争技术和实验复制。这些数据集需要研究人员深入理解:诸如“我的技术可以处理哪些bug?”"和"我的技术对哪些bug有效?"取决于对bug及其补丁相关属性的理解。然而,这些属性通常不包括在数据集中,并且仍然没有广泛采用的方法来表征错误和补丁。在这项工作中,我们深入研究了Defects4J数据集的395个补丁。定量属性(补丁大小和蔓延)自动提取,而定性的(修复行动和模式)手动提取使用专题分析为基础的方法。我们发现:1)Defects4J补丁的中值大小为4行,几乎30%的补丁仅包含添加行; 2)92%的补丁仅更改一个文件,38%的补丁根本没有扩展; 3)最常用的前3个修复操作是添加方法调用,条件和赋值,发生在77%的补丁中; 95%的斑块有9种修复模式,其中条件块修复模式最多,占斑块总数的43%。这些结果有助于研究人员基于Defects4J对其技术结果进行高级分析。此外,我们的属性集可用于表征和比较不同的bug数据集。
英文摘要:
Well-designed and publicly available datasets of bugs are an invaluable asset to advance research fields such as fault localization and program repair as they allow directly and fairly comparison between competing techniques and also the replication of experiments. These datasets need to be deeply understood by researchers: the answer for questions like "which bugs can my technique handle?" and "for which bugs is my technique effective?" depends on the comprehension of properties related to bugs and their patches. However, such properties are usually not included in the datasets, and there is still no widely adopted methodology for characterizing bugs and patches. In this work, we deeply study 395 patches of the Defects4J dataset. Quantitative properties (patch size and spreading) were automatically extracted, whereas qualitative ones (repair actions and patterns) were manually extracted using a thematic analysis-based approach. We found that 1) the median size of Defects4J patches is four lines, and almost 30% of the patches contain only addition of lines; 2) 92% of the patches change only one file, and 38% has no spreading at all; 3) the top-3 most applied repair actions are addition of method calls, conditionals, and assignments, occurring in 77% of the patches; and 4) nine repair patterns were found for 95% of the patches, where the most prevalent, appearing in 43% of the patches, is on conditional blocks. These results are useful for researchers to perform advanced analysis on their techniques' results based on Defects4J. Moreover, our set of properties can be used to characterize and compare different bug datasets.
机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。