Buggy code:
@ Override public List < Policy > findAll ( Page page ) { } @ Override public List < Policy > findByExample ( Specification < Policy > specification , Page page ) { } @ SuppressWarnings ( "resource" ) @ Override public boolean importData ( FileTemplate ft , HttpServletRequest request , DataTable dt , long member_id , int ny ) { Connection connection = null ; Statement statement = null ; DruidDataSource basic = null ; try { Object objDataSource = WebApplicationContextUtils . getWebApplicationContext ( request . getServletContext ( ) ) . getBean ( "dataSource" ) ; DataSource dataSource = ( ( DataSource ) ( objDataSource ) ) ; basic = ( ( DruidDataSource ) ( dataSource ) ) ; connection = DriverManager . getConnection ( basic . getUrl ( ) , basic . getUsername ( ) , basic . getPassword ( ) ) ; statement = ( ( Statement ) ( connection . createStatement ( ) ) ) ; } catch ( SQLException e ) { e . printStackTrace ( ) ; } finally { } String strKey = MySQLAESKey . AESKey ; List < ColumnItem > standardColumns = null ; String strStatementText = null ; String strEncrypt = "" ; switch ( ft ) { case Policy : standardColumns = PolicyColumn . getStandardColumns ( ) ; strStatementText = "LOAD<seq2seq4repair_space>DATA<seq2seq4repair_space>LOCAL<seq2seq4repair_space>INFILE<seq2seq4repair_space>'file.txt'<seq2seq4repair_space>REPLACE<seq2seq4repair_space>INTO<seq2seq4repair_space>TABLE<seq2seq4repair_space>T_POLICY<seq2seq4repair_space>character<seq2seq4repair_space>set<seq2seq4repair_space>utf8<seq2seq4repair_space>(" ; break ; case PolicyDtl : standardColumns = PolicyDtlColumn . getStandardColumns ( ) ; strStatementText = "LOAD<seq2seq4repair_space>DATA<seq2seq4repair_space>LOCAL<seq2seq4repair_space>INFILE<seq2seq4repair_space>'file.txt'<seq2seq4repair_space>REPLACE<seq2seq4repair_space>INTO<seq2seq4repair_space>TABLE<seq2seq4repair_space>T_POLICY_DTL<seq2seq4repair_space>character<seq2seq4repair_space>set<seq2seq4repair_space>utf8<seq2seq4repair_space>(" ; break ; case Issue : standardColumns = IssueColumn . getStandardColumns ( ) ; strStatementText = "LOAD<seq2seq4repair_space>DATA<seq2seq4repair_space>LOCAL<seq2seq4repair_space>INFILE<seq2seq4repair_space>'file.txt'<seq2seq4repair_space>REPLACE<seq2seq4repair_space>INTO<seq2seq4repair_space>TABLE<seq2seq4repair_space>T_ISSUE<seq2seq4repair_space>character<seq2seq4repair_space>set<seq2seq4repair_space>utf8<seq2seq4repair_space>(" ; break ; case CallFail : standardColumns = IssueColumn . getStandardColumns ( ) ; strStatementText = "LOAD<seq2seq4repair_space>DATA<seq2seq4repair_space>LOCAL<seq2seq4repair_space>INFILE<seq2seq4repair_space>'file.txt'<seq2seq4repair_space>REPLACE<seq2seq4repair_space>INTO<seq2seq4repair_space>TABLE<seq2seq4repair_space>T_CALL_FAIL_LIST<seq2seq4repair_space>character<seq2seq4repair_space>set<seq2seq4repair_space>utf8<seq2seq4repair_space>(" ; break ; case CallFailStatus : standardColumns = CallFailHQListColumn . getStandardColumns ( ) ; return false ; case Renewed : standardColumns = RenewedColumn . getStandardColumns ( ) ; strStatementText = "LOAD<seq2seq4repair_space>DATA<seq2seq4repair_space>LOCAL<seq2seq4repair_space>INFILE<seq2seq4repair_space>'file.txt'<seq2seq4repair_space>REPLACE<seq2seq4repair_space>INTO<seq2seq4repair_space>TABLE<seq2seq4repair_space>T_RENEWED_LIST<seq2seq4repair_space>character<seq2seq4repair_space>set<seq2seq4repair_space>utf8<seq2seq4repair_space>(" ; break ; case RenewedStatus : standardColumns = RenewedStatusColumn . getStandardColumns ( ) ; return false ; case RenewedHQList : standardColumns = RenewedHQListColumn . getStandardColumns ( ) ; return false ; case RemitMoney : standardColumns = RemitMoneyColumn . getStandardColumns ( ) ; strStatementText = "LOAD<seq2seq4repair_space>DATA<seq2seq4repair_space>LOCAL<seq2seq4repair_space>INFILE<seq2seq4repair_space>'file.txt'<seq2seq4repair_space>REPLACE<seq2seq4repair_space>INTO<seq2seq4repair_space>TABLE<seq2seq4repair_space>T_REMIT_MONEY_LIST<seq2seq4repair_space>character<seq2seq4repair_space>set<seq2seq4repair_space>utf8<seq2seq4repair_space>(" ; break ; case CheckWrite : standardColumns = CheckColumn . getStandardColumns ( ) ; strStatementText = "LOAD<seq2seq4repair_space>DATA<seq2seq4repair_space>LOCAL<seq2seq4repair_space>INFILE<seq2seq4repair_space>'file.txt'<seq2seq4repair_space>REPLACE<seq2seq4repair_space>INTO<seq2seq4repair_space>TABLE<seq2seq4repair_space>T_CHECK_WRITE<seq2seq4repair_space>character<seq2seq4repair_space>set<seq2seq4repair_space>utf8<seq2seq4repair_space>(fix_status,<seq2seq4repair_space>" ; break ; case CheckRecord : standardColumns = CheckColumn . getStandardColumns ( ) ; strStatementText = "LOAD<seq2seq4repair_space>DATA<seq2seq4repair_space>LOCAL<seq2seq4repair_space>INFILE<seq2seq4repair_space>'file.txt'<seq2seq4repair_space>REPLACE<seq2seq4repair_space>INTO<seq2seq4repair_space>TABLE<seq2seq4repair_space>T_CHECK_RECORD<seq2seq4repair_space>character<seq2seq4repair_space>set<seq2seq4repair_space>utf8<seq2seq4repair_space>(fix_status,<seq2seq4repair_space>" ; break ; default : UploadDataServiceImpl . log . warn ( "------------reach<seq2seq4repair_space>the<seq2seq4repair_space>default<seq2seq4repair_space>FileTemplate??<seq2seq4repair_space>oh<seq2seq4repair_space>no!!" ) ; } for ( ColumnItem item : standardColumns ) { if ( item . isNeedEncrypt ( ) ) { if ( strEncrypt . equals ( "" ) ) { strEncrypt = ( ( ( ( ( "SET<seq2seq4repair_space>" + ( item . getColumnName ( ) ) ) + "=HEX(AES_Encrypt(" ) + ( item . getColumnName ( ) ) ) + ",'" ) + strKey ) + "'))" ; } else { strEncrypt += ( ( ( ( ( "," + ( item . getColumnName ( ) ) ) + "=HEX(AES_Encrypt(" ) + ( item . getColumnName ( ) ) ) + ",'" ) + strKey ) + "'))" ; } } strStatementText += ( item . getColumnName ( ) ) + "," ; } strStatementText += "operate_id)<seq2seq4repair_space>" ; strStatementText += strEncrypt + ";" ; UploadDataServiceImpl . log . debug ( ( "--------------" + strStatementText ) ) ; StringBuilder builder = new StringBuilder ( ) ; Object cell = null ; for ( DataRow row : dt . Rows ) { if ( ( ft . name ( ) . equals ( CheckWrite . name ( ) ) ) || ( ft . name ( ) . equals ( CheckRecord . name ( ) ) ) ) { if ( row . getValue ( new CheckColumn ( ) . getCheckColumn ( ) ) . equals ( "要整改" ) ) { builder . append ( NewStatus . name ( ) ) ; builder . append ( '\t' ) ; } else { builder . append ( '\t' ) ; } } else if ( ft . name ( ) . equals ( RemitMoney . name ( ) ) ) { } for ( ColumnItem item : standardColumns ) { cell = StringUtil . trimStr ( row . getValue ( item . getDisplayName ( ) ) ) ; <START_BUG> if ( ft . name ( ) . equals ( CallFail . name ( ) ) ) { <END_BUG> if ( ( ( item . getDisplayName ( ) . equals ( "结案时间" ) ) && ( cell != null ) ) && ( ( cell . toString ( ) . length ( ) ) <= 0 ) ) { UploadDataServiceImpl . log . debug ( ( "-----------<seq2seq4repair_space>结案时间:<seq2seq4repair_space>" + cell ) ) ; builder . append ( "2005-11-01<seq2seq4repair_space>09:00:00\t" ) ; continue ; } } builder . append ( cell ) ; builder . append ( '\t' ) ; } builder . append ( member_id ) ; builder . append ( '\n' ) ; UploadDataServiceImpl . log . debug ( ( "---000--" + ( builder . toString ( ) ) ) ) ; } UploadDataServiceImpl . log . debug ( ( "------111-----" + ( builder . toString ( ) ) ) ) ; InputStream is = null ; try { is = IOUtils . toInputStream ( builder . toString ( ) , "UTF-8" ) ; } catch ( IOException e ) { e . printStackTrace ( ) ; } statement . setLocalInfileInputStream ( is ) ; try { statement . execute ( strStatementText ) ; } catch ( SQLException e ) { e . printStackTrace ( ) ; } finally { if ( statement != null ) { try { statement . close ( ) ; connection . close ( ) ; } catch ( SQLException e ) { e . printStackTrace ( ) ; } } if ( is != null ) { try { is . close ( ) ; } catch ( IOException e ) { } } builder . delete ( 0 , builder . length ( ) ) ; builder = null ;

Fix:
if ( ( ft . name ( ) . equals ( CallFail . name ( ) ) ) || ( ft . name ( ) . equals ( Issue . name ( ) ) ) ) {