# Incremental Formula-Based Fix Localization
## 5 Results of the Experiments
### Result of RQ4: Real Software Bugs
\begin{table}
\begin{tabular}{l c c c c c} \hline \hline  & **Project** & \multicolumn{2}{c}{**Bug**} & \multicolumn{2}{c}{**Dev. Patch Size**} \\ \hline
**Name** & **LOC** & **BugID** & **Description** & **Add** & **Del** & **Edit** \\ \hline \multirow{4}{*}{Chart} & \multirow{4}{*}{89.3K} & Chart5 & missing branch & 4 & 0 & 1 \\  & & Chart7 & wrong assignments & 0 & 0 & 2 \\  & & Chart18 & missing guard & 11 & 3 & 2 \\  & & Chart22 & algorithm error & 30 & 1 & 2 \\ \hline \multirow{2}{*}{Codec} & \multirow{2}{*}{17.5K} & Codec16 & wrong field initialization & 1 & 1 & 1 \\  & & Codec18 & wrong return expression & 1 & 1 & 1 \\ \hline \multirow{2}{*}{Compress} & \multirow{2}{*}{28.3K} & Comp24 & algorithm error & 3 & 4 & 0 \\  & & Comp27 & wrong branch guard & 0 & 3 & 0 \\  & & Comp6 & algorithm error & 3 & 0 & 2 \\ \hline \multirow{2}{*}{Csv} & \multirow{2}{*}{3.8K} & Csv2 & missing try-catch & 7 & 0 & 0 \\  & & Csv8 & algorithm error & 6 & 7 & 0 \\ \hline \multirow{4}{*}{Lang} & \multirow{4}{*}{53.2K} & Lang14 & missing branch & 3 & 0 & 1 \\  & & Lang21 & wrong return expression & 1 & 1 & 1 \\  & & Lang22 & missing branch & 7 & 1 & 2 \\  & & Lang30 & missing branch & 38 & 0 & 5 \\  & & Lang31 & missing branch & 8 & 0 & 0 \\  & & Lang40 & design error & 7 & 0 & 1 \\  & & Lang58 & wrong if condition & 0 & 1 & 0 \\ \hline \multirow{2}{*}{Math} & \multirow{2}{*}{60.6K} & Math94 & wrong if condition & 0 & 0 & 1 \\  & & Math97 & design error & 14 & 0 & 2 \\ \hline \multirow{2}{*}{Mockito} & \multirow{2}{*}{10.5K} & Mock11 & design error & 8 & 0 & 1 \\  & & Mock21 & design error & 16 & 0 & 4 \\ \hline \hline \end{tabular}
\end{table} 
Table 3: Bugs used for studies. Let us consider bug Chart 5, for example. Figure 11 shows how the developer fixed the bug. To fix the bug, the developer has (1) changed the condition expression of the if statements at line 548 and (2) added additional code at line 544. AgxFaults found 6 MFCs for this bug, shown in Figure 12, and all of these MFCs are feasible (replacing the value of the suspicious expressions with the corresponding angelic value actually results in a successful execution). There are a total of 7 lines of code reported in all MFCs. The actual faulty lines (i.e., the \"if statement\" at line 548) are reported in 4 MFCs, which are mfc3, mfc4, mfc5, and mfc6. All these MFCs contain the buggy line, together with one additional statement. This result indicates that modifying the buggy if-statement alone is not enough to make the failing test case pass. The developer should modify both the if-statement at line 548, together with one additional statement, as reported in mfc3, mfc4, mfc5, and mfc6. For example, mfc3 shows that modifying the if statement at line 548, together with the assignment \"return = 0\" at line 203 of the file XYDataItem.java, can make the failing test case a success. The number of lines that the developer has to examine before identify the faulty line is 3, as he needs to examine two lines in the mfc1 and mfc2 before checking the mfc3. The total running time of AgxFaults is about 3 seconds, of which the SMT solver accounts for 0.47 s.  
In a total of 22 bugs in this study, there are 9 bugs that AgxFaults reported with the actual faulty line at the first candidate to the developer. A developer needs to examine less than 5 lines to identify the actual faulty line in all cases, except for the bug Codec18. The total running time for each run is a few seconds, which is acceptable. Figure 11: Chart 5 diff. Figure 12: Minimal angelic fix candidates (MFCs) returned by AgxFaults for the bug Chart 5. Comparison with Existing Techniques on Real Bugs  
Because the program-formula approach crashed or timed out without generating any MFCs when it was ran on the bugs in the real bug benchmark, we can only compare the result of AgxFaults with those of the single-path formula approaches FS and FI. Table 5 shows the comparison of the results generated by AgxFaults with those generated by the FS and FI approaches on the real bugs benchmark.