Buggy code:
Out . println ( ( Lead + "<seq2seq4repair_space>{" ) ) ; if ( UniqueConstraints == false ) { Out . println ( ( Lead + "<seq2seq4repair_space>case<seq2seq4repair_space>-7:" ) ) ; Out . println ( ( Lead + "<seq2seq4repair_space>S.append(\"<seq2seq4repair_space>where<seq2seq4repair_space>\").append(((SelectQuery)ExtraParams).getWhereClause());" ) ) ; Out . println ( ( Lead + "<seq2seq4repair_space>break;" ) ) ; } int LookupId = - 1 ; if ( ( O . _PrimaryKey ) != null ) { ++ LookupId ; if ( UniqueConstraints == true ) { Out . println ( ( ( ( Lead + "<seq2seq4repair_space>case<seq2seq4repair_space>" ) + LookupId ) + ":" ) ) ; Out . println ( ( ( ( Lead + "<seq2seq4repair_space>S.append(" ) + ( TextUtil . EscapeDoubleQuoteWithSlash ( ( ( "<seq2seq4repair_space>where<seq2seq4repair_space>(" + ( Helper . PrintWhereClause ( G , O . _PrimaryKey . _ColumnObjs , null ) ) ) + ")" ) ) ) ) + ");" ) ) ; Out . println ( ( Lead + "<seq2seq4repair_space>break;" ) ) ; } } for ( Index I : O . _Indices ) if ( ( I != null ) && ( ( I . _Unique ) == true ) ) { ++ LookupId ; if ( UniqueConstraints == true ) { Out . println ( ( ( ( Lead + "<seq2seq4repair_space>case<seq2seq4repair_space>" ) + LookupId ) + ":" ) ) ; Out . println ( ( ( ( Lead + "<seq2seq4repair_space>S.append(" ) + ( TextUtil . EscapeDoubleQuoteWithSlash ( ( ( "<seq2seq4repair_space>where<seq2seq4repair_space>(" + ( Helper . PrintWhereClause ( G , I . _ColumnObjs , I . _SubQuery ) ) ) + ")" ) ) ) ) + ");" ) ) ; Out . println ( ( Lead + "<seq2seq4repair_space>break;" ) ) ; } } for ( Index I : O . _Indices ) if ( ( I != null ) && ( ( I . _Unique ) == false ) ) { ++ LookupId ; if ( UniqueConstraints == false ) { Out . println ( ( ( ( Lead + "<seq2seq4repair_space>case<seq2seq4repair_space>" ) + LookupId ) + ":" ) ) ; if ( ( ( I . _SubQuery ) != null ) && ( ( I . _SubQuery . _FromObj . isEmpty ( ) ) == false ) ) Out . println ( ( ( ( Lead + "<seq2seq4repair_space>S.append(" ) + ( TextUtil . EscapeDoubleQuoteWithSlash ( ( ",<seq2seq4repair_space>" + ( Helper . PrintObjectList ( I . _SubQuery . _FromObj ) ) ) ) ) ) + ");<seq2seq4repair_space>////<seq2seq4repair_space>Additional<seq2seq4repair_space>From's<seq2seq4repair_space>from<seq2seq4repair_space>the<seq2seq4repair_space>subwhereclause." ) ) ; String WhereClause = Helper . PrintWhereClause ( G , I . _ColumnObjs , I . _SubQuery ) ; if ( ( TextUtil . isNullOrEmpty ( WhereClause ) ) == false ) Out . println ( ( ( ( Lead + "<seq2seq4repair_space>S.append(" ) + ( TextUtil . EscapeDoubleQuoteWithSlash ( ( ( "<seq2seq4repair_space>where<seq2seq4repair_space>(" + WhereClause ) + ")" ) ) ) ) + ");" ) ) ; if ( ( I . _OrderByObjs . isEmpty ( ) ) == false ) Out . println ( ( ( ( Lead + "<seq2seq4repair_space>S.append(" ) + ( TextUtil . EscapeDoubleQuoteWithSlash ( ( "<seq2seq4repair_space>order<seq2seq4repair_space>by<seq2seq4repair_space>" + ( Helper . PrintOrderByClause ( G , I . _OrderByObjs , I . _OrderByOrders ) ) ) ) ) ) + ");" ) ) ; Out . println ( ( Lead + "<seq2seq4repair_space>break;" ) ) ; } } for ( SubWhereClause SWC : O . _Queries ) if ( ( SWC != null ) && ( ( SWC . _Unique ) == true ) ) { ++ LookupId ; if ( UniqueConstraints == true ) { Out . println ( ( ( ( Lead + "<seq2seq4repair_space>case<seq2seq4repair_space>" ) + LookupId ) + ":" ) ) ; if ( ( SWC . _ColumnObjs . isEmpty ( ) ) == false ) <START_BUG> Out . println ( ( ( ( Lead + "<seq2seq4repair_space>S.append(" ) + ( TextUtil . EscapeDoubleQuoteWithSlash ( ( ( "<seq2seq4repair_space>where<seq2seq4repair_space>(" + ( Helper . PrintWhereClause ( G , SWC . _ColumnObjs , SWC ) ) ) + ")" ) ) ) ) + ");" ) ) ; <END_BUG> Out . println ( ( Lead + "<seq2seq4repair_space>break;" ) ) ; } } for ( SubWhereClause SWC : O . _Queries ) if ( ( SWC != null ) && ( ( SWC . _Unique ) == false ) ) { ++ LookupId ; if ( UniqueConstraints == false ) { Out . println ( ( ( ( Lead + "<seq2seq4repair_space>case<seq2seq4repair_space>" ) + LookupId ) + ":" ) ) ; if ( ( SWC . _FromObj . isEmpty ( ) ) == false ) Out . println ( ( ( ( Lead + "<seq2seq4repair_space>S.append(" ) + ( TextUtil . EscapeDoubleQuoteWithSlash ( ( ",<seq2seq4repair_space>" + ( Helper . PrintObjectList ( SWC . _FromObj ) ) ) ) ) ) + ");<seq2seq4repair_space>////<seq2seq4repair_space>Additional<seq2seq4repair_space>From's<seq2seq4repair_space>from<seq2seq4repair_space>the<seq2seq4repair_space>subwhereclause." ) ) ; String WhereClause = Helper . PrintWhereClause ( G , null , SWC ) ; if ( ( TextUtil . isNullOrEmpty ( WhereClause ) ) == false ) Out . println ( ( ( ( Lead + "<seq2seq4repair_space>S.append(" ) + ( TextUtil . EscapeDoubleQuoteWithSlash ( ( ( "<seq2seq4repair_space>where<seq2seq4repair_space>(" + WhereClause ) + ")" ) ) ) ) + ");" ) ) ; if ( ( SWC . _OrderByObjs . isEmpty ( ) ) == false ) Out . println ( ( ( ( Lead + "<seq2seq4repair_space>S.append(" ) + ( TextUtil . EscapeDoubleQuoteWithSlash ( ( "<seq2seq4repair_space>order<seq2seq4repair_space>by<seq2seq4repair_space>" + ( Helper . PrintOrderByClause ( G , SWC . _OrderByObjs , SWC . _OrderByOrders ) ) ) ) ) ) + ");" ) ) ; Out . println ( ( Lead + "<seq2seq4repair_space>break;" ) ) ; } } if ( UniqueConstraints == true ) Out . println ( ( ( ( Lead + "<seq2seq4repair_space>case<seq2seq4repair_space>" ) + ( SystemValues . EVIL_VALUE ) ) + ":<seq2seq4repair_space>if<seq2seq4repair_space>(__Init<seq2seq4repair_space>==<seq2seq4repair_space>InitMode.CREATE)<seq2seq4repair_space>break;" ) ) ; else Out . println ( ( ( ( Lead + "<seq2seq4repair_space>case<seq2seq4repair_space>" ) + ( SystemValues . EVIL_VALUE ) ) + ":<seq2seq4repair_space>break;" ) ) ; Out . println ( ( ( ( Lead + "<seq2seq4repair_space>default:<seq2seq4repair_space>throw<seq2seq4repair_space>new<seq2seq4repair_space>Exception(\"Invalid<seq2seq4repair_space>LookupId<seq2seq4repair_space>\"+" ) + LookupIdStr ) + "+\"<seq2seq4repair_space>found.<seq2seq4repair_space>Cannot<seq2seq4repair_space>create<seq2seq4repair_space>where<seq2seq4repair_space>clause.\");" ) ) ; Out . println ( ( Lead + "<seq2seq4repair_space>}"

Fix:
Out . println ( ( ( ( Lead + "<seq2seq4repair_space>S.append(" ) + ( TextUtil . EscapeDoubleQuoteWithSlash ( ( ( "<seq2seq4repair_space>where<seq2seq4repair_space>(" + ( Helper . PrintWhereClause ( G , null , SWC ) ) ) + ")" ) ) ) ) + ");" ) ) ;