## 5 Discussion
### Clone Pairs Misclassified into T2 Clones  
As reported in Table 7, most clone pairs misclassified into T2 clones were either T1 or ST3 clones. As for T1 clones misclassified as T2 clones, their ASTs were entirely identical; this is because a T2 clone modifies only identifiers or literals of an original code fragment. In the case of the ST3 clones misclassified into T2 clones, more than 95% of the original code fragment was completely identical. The ASTs of these clones resulted in some nodes being rearranged or a subtree increasing by one level due to the newly added code. Our technique tended to classify clone pairs into T2 clones when the difference between the two ASTs was slight, i.e., when the similarity between the codes was high.  
Figure 4 presents an example clone pair that best illustrates one of these cases. The clone pair in Figure 4a was classified as an ST3 clone on BigCloneBench, but classified as a T2 clone by our technique. This clone pair is similar, but each code fragment uses different object names, with the code on the left-side using object names such as _srcChannel_ and _dstChannel_, while the code on the right uses _in_ and _out_ instead (see the fourth line in italic). The order of arguments of a caller method is also different from that of on the left-side code, i.e., \"srcChannel, 0, srcChannel.size()\" and \"0, in.size(), out\", respectively. The two caller methods are similar but have a semantic difference, making this clone pair an ST3 clone. In AST, this semantic difference is represented by two identical subtrees that differ only in their order (see the boxed subtrees of Figure 4b). Our technique detects this difference as small changes, so it was classified as a T2 clone.  
\begin{table}
\begin{tabular}{c c c c c c c} \hline \hline
**Clone Type** & **False Clone** & **T1** & **T2** & **ST3** & **MT3** & **WT3/4** \\ \hline false clone & - & 2 & 1 & 138 & 165 & 330 \\ T1 & 7 & - & 2903 & 160 & 13 & 11 \\ T2 & 1 & 61 & - & 160 & 13 & 11 \\ ST3 & 922 & 318 & 1283 & - & 2205 & 407 \\ MT3 & 1687 & 69 & 68 & 3452 & - & 3495 \\ WT3/4 & 2962 & 71 & 15 & 465 & 1841 & - \\ \hline \hline \end{tabular}
\end{table}
Table 7: Distribution of misclassified clone types.  
The clone pair example in Figure 5a was classified as an ST3 clone by BigCloneBench but as a T2 clone by our technique. The clone pair of Figure 5a has method signature difference (see lines in italic). According to its ASTs, the signature difference between the two code fragments is expressed as the addition or deletion of subtrees such as the'set' subtree of Figure 5b. Our technique did not detect this slight distinction.  
Figure 4: Example of ST3 clone classified as T2 clone.  
Changes to a small number of nodes in AST have a small impact on type classification because they cause slight changes in the feature vectors used as inputs for training and testing in the model. Clones of the type in Figures 4 and 5 are close to T2 clones because they are highly similar codes that are functionally comparable. In particular, the code pair of Figure 5 can be refactored in the same way as T1 and T2 clones because all code lines, except for the method signature, are identical.