# Cross-Project Defect Prediction Based on Domain Adaptation and LSTM Optimization
## 3 Methodology
### Proposed Features Selection Approach
\begin{table}
\begin{tabular}{c c c c c c} \hline \hline
**Source** & **Target** & \multicolumn{2}{c}{**F1-Measure**} & \multicolumn{2}{c}{_AUC_} \\ \hline  & & **Without FS** & **With FS** & **Without FS** & **With FS** \\ \hline EQ & JDT & 0.737 & 0.900 & 0.681 & 0.875 \\ EQ & LC & 0.742 & 0.917 & 0.590 & 0.750 \\ EQ & ML & 0.677 & 0.895 & 0.589 & 0.731 \\ EQ & PDE & 0.659 & 0.879 & 0.610 & 0.771 \\ JDT & EQ & 0.668 & 0.892 & 0.719 & 0.900 \\ JDT & LC & 0.652 & 0.879 & 0.670 & 0.810 \\ JDT & ML & 0.661 & 0.887 & 0.680 & 0.762 \\ JDT & PDE & 0.649 & 0.875 & 0.586 & 0.761 \\ LC & EQ & 0.650 & 0.878 & 0.570 & 0.846 \\ LC & JDT & 0.760 & 0.923 & 0.674 & 0.848 \\ LC & ML & 0.643 & 0.869 & 0.571 & 0.738 \\ LC & PDE & 0.651 & 0.871 & 0.592 & 0.760 \\ ML & EQ & 0.665 & 0.893 & 0.688 & 0.848 \\ ML & JDT & 0.669 & 0.899 & 0.660 & 0.823 \\ ML & LC & 0.772 & 0.938 & 0.688 & 0.835 \\ ML & PDE & 0.644 & 0.873 & 0.580 & 0.750 \\ PDE & EQ & 0.733 & 0.908 & 0.699 & 0.883 \\ PDE & JDT & 0.665 & 0.891 & 0.629 & 0.791 \\ PDE & LC & 0.654 & 0.884 & 0.681 & 0.820 \\ PDE & ML & 0.628 & 0.877 & 0.588 & 0.725 \\ Average & & 0.678 & 0.891 & 0.637 & 0.801 \\ \hline \hline \end{tabular}
\end{table} 
Table 6: F1-measure and _AUC_ of proposed model with and without FS method on AEEEM. \begin{table}
\begin{tabular}{c c c c c c} \hline \hline
**Source** & **Target** & \multicolumn{2}{c}{**F1-Measure**} & \multicolumn{2}{c}{_AUC_} \\ \hline  & & **Without FS** & **With FS** & **Without FS** & **With FS** \\ \hline synapse\_1.2 & poi-2.5 & 0.422 & 0.651 & 0.450 & 0.674 \\ synapse\_1.2 & xerces-1.2 & 0.409 & 0.602 & 0.508 & 0.712 \\ camel-1.4 & ant-1.6 & 0.419 & 0.656 & 0.498 & 0.669 \\ camel-1.4 & jedit\_4.1 & 0.410 & 0.636 & 0.512 & 0.612 \\ xerces-1.3 & poi-2.5 & 0.390 & 0.595 & 0.445 & 0.633 \\ xerces-1.3 & synapse\_1.1 & 0.357 & 0.588 & 0.409 & 0.602 \\ xerces-1.2 & xalan-2.5 & 0.348 & 0.571 & 0.521 & 0.722 \\ lucene\_2.2 & xalan-2.5 & 0.452 & 0.612 & 0.578 & 0.733 \\ synapse\_1.1 & poi-3.0 & 0.502 & 0.602 & 0.436 & 0.630 \\ ant-1.6 & poi-3.0 & 0.480 & 0.520 & 0.456 & 0.619 \\ camel-1.4 & ant-1.6 & 0.520 & 0.782 & 0.533 & 0.713 \\ lucene\_2.2 & ant-1.6 & 0.518 & 0.772 & 0.513 & 0.729 \\ log4j-1.1 & ant-1.6 & 0.526 & 0.745 & 0.520 & 0.733 \\ log4j-1.1 & lucene\_2.0 & 0.503 & 0.733 & 0.547 & 0.757 \\ lucene\_2.0 & log4j-1.1 & 0.519 & 0.742 & 0.578 & 0.719 \\ lucene\_2.0 & xalan-2.5 & 0.398 & 0.546 & 0.490 & 0.669 \\ jedit\_4.1 & camel-1.4 & 0.457 & 0.678 & 0.453 & 0.644 \\ jedit\_4.1 & xalan-2.4 & 0.350 & 0.552 & 0.495 & 0.680 \\ Average & & 0.443 & 0.643 & 0.496 & 0.680 \\ \hline \hline \end{tabular}
\end{table} 
Table 7: F1-measure and _AUC_ of proposed model with and without FS on PROMISE. ### Research Question--RQ3

In order to address RQ3, we compared our model results with the results of baseline models based on two metrics: _AUC_ and F1-measure. Tables 8 and 9 compare the results of

Figure 8: Boxplot of F1-measure and _AUC_ of model with and without FS on PROMISE. Figure 7: Boxplot of F1-measure and _AUC_ of model with and without FS on AEEEM. our model with the results of baseline models on AEEEM, and Tables 10 and 11 compares the results of our model with the results of baseline models on PROMISE datasets. According to Tables 7-10, our model outperforms the state-of-the art techniques and improves CPDP predictive performance. Figures 9 and 10 display the Bar charts for prediction performance of the proposed model (SCAG-LSTM) and baseline models on the AEEEM and PROMISE datasets.