FusionFL: A Statement-Level Feature Fusion Based Fault Localization Approach

Yanbo Zhang, Yawen Wang, Dongming Zhu, Wenjing Liu · 2024

Deep learning-based fault localization has recently been widely studied. Previous studies have demonstrated that deep learning-based methods can localize faults more accu-rately than traditional methods, such as spectrum-based and mutation-based approaches. However, many early deep learning-based approaches solely employed code statistic features and achieved subpar performance. Subsequent studies have enhanced performance by incorporating semantic information into the model. Nevertheless, their procedure to extract code semantics is simplistic. Their strategies for integrating semantics with other code features also fail to fully exploit the correlations between features. In this work, we propose FusionFL, a statement-level fault localization method. FusionFL aims to enhance fault localization precision through fine-grained semantic learning and more profound feature fusion. Specifically, FusionFL generates a separate vector representation for each code statement and concatenates SBFL and MBFL scores to construct a suspicious score matrix. Furthermore, FusionFL utilizes an attention mech-anism to capture the relationships among each statement in the matrix and enables the code semantics to learn from these relationships. Finally, FusionFL associates the semantics of each suspicious statement with its corresponding context statements and generates suspicious scores. We evaluate FusionFL on widely used benchmark Defects4j. Experimental results show that FusionFL can effectively fuse multiple features and achieves an average 48.5% improvement in Top-1 over baselines. Meanwhile, we conduct extensive experiments on FusionFL to verify its effectiveness in feature fusion.

Read the paper · More papers on PaperTik