Skip to content

Author

Cheng Zhang

1 paper indexed here

We haven’t gathered this author’s papers yet. Follow them and we’ll fetch their work.

Not the right person? Other researchers publish under this name.

Open access Aug 2026

Applying Cost-Sensitive Learning to Mitigate the Effect of Class Imbalance for Deep Learning-based Fault Localization

Automated software fault localization has become a research focus with the growing software scale. Deep learning-based fault localization (DLFL) has been widely studied due to its excellent performance. Most existing DLFL methods use the execution traces of the test cases as features. However, the number of passing test cases is far more than that of failed test cases in the practical test suite. The severe class imbalance problem is ignored in existing DLFL methods. To alleviate the impact of the class imbalance on DLFL, we propose applying cost-sensitive learning to set different weights for each sample to optimize the performance of fault localization. We reduce the number of passing test cases and compute the weight for each sample. The sample weight is combined with a loss function to optimize the accuracy of the DLFL method. To evaluate our approach, we conduct within-project and cross-project fault localization experiments on the Defects4J benchmark. Experimental results show our approach outperforms the traditional DLFL and existing data augmentation methods in fault localization (e.g., localizing 133 faults within Top-5). The experimental results show that applying cost-sensitive learning can effectively alleviate the class imbalance problem in DLFL.

Yue Yan, Shujuan Jiang, Yanmei Zhang et al. · 0 citations