一句话:提出 iBiR,利用缺陷报告引导故障注入,生成语义上更接近真实缺陷的故障,并提升容错评估的有效性。
传统故障注入/变异测试通常盲目修改代码,产生大量与真实缺陷语义不符的人工故障,使测试与容错评估等任务失真。本文提出 iBiR,利用缺陷报告与生成式语言模型引导故障注入:根据缺陷报告定位更可能相关的代码位置,并施加自动程序修复研究者手工或自动构造的逆向修复模式,从而注入更“真实”的故障。作者使用 Defects4J 中的真实缺陷进行评估,显示 iBiR 在绝大多数情况下比传统变异测试注入的故障在语义上更接近并更能耦合真实缺陷;在约 80% 的情况下,其故障对容错能力的估计也显著更优。该方法旨在以更少但更相关的故障实现有效且可扩展的故障注入。
Previous research has shown that artificial faults can be useful in many software engineering tasks such as testing, fault-tolerance assessment, debugging, dependability evaluation, risk analysis, etc. However, such artificial-fault-based applications can be questioned or inaccurate when the considered faults misrepresent real bugs. Since typically, fault injection techniques (i.e. mutation testing) produce a large number of faults by altering ”blindly” the code in arbitrary locations, they are unlikely capable to produce few but relevant real-like faults. In our work, we tackle this challenge by guiding the injection towards resembling bugs that have been previously introduced by developers. For this purpose, we propose iBiR, the first fault injection approach that leverages information from bug reports to inject ”realistic” faults. iBiR injects faults on the locations that are more likely to be related to a given bug-report by applying appropriate inverted fix-patterns, which are manually or automatically crafted by automated-program-repair researchers. We assess our approach using bugs from the Defects4J dataset and show that iBiR outperforms significantly conventional mutation testing in terms of injecting faults that semantically resemble and couple with real ones, in the vast majority of the cases. Similarly, the faults produced by iBiR give significantly better fault-tolerance estimates than conventional mutation testing in around 80% of the cases.