A universal dimensionality optimization method for fault localization
摘要
Fault localization (FL) is the process of identifying the locations of faults in a program by analyzing its runtime information. This correlation is typically established using suspiciousness formulas or deep neural networks (DNNs) that operate on input code coverage information to identify program entities associated with failures. As such, the quality of the input code coverage matrix is critical for FL. However, real-world programs often contain a significant number of statements and tests, leading to a high-dimensional problem when constructing the code coverage matrix. This limitation greatly hampers the effectiveness of existing FL methods. In this paper, we introduce ALAN, a universal dimensionality optimization method to addresses the high-dimensional problem prevalent in current FL methods. Our approach incorporates a two-stage dimensionality optimization method to filter out fault-irrelevant statements, thereby reducing the dimensionality of the input coverage matrix. To evaluate its effectiveness, we compare our method against six state-of-the-art FL baselines, as well as a widely used dimensionality reduction technique called principal component analysis (PCA) employed in the recent paper, using 458 faulty versions of ten programs. Experimental results demonstrate that ALAN outperforms both the baselines and the PCA method in FL. Specifically, compared to the baselines, ALAN achieves an average decrease of 46.49% in the number of statements required for spectrum-based fault localization (SFL) and 61.24% for deep learning-based fault localization (DLFL). In contrast, when compared to PCA, ALAN achieves an average reduction of 40.10% for SFL and 59.85% for DLFL in the number of statements that need to be checked.