Program: 82578
Project: 82578
Buggy source:
public static void startCollecting(String connection,final JdbcTemplate jdbc) throws Exception {
  BlurClientManager.execute(connection,new BlurCommand<Void>(){
    @Override public Void call(    Client client) throws Exception {
      List<String> tables=client.tableList();
      ObjectMapper mapper=new ObjectMapper();
      jdbc.update("String_Node_Str" + StringUtils.join(tables,"String_Node_Str") + "String_Node_Str");
      for (      String table : tables) {
        List<Map<String,Object>> existingTable=jdbc.queryForList("String_Node_Str",table);
        TableDescriptor descriptor=client.describe(table);
        TableMap.get().put(table,(Integer)(existingTable.get(0).get("String_Node_Str")));
        Schema schema=client.schema(table);
        String schemaString=mapper.writeValueAsString(schema);
        Map<String,String> shardServerLayout=client.shardServerLayout(table);
        Map<String,ArrayList<String>> formattedShard=new HashMap<String,ArrayList<String>>();
        for (        String shard : shardServerLayout.keySet()) {
          String host=shardServerLayout.get(shard);
          if (formattedShard.get(host) != null) {
            formattedShard.get(host).add(shard);
          }
 else {
            formattedShard.put(host,new ArrayList<String>(Arrays.asList(shard)));
          }
        }
        String shardServerString=mapper.writeValueAsString(formattedShard);
        String tableUri=descriptor.tableUri;
        String tableAnalyzer=descriptor.analyzerDefinition.fullTextAnalyzerClassName;
        if (existingTable.isEmpty()) {
          jdbc.update("String_Node_Str",new Object[]{table,descriptor.isIsEnabled() ? 2 : 1,tableUri,tableAnalyzer,schemaString,shardServerString});
        }
 else {
          jdbc.update("String_Node_Str",new Object[]{descriptor.isIsEnabled() ? 2 : 1,tableUri,tableAnalyzer,schemaString,shardServerString,table});
        }
      }
      return null;
    }
  }
);
}

Fixed version (ground truth):
public static void startCollecting(String connection,final JdbcTemplate jdbc) throws Exception {
  BlurClientManager.execute(connection,new BlurCommand<Void>(){
    @Override public Void call(    Client client) throws Exception {
      List<String> tables=client.tableList();
      ObjectMapper mapper=new ObjectMapper();
      jdbc.update("String_Node_Str" + StringUtils.join(tables,"String_Node_Str") + "String_Node_Str");
      for (      String table : tables) {
        List<Map<String,Object>> existingTable=jdbc.queryForList("String_Node_Str",table);
        TableDescriptor descriptor=client.describe(table);
        if (!existingTable.isEmpty()) {
          TableMap.get().put(table,(Integer)(existingTable.get(0).get("String_Node_Str")));
        }
        Schema schema=client.schema(table);
        String schemaString=mapper.writeValueAsString(schema);
        Map<String,String> shardServerLayout=client.shardServerLayout(table);
        Map<String,ArrayList<String>> formattedShard=new HashMap<String,ArrayList<String>>();
        for (        String shard : shardServerLayout.keySet()) {
          String host=shardServerLayout.get(shard);
          if (formattedShard.get(host) != null) {
            formattedShard.get(host).add(shard);
          }
 else {
            formattedShard.put(host,new ArrayList<String>(Arrays.asList(shard)));
          }
        }
        String shardServerString=mapper.writeValueAsString(formattedShard);
        String tableUri=descriptor.tableUri;
        String tableAnalyzer=descriptor.analyzerDefinition.fullTextAnalyzerClassName;
        if (existingTable.isEmpty()) {
          jdbc.update("String_Node_Str",new Object[]{table,descriptor.isIsEnabled() ? 2 : 1,tableUri,tableAnalyzer,schemaString,shardServerString});
        }
 else {
          jdbc.update("String_Node_Str",new Object[]{descriptor.isIsEnabled() ? 2 : 1,tableUri,tableAnalyzer,schemaString,shardServerString,table});
        }
      }
      return null;
    }
  }
);
}