Buggy code:
public class StandardReconConfig extends ReconConfig { static final Logger logger = LoggerFactory . getLogger ( "refine-standard-recon" ) ; public static class ColumnDetail { public final String columnName ; public final String propertyName ; public final String propertyID ; public ColumnDetail ( String columnName , String propertyName , String propertyID ) { } } public static ReconConfig reconstruct ( JSONObject obj ) throws Exception { } protected static class StandardReconJob extends ReconJob { String text ; String code ; @ Override public int getKey ( ) { } } public final String service ; public final String identifierSpace ; public final String schemaSpace ; public final String typeID ; public final String typeName ; public final boolean autoMatch ; public final List < StandardReconConfig . ColumnDetail > columnDetails ; private final int limit ; public StandardReconConfig ( String service , String identifierSpace , String schemaSpace , String typeID , String typeName , boolean autoMatch , List < StandardReconConfig . ColumnDetail > columnDetails ) { } public StandardReconConfig ( String service , String identifierSpace , String schemaSpace , String typeID , String typeName , boolean autoMatch , List < StandardReconConfig . ColumnDetail > columnDetails , int limit ) { } @ Override public void write ( JSONWriter writer , Properties options ) throws JSONException { } @ Override public int getBatchSize ( ) { } @ Override public String getBriefDescription ( Project project , String columnName ) { } @ Override public ReconJob createJob ( Project project , int rowIndex , Row row , String columnName , Cell cell ) { } @ Override public List < Recon > batchRecon ( List < ReconJob > jobs , long historyEntryID ) { List < Recon > recons = new ArrayList < Recon > ( jobs . size ( ) ) ; StringWriter stringWriter = new StringWriter ( ) ; stringWriter . write ( "{" ) ; for ( int i = 0 ; i < ( jobs . size ( ) ) ; i ++ ) { StandardReconConfig . StandardReconJob job = ( ( StandardReconConfig . StandardReconJob ) ( jobs . get ( i ) ) ) ; if ( i > 0 ) { stringWriter . write ( "," ) ; } stringWriter . write ( ( ( "\"q" + i ) + "\":" ) ) ; stringWriter . write ( job . code ) ; } stringWriter . write ( "}" ) ; String queriesString = stringWriter . toString ( ) ; try { URL url = new URL ( service ) ; HttpURLConnection connection = ( ( HttpURLConnection ) ( url . openConnection ( ) ) ) ; { <START_BUG> connection . setRequestProperty ( "Content-Type" , "application//x-www-form-urlencoded" ) ; <END_BUG> connection . setConnectTimeout ( 30000 ) ; connection . setDoOutput ( true ) ; DataOutputStream dos = new DataOutputStream ( connection . getOutputStream ( ) ) ; try { String body = "queries=" + ( ParsingUtilities . encode ( queriesString ) ) ; dos . writeBytes ( body ) ; } finally { dos . flush ( ) ; dos . close ( ) ; } connection . connect ( ) ; } if ( ( connection . getResponseCode ( ) ) >= 400 ) { InputStream is = connection . getErrorStream ( ) ; StandardReconConfig . logger . error ( ( ( ( ( "Failed<seq2seq4repair_space>-<seq2seq4repair_space>code:" + ( Integer . toString ( connection . getResponseCode ( ) ) ) ) + "<seq2seq4repair_space>message:<seq2seq4repair_space>" ) + is ) == null ? "" : ParsingUtilities . inputStreamToString ( is ) ) ) ; } else { InputStream is = connection . getInputStream ( ) ; try { String s = ParsingUtilities . inputStreamToString ( is ) ; JSONObject o = ParsingUtilities . evaluateJsonStringToObject ( s ) ; for ( int i = 0 ; i < ( jobs . size ( ) ) ; i ++ ) { StandardReconConfig . StandardReconJob job = ( ( StandardReconConfig . StandardReconJob ) ( jobs . get ( i ) ) ) ; Recon recon = null ; String text = job . text ; String key = "q" + i ; if ( o . has ( key ) ) { JSONObject o2 = o . getJSONObject ( key ) ; if ( o2 . has ( "result" ) ) { JSONArray results = o2 . getJSONArray ( "result" ) ; recon = createReconServiceResults ( text , results , historyEntryID ) ; } else { StandardReconConfig . logger . warn ( ( ( ( ( ( "Service<seq2seq4repair_space>error<seq2seq4repair_space>for<seq2seq4repair_space>text:<seq2seq4repair_space>" + text ) + "\n<seq2seq4repair_space>Job<seq2seq4repair_space>code:<seq2seq4repair_space>" ) + ( job . code ) ) + "\n<seq2seq4repair_space>Response:<seq2seq4repair_space>" ) + ( o2 . toString ( ) ) ) ) ; } } else { StandardReconConfig . logger . warn ( ( ( ( "Service<seq2seq4repair_space>error<seq2seq4repair_space>for<seq2seq4repair_space>text:<seq2seq4repair_space>" + text ) + "\n<seq2seq4repair_space>Job<seq2seq4repair_space>code:<seq2seq4repair_space>" ) + ( job . code ) ) ) ; } if ( recon != null ) { recon . service = service ; } recons . add ( recon ) ; } } finally { is . close ( ) ; } } } catch ( Exception e ) { StandardReconConfig . logger . error ( ( "Failed<seq2seq4repair_space>to<seq2seq4repair_space>batch<seq2seq4repair_space>recon<seq2seq4repair_space>with<seq2seq4repair_space>load:\n" + queriesString ) , e ) ; } while ( ( recons . size ( ) ) < ( jobs . size ( ) ) ) { Recon recon = new Recon ( historyEntryID , identifierSpace , schemaSpace ) ; recon . service = service ; recon . identifierSpace = identifierSpace ; recon . schemaSpace = schemaSpace ; recons . add ( recon ) ; } return recons ; } @ Override public Recon createNewRecon ( long historyEntryID ) { } protected Recon createReconServiceResults ( String text , JSONArray results , long historyEntryID ) { } protected static double wordDistance ( String s1 , String s2 ) { } protected static double wordDistance ( Set < String > longWords , Set < String > shortWords ) { }

Fix:
connection . setRequestProperty ( "Content-Type" , "application//x-www-form-urlencoded;<seq2seq4repair_space>charset=UTF-8" ) ;