# Software Fault Localization Based on SALSA Algorithm
## 5 Results and Analyses
### RQ1: How Accurate Is SA-SBFL in Fault Localization? Figure 3 demonstrates the fault localization effectiveness of SA-SBFL, traditional SBFL, and TRFL on Top-N (N = 1, 3, 5) across five projects, showing the total number of faults found by each method. It is evident from the figure that SA-SBFL significantly outperforms both traditional SBFL and TRFL in terms of fault localization accuracy, regardless of whether the faulty statements are ranked first, within the top three, or the top five. SA-SBFL exhibits greater precision and reliability in all these cases. The specific localization effects of the three fault localization techniques across the five projects are presented in Table 5. For instance, in the Closure project, SA-SBFL can localize 87 faults on Top-5, which is 48 more than SBFL and 28 more than TRFL. It should also be noted that the statistical formula used by the three methods in the table is Dstar. Next, let us discuss the performance of SA-SBFL across projects of different complexities. First, according to the Loc and #Tests for each project in Table 4, projects are categorized into low, medium, and high complexity. Closure is considered high complexity, Chart and Math are medium complexity, and Lang and Time are low complexity. From Figure 4, it can be observed that in projects of all complexity levels, SA-SBFL has the lowest EXAM values, while SBFL has the highest EXAM values. Particularly in high-complexity projects, SA-SBFL's EXAM value is 0.025, which is the lowest among all the techniques. In summary, SA-SBFL demonstrates the highest fault localization accuracy across projects of varying complexities, with its advantage being particularly evident in high-complexity projects. \begin{table}
\begin{tabular}{c c c c c c} \hline \hline
**Project** & **Technique** & **Top-1** & **Top-3** & **Top-5** & **EXAM** \\ \hline \multirow{3}{*}{Chart} & SBFL & 5 & 16 & 19 & 0.041 \\ \cline{2-6}  & TRFL & 12 & 23 & 25 & 0.030 \\ \cline{2-6}  & SA-SBFL & 13 & 21 & 25 & 0.031 \\ \hline \multirow{3}{*}{Closure} & SBFL & 14 & 38 & 39 & 0.044 \\ \cline{2-6}  & TRFL & 22 & 44 & 59 & 0.030 \\ \cline{2-6}  & SA-SBFL & 32 & 65 & 87 & 0.025 \\ \hline \multirow{3}{*}{Lang} & SBFL & 23 & 45 & 55 & 0.044 \\ \cline{2-6}  & TRFL & 31 & 52 & 59 & 0.040 \\ \cline{2-6}  & SA-SBFL & 30 & 54 & 59 & 0.040 \\ \hline \multirow{3}{*}{Math} & SBFL & 20 & 56 & 69 & 0.102 \\ \cline{2-6}  & TRFL & 31 & 63 & 79 & 0.074 \\ \cline{2-6}  & SA-SBFL & 32 & 65 & 85 & 0.072 \\ \hline \multirow{3}{*}{Time} & SBFL & 6 & 11 & 12 & 0.039 \\ \cline{2-6}  & TRFL & 7 & 12 & 12 & 0.033 \\ \cline{1-1} \cline{2-6}  & SA-SBFL & 7 & 13 & 14 & 0.032 \\ \hline \hline \end{tabular}
\end{table} 
Table 5: The fault location results of different technologies in each project. RQ2: Which Score Is More Advantageous in Fault Localization, the Final Hub Score or the Authority Score of the Node? In SA-SBFL, each node ultimately has two scores: the hub score and the authority score. Both of these scores can serve as a basis for fault localization. A high hub score for a node indicates its role in connecting and navigating the link structure, while a high authority score indicates its importance as a source of high-quality information. Therefore, different types of faults are suitable for SA-SBFL to use different scores for fault localization. Figure 5 illustrates the performance of fault localization using SA-SBFL with both hub scores and authority scores on Top-N (N = 1, 3, 5). The chart shows that on the Top-1 metric, the authority scores on average localized 95 faults across all statistical formulas, while the hub scores-based SA-SBFL localized an average of 97 faults. This indicates that on Top-1, the hub scores perform slightly better than the authority scores. On the Top-3 metric, the authority scores-based SA-SBFL on average localized 185 faults across all statistical formulas, while the hub scores-based SA-SBFL localized an average of 180 faults. This indicates that on Top-3, the authority scores perform slightly better than the hub scores.