# An Improved CNN Model for Within-Project Software Defect Prediction
## 4 Experimental Setup
### Evaluated Projects and Datasets
From the perspective of file numbers, it can be observed that the SPSC dataset has expanded more than twice in size as compared with the SPSC dataset. We used the \(10\times 10\) cross-validation strategy for training and validation, which followed the within-version WPDP pattern. The SPSC and PSC dataset are available at [[https://github.com/penguincwarrior/CNN-WPDP-APPSC2019](https://github.com/penguincwarrior/CNN-WPDP-APPSC2019)]([https://github.com/penguincwarrior/CNN-WPDP-APPSC2019](https://github.com/penguincwarrior/CNN-WPDP-APPSC2019)). \begin{table}
\begin{tabular}{c c c c c} \hline \hline
**Project** & **Versions (Vp, Vn)** & **\#Files** & **\#Defects** & **Avg. Buggy Rate (\%)** \\ \hline Camel & 1.4, 1.6 & 1781(–6) & 333(0) & 18.7(+0.6) \\ \hline jEdit & 4.0, 4.1 & 547(–71) & 134(–20) & 24.5(–0.4) \\ \hline Lucene & 2.0, 2.2 & 420(–22) & 234(–1) & 55.7(+2.5) \\ \hline Xalan & 2.5, 2.6 & 1629(–59) & 790(–8) & 48.5(+1.2) \\ \hline Xerces & 1.2, 1.3 & 882(–11) & 138(–2) & 15.6(–0.1) \\ \hline Synapse & 1.1, 1.2 & 461(–17) & 141(–5) & 30.6(+0.1) \\ \hline Poi & 2.5, 3.0 & 818(–9) & 529(–9) & 64.7(+0.7) \\ \hline Total & - & 6538(–245) & 2299(–45) & 35.2(+0.6) \\ \hline \hline \end{tabular}
\end{table} 
Table 2: Simplified PROMISE Source Code (SPSC) dataset description. SPSC is applied for cross-version within-project defect prediction (WPDP). Numbers in brackets indicate numeral changes compared with the original dataset from PROMISE repository. \begin{table}
\begin{tabular}{c c c c c} \hline \hline
**Project** & **Version** & **\#Files** & **\#Defects** & **Buggy Rate (\%)** \\ \hline \multirow{4}{*}{Ant} & 1.3 & 124(-) & 20(0) & 16.0(+0.1) \\ \cline{2-5}  & 1.4 & 177(–1) & 40(0) & 22.6(+0.1) \\ \cline{2-5}  & 1.5 & 278(–15) & 29(–3) & 10.4(–0.5) \\ \cline{2-5}  & 1.6 & 350(–1) & 92(0) & 26.3(+0.1) \\ \cline{2-5}  & 1.7 & 741(–4) & 166(–1) & 22.4(0) \\ \hline \multirow{4}{*}{Camel} & 1.0 & 339(–0) & 13(0) & 3.8(0) \\ \cline{2-5}  & 1.2 & 595(–13) & 216(0) & 36.3(+0.8) \\ \cline{2-5}  & 1.4 & 847(–25) & 145(0) & 17.1(+0.5) \\ \cline{2-5}  & 1.6 & 934(–31) & 188(0) & 20.1(+0.6) \\ \hline \multirow{4}{*}{Ivy} & 1.1 & 111(0) & 63(0) & 56.8(0) \\ \cline{2-5}  & 1.4 & 241(0) & 16(0) & 6.6(0) \\ \cline{2-5}  & 2.0 & 352(0) & 40(0) & 11.4(0) \\ \hline \multirow{4}{*}{JEdit} & 3.2 & 260(–12) & 90(0) & 34.6(+1.5) \\ \cline{2-5}  & 4.0 & 281(–25) & 67(–8) & 23.8(–0.7) \\ \cline{2-5}  & 4.1 & 266(–46) & 67(–12) & 25.2(–0.1) \\ \cline{2-5}  & 4.2 & 355(–12) & 48(0) & 13.5(+0.4) \\ \cline{2-5}  & 4.3 & 487(–5) & 11(0) & 2.3(0) \\ \hline \multirow{4}{*}{Log4j} & 1.0 & 119(–16) & 34(0) & 28.8(+3.4) \\ \cline{2-5}  & 1.1 & 104(–5) & 37(0) & 35.6(+1.6) \\ \cline{2-5}  & 1.2 & 194(–11) & 186(–3) & 95.9(+3.7) \\ \hline \multirow{4}{*}{Lucene} & 2.0 & 186(–9) & 91(0) & 48.9(+2.3) \\ \cline{2-5}  & 2.2 & 234(–13) & 143(–1) & 61.1(+2.8) \\ \cline{2-5}  & 2.4 & 330(–10) & 203(0) & 61.5(+1.8) \\ \hline \multirow{4}{*}{Pbeans} & 1.0 & 26(0) & 20(0) & 76.9(0) \\ \cline{2-5}  & 2.0 & 51(0) & 10(0) & 19.6(0) \\ \hline \multirow{4}{*}{Poi} & 1.5 & 235(–2) & 141(0) & 60.0(+0.5) \\ \cline{2-5}  & 2.0 & 309(–5) & 37(0) & 12.0(+0.2) \\ \cline{2-5}  & 2.5 & 380(–5) & 248(0) & 65.3(+0.8) \\ \cline{2-5}  & 3.0 & 438(–4) & 529(0) & 64.2(+0.6) \\ \hline \multirow{4}{*}{Synapse} & 1.0 & 157(0) & 16(0) & 10.2(0) \\ \cline{2-5}  & 1.1 & 205(–17) & 55(–5) & 26.8(–0.2) \\ \cline{2-5}  & 1.2 & 256(0) & 86(0) & 33.6(0) \\ \hline \multirow{4}{*}{Velocity} & 1.4 & 195(–1) & 147(0) & 75.4(+0.4) \\ \cline{2-5}  & 1.5 & 214(0) & 142(0) & 66.4(0) \\ \cline{2-5}  & 1.6 & 229(0) & 78(0) & 34.1(0) \\ \hline \multirow{4}{*}{Xalan} & 2.4 & 676(–47) & 110(0) & 16.3(+1.1) \\ \cline{2-5}  & 2.5 & 754(–49) & 379(–8) & 50.3(+2.1) \\ \cline{2-5}  & 2.6 & 875(–10) & 411(0) & 47.0(+0.5) \\ \hline \multirow{4}{*}{Xerces} & Initial & 162(0) & 77(0) & 47.5(0) \\ \cline{2-5}  & 1.2 & 436(–4) & 70(–1) & 16.1(-0.1) \\ \cline{2-5}  & 1.3 & 446(–7) & 68(–1) & 15.2(0) \\ \hline Total & - & 14,066(–289) & 6542(–77) & 31.4(+0.6) \\ \hline \hline \end{tabular}
\end{table}