# Software Fault Localization Based on SALSA Algorithm
## 5 Results and Analyses
### RQ1: How Accurate Is SA-SBFL in Fault Localization?
On the Top-5 metric, the authority scores-based SA-SBFL on average localized 215 faults  
Figure 4: Performance comparison of different technologies on EXAM in projects of different complexity. Figure 3: Performance comparison of different technologies on Top-N (N = 1, 3, 5). across all statistical formulas, while the hub scores-based SA-SBFL localized an average of 219 faults. This indicates that on Top-5, the hub scores perform slightly better than the authority scores. In summary, we can see that the performance of the authority scores and hub scores is very close. Table 6 presents the experimental results of SA-SBFL using different scores under six statistical formulas. Hub scores and authority scores each have their advantages under different statistical formulas, and their performance on the Top-1, Top-3, and Top-5 metrics is very close. Although the hub scores slightly outperform the authority scores on Top-1 and Top-5, the authority scores slightly outperform the hub scores in terms of the EXAM value. In summary, in Defects4J, SA-SBFL shows similar fault localization effects when using both authority scores and hub scores. If the type of fault is known, choosing between authority scores or hub scores based on specific circumstances can allow SA-SBFL to locate more faults. Alternatively, combining both scores could further improve the precision of fault localization. RQ3: What Are the Differences in Fault Location Accuracy When Using Suspicious Values Obtained from Different Statistical Formulas as Node Weights? In SA-SBFL, suspicion values calculated through statistical formulas are used as the initial weights of nodes in the RSCDG. However, different statistical formulas weigh the execution of statements in failed and successful test cases, and how they utilize this information to calculate suspicion levels, thus different formulas may perform differently under different types of errors and different distributions of test cases. Similarly, the choice of different statistical formulas will also affect the localization effectiveness of SA-SBFL. \begin{table}
\begin{tabular}{c c c c c c c c c c} \hline \hline \multirow{2}{*}{**Project**} & \multirow{2}{*}{**Formula**} & \multicolumn{2}{c}{**Top-1**} & \multicolumn{2}{c}{**Top-3**} & \multicolumn{2}{c}{**Top-5**} & \multicolumn{2}{c}{**EXAM**} \\ \cline{3-10}  & & **SA-SBF** & **SA-SBF** & **SA-SBF** & **SA-SBF** & **SA-SBF** & **SA-SBF** & **SA-SBF** & **SA-SBF** \\  & & **(A)** & **(H)** & **(A)** & **(H)** & **(A)** & **(H)** & **(A)** & **(H)** \\ \hline \multirow{4}{*}{Defects4j} & Dstar & 100 & 103 & 190 & 186 & 215 & 219 & 0.040 & 0.041 \\  & Jaccard & 99 & 100 & 185 & 180 & 216 & 219 & 0.041 & 0.043 \\ \cline{1-1}  & Tarantula & 97 & 99 & 185 & 180 & 219 & 225 & 0.040 & 0.041 \\ \cline{1-1}  & Ochiai & 93 & 96 & 188 & 187 & 220 & 224 & 0.041 & 0.043 \\ \cline{1-1}  & Ochiai2 & 92 & 96 & 186 & 180 & 215 & 220 & 0.039 & 0.041 \\ \cline{1-1}  & Op2 & 90 & 92 & 180 & 171 & 207 & 211 & 0.049 & 0.051 \\ \hline \hline \end{tabular}
\end{table} 
Table 6: SA-SBFL (Authority) and SA-SBFL (Hub) fault localization results. Figure 5: Comparison of fault location results using hub score and authority score. Table 7 presents the fault localization effects of SA-SBFL and SBFL using six different statistical formulas. Figure 6 illustrates the performance of SA-SBFL and traditional SBFL using different statistical formulas in terms of the number of faults localized on Top-N (N = 1, 2, 3) and their performance on the EXAM metric. The chart shows that the Dstar and Tarantula statistical formulas both exhibit lower EXAM values and higher Top-5 values across multiple projects. In particular, Dstar demonstrates consistent performance in the Chart, Lang, and Time projects, while Tarantula stands out in the Lang and Closure projects. Other statistical formulas performed averagely in the experiments. Therefore, this paper concludes that the Dstar and Tarantula statistical formulas are more suitable for application in SA-SBFL.