Fault localization (FL) analyzes the execution information of a test suite to pinpoint the root cause of a failure. The class imbalance of a test suite, i.e., the imbalanced class proportion between passing test cases (i.e., majority class) and failing ones (i.e., minority class), adversely affects FL effectiveness. To mitigate the effect of class imbalance in FL, we propose CGAN4FL: a data augmentation approach using Context-aware Generative Adversarial Network for Fault Localization. Specifically, CGAN4FL uses program dependencies to construct a failure-inducing context showing how a failure is caused. Then, CGAN4FL leverages a generative adversarial network to analyze the failure-inducing context and synthesize the minority class of test cases (i.e., failing test cases). Finally, CGAN4FL augments the synthesized data into original test cases to acquire a class-balanced dataset for FL. Our experiments show that CGAN4FL significantly improves FL effectiveness, e.g., promoting MLP-FL by 200.00%, 25.49%, and 17.81% under the Top-1, Top-5, and Top-10 respectively.
翻译:错误本地化( FL) 分析测试套件的执行信息, 以确定失败的根本原因 。 测试套件的等级不平衡, 即通过测试案例( 多数等级) 和失败案例( 少数等级) 之间的等级比例不平衡, 不利地影响 FL 效力 。 为了减轻FL 中阶级不平衡的影响, 我们提议 CGAN4FL: 数据增强方法 : 使用环境觉悟生成异常本地化反向网络的数据增强方法 。 具体地说, CGAN4FL 使用程序依赖性构建一个失败诱导环境, 显示失败是如何导致的。 然后, CGAN4FL 利用一个基因化对抗网络分析失败诱导环境并合成少数测试案例( 失败案例) 。 最后, CGAN4FL 将合成数据添加到原始测试案例中, 以获取FL 的等级平衡数据 。 我们的实验显示, CGAN4FL 显著提高了FL的效能, 例如, 将 MLP- FL- Fl 5 200.00 和 Top 5 分别 200.00% 和 Stop bow 20. 25.</s>