## 4 Empirical Evaluation
### Experimental Results and Analyses  
We compared the effectiveness of MCLSM with the related tools, including k-tails [7], SEKT [13], CONTRACTOR++ [13], trace-enhanced MTS inference (TEMI) [13], and DSM [8; 9]. For k-tails and SEKT, we chose \(k\in\{1,2\}\). We followed the F-measure with the DSM method to measure the F-measure of our proposed approach. Table 2 shows the F-measure (%) value of each tool for 13 target library classes. In the table, tools \"1-tail\" and \"2-tail\" represent traditional 1-tails and 2-tails, respectively [23], \"SEKT 1\" and \"SEKT 2\" stand for State-Enhanced 1-tails and 2-tails, respectively, and \"CON++\" is short for CONTRACTOR++. The result \"-\" indicates that the result is unavailable. From the experimental results in Table 2, we can see that SEKT 2, CONTRACTOR++, and TEMI failed to generate the FSA on 2, 4, 6 classes, respectively, while MCLSM successfully produced the FSA for all classes. The F-measure values of FSAs generated by MCLSM for most classes were higher than those of FSAs generated by other tools except for classes Signature and SringTokenizer. In total, the average F-measure values with reference to MCLSM reached 92.19%, which were 175.85%, 197.67%, 66.95%, 177.17%, 233.41%, and 367.49% higher than 1-tails, 2-tails, SEKT 1, SEKT 2, CONTRACTOR++, and TEMI, respectively. Specifically, MCLSM was higher than DSM by 28.48%. Because MCLSM uses the OPTICS clustering algorithm to cluster feature values, it is not necessary to set the clustering radius in advance. The OPTICS clustering algorithm generates reachability plots, which adaptively captures density changes between feature values. Then, according to the reachability plot, the appropriate radius is selected for feature value clustering. In contrast, the DSM uses the K-means clustering algorithm, which requires a pre-set clustering radius. This can result in a feature value being incorrectly assigned to an inappropriate cluster. In addition, the FSA generated by the clustering algorithm of DSM may encounter cases of false merging between states. To address this, our approach refines the FSA based on model checking, reducing false merging between states and improving the FSA accuracy. Note that by analyzing two classes, i.e., Signature and SringTokenizer, for which MCLSM did not performs better than DSM, we found that in the the cluster process of MCLSM, outliers are produced by the OPTICS clustering algorithm, so the F-measure is slightly lower than for DSM. This is because MCLSM generates outliers when clustering data in Signature and SringTokenizer using the OPTICS clustering algorithm, while the K-means clustering algorithm used in DSM does not generate outliers. As a result, the FSA F-measure generated by MCLSM when processing these data was lower than that of DSM. \begin{table}
\begin{tabular}{c c c c c c c c c} \hline \hline
**Class**Tools** & **1-Tail** & **2-Tail** & **SEKT 1** & **SEKT 2** & **CON++** & **TEMI** & **DSM** & **MCLSM** \\ \hline ArrayList & 13.96 & 13.13 & 36.03 & 13.86 & 13.07 & 16.87 & 22.27 & 81.94 \\ LinKedList & 27.15 & 25.72 & 86.02 & 26.67 & 24.52 & 07.51 & 32.76 & 98.49 \\ HashSet & 20.88 & 21.27 & 52.22 & 20.88 & 21.27 & 23.34 & 79.23 & 94.67 \\ HashMap & 25.41 & 08.71 & 68.94 & - & - & - & 83.53 & 97.02 \\ Hashtable & 42.39 & 33.58 & 92.78 & - & - & - & 76.82 & 91.42 \\ Signature & 61.54 & 64.25 & 66.88 & 62.05 & 63.98 & 39.06 & 100.00 & 86.44 \\ Socket & 35.89 & 31.52 & 55.15 & 34.73 & 28.37 & - & 51.78 & 100.00 \\ ZipOutputStream & 46.36 & 47.42 & 62.80 & 47.91 & - & - & 87.62 & 91.80 \\ StringTokenizer & 52.88 & 52.97 & 21.30 & 52.15 & - & - & 100.00 & 94.19 \\ StackAr & 16.54 & 16.54 & 34.91 & 16.54 & 16.54 & - & 76.27 & 96.55 \\ NFST & 24.57 & 25.52 & 30.40 & 24.56 & 25.78 & 11.80 & 80.16 & 100.00 \\ ToHTMLStream & - & - & - & - & - & - & 69.70 & 89.76 \\ SMTPProtocol & - & - & - & - & - & - & 72.69 & 82.63 \\ Average & 33.42 & 30.97 & 55.22 & 33.26 & 27.65 & 19.72 & 71.75 & 92.19 \\ \hline \hline \end{tabular}
\end{table} 
Table 2: Experimental results.