# A Model with Iterative Trials for Correcting Logic Errors in Source Code
## 5 Experimental Results and Discussion  
### Results  
Table 6 shows the correction performance of the proposed model. The proposed model improves the correction accuracy of source code in all programming tasks. To ensure that the result was not due to a statistical chance, statistical tests were performed on the correction accuracy of the conventional and proposed models. The calculated \(p\)-value is 6.27 \(\times\) 10\({}^{-16}\), which satisfies the general significance level of \(p\)-value \(<\) 0.05, indicating that these results are not chance results. The average correction accuracy of the conventional model for each programming task was 13.90%. On the other hand, the average correction accuracy of the proposed model was 72.55%. The average correction accuracy of the proposed model is 58.64% higher than the conventional model without iterative trials. This shows that the accuracy of correcting logic errors can be improved substantially by using the proposed model that introduces iterative trials. This means that the proposed model was able to correct hidden logic errors that could not be detected in the first trial. \begin{table}
\begin{tabular}{c c c c c c c} \hline \hline \multicolumn{2}{c}{**Datasets**} & \multicolumn{5}{c}{**The Number of Logic Errors**} \\ \hline
**Task ID** & **Targets** & **1** & **2** & **3** & **4** & **5** \\ \hline ITP1\_1\_A & 1524 & 281 & 1094 & 53 & 80 & 16 \\ ITP1\_1\_B & 630 & 42 & 536 & 13 & 31 & 8 \\ ITP1\_1\_C & 694 & 51 & 519 & 18 & 99 & 7 \\ ITP1\_1\_D & 500 & 16 & 365 & 20 & 88 & 11 \\ ITP1\_2\_A & 494 & 113 & 108 & 8 & 59 & 206 \\ ITP1\_2\_B & 727 & 17 & 466 & 15 & 160 & 69 \\ ITP1\_2\_C & 308 & 33 & 243 & 4 & 26 & 2 \\ ITP1\_2\_D & 350 & 28 & 72 & 11 & 236 & 3 \\ ITP1\_3\_A & 558 & 285 & 236 & 15 & 17 & 5 \\ ITP1\_3\_B & 336 & 105 & 175 & 18 & 27 & 11 \\ ITP1\_3\_C & 255 & 32 & 108 & 54 & 55 & 6 \\ ITP1\_3\_D & 379 & 123 & 202 & 15 & 35 & 4 \\ ITP1 \_4 A & 56 & 0 & 32 & 23 & 0 & 1 \\ ITP1\_4\_B & 42 & 8 & 7 & 7 & 7 & 13 \\ ITP1\_4\_C & 85 & 27 & 43 & 7 & 5 & 3 \\ ITP1\_4\_D & 63 & 10 & 30 & 6 & 17 & 0 \\ ITP1\_5\_A & 59 & 13 & 28 & 3 & 15 & 0 \\ ITP1\_5\_B & 132 & 10 & 93 & 2 & 26 & 1 \\ ITP1\_5\_C & 81 & 14 & 39 & 4 & 24 & 0 \\ ITP1\_5\_D & 50 & 8 & 24 & 3 & 14 & 1 \\ ITP1\_6\_A & 83 & 31 & 37 & 3 & 9 & 3 \\ ITP1\_6\_B & 70 & 41 & 20 & 5 & 1 & 3 \\ ITP1\_6\_C & 142 & 85 & 32 & 11 & 12 & 2 \\ ITP1\_6\_D & 89 & 24 & 44 & 4 & 17 & 0 \\ ITP1\_7\_A & 123 & 39 & 37 & 21 & 21 & 5 \\ ITP1\_7\_B & 183 & 8 & 41 & 5 & 127 & 2 \\ ITP1\_7\_C & 89 & 24 & 50 & 8 & 6 & 1 \\ ITP1\_7\_D & 23 & 2 & 6 & 1 & 14 & 0 \\ ITP1\_8\_A & 66 & 30 & 26 & 5 & 1 & 4 \\ ITP1\_8\_B & 46 & 15 & 10 & 6 & 14 & 1 \\ ITP1\_8\_C & 51 & 9 & 27 & 5 & 5 & 5 \\ ITP1\_8\_D & 5 & 2 & 1 & 0 & 2 & 0 \\ \hline \hline \end{tabular}
\end{table} 
Table 5: Details of experimental data. \begin{table}
\begin{tabular}{c c c c c c c c c} \hline \hline \multicolumn{2}{c}{**Datasets**} & \multicolumn{2}{c}{**Correction Accuracy (\%)**} & \multicolumn{2}{c}{**Number of Edits**} & \multicolumn{2}{c}{**Execution Time (s)**} \\ \hline
**Task ID** & **Targets** & **Conventional Model** & **Proposed Model** & **Users** & **Proposed Model** & **Average** & **Min** & **Max** \\ \hline ITP1\_1\_A & 1524 & 18.11 & 99.54 & 2.00 & 2.12 & 0.38 & 0.23 & 2.62 \\ ITP1\_1\_B & 630 &  
We compared the number of edit operations in the proposed model with the number of edit operations by the user. The number of edit operations by the user is the edit distance between the experimental data created by each user and the corresponding correct code. The average number of edit operations of the proposed model is slightly larger than that of the user. This means that the correction candidates indicated by the proposed model include correction candidates that do not need to be edited. The experimental results show the average, minimum, and maximum execution time of the proposed model for each programming task. The average execution time for all programming tasks is less than 1.5 (s). At the shortest, a given code can be corrected within 0.2 (s).