Program: 156114
Project: 156114
Buggy source:
private void initDatabaseSchema() throws SQLException {
  if (config.getString("String_Node_Str","String_Node_Str").equals("String_Node_Str") || config.getString("String_Node_Str","String_Node_Str").equals("String_Node_Str")) {
    Connection connection=dataSource.getConnection();
    ResultSet result=connection.getMetaData().getTables(connection.getCatalog(),null,null,null);
    boolean exist=false;
    String checkTable=config.getString("String_Node_Str");
    while (result.next()) {
      if (result.getString("String_Node_Str").equalsIgnoreCase(checkTable)) {
        exist=true;
        break;
      }
    }
    if (exist) {
      String schemaVersionQuery=getQuery("String_Node_Str");
      if (schemaVersionQuery != null) {
        Schema schema=QueryBuilder.create(dataSource,schemaVersionQuery).executeQuerySingle(new Schema());
        int version=0;
        if (schema != null) {
          version=schema.getVersion();
        }
        if (version != 301) {
          Log.error("String_Node_Str" + version + "String_Node_Str");
          throw new RuntimeException();
        }
      }
      return;
    }
    QueryBuilder.create(dataSource,getQuery("String_Node_Str")).executeUpdate();
    User admin=new User();
    admin.setName("String_Node_Str");
    admin.setEmail("String_Node_Str");
    admin.setAdmin(true);
    admin.setPassword("String_Node_Str");
    addUser(admin);
    Server server=new Server();
    server.setRegistration(true);
    QueryBuilder.create(dataSource,getQuery("String_Node_Str")).setObject(server).executeUpdate();
    mockData(admin.getId());
  }
}

Fixed version (ground truth):
private void initDatabaseSchema() throws SQLException {
  if (config.getString("String_Node_Str","String_Node_Str").equals("String_Node_Str") || config.getString("String_Node_Str","String_Node_Str").equals("String_Node_Str")) {
    boolean exist=false;
    try (Connection connection=dataSource.getConnection();ResultSet result=connection.getMetaData().getTables(connection.getCatalog(),null,null,null)){
      String checkTable=config.getString("String_Node_Str");
      while (result.next()) {
        if (result.getString("String_Node_Str").equalsIgnoreCase(checkTable)) {
          exist=true;
          break;
        }
      }
    }
     if (exist) {
      String schemaVersionQuery=getQuery("String_Node_Str");
      if (schemaVersionQuery != null) {
        Schema schema=QueryBuilder.create(dataSource,schemaVersionQuery).executeQuerySingle(new Schema());
        int version=0;
        if (schema != null) {
          version=schema.getVersion();
        }
        if (version != 301) {
          Log.error("String_Node_Str" + version + "String_Node_Str");
          throw new RuntimeException();
        }
      }
    }
 else {
      QueryBuilder.create(dataSource,getQuery("String_Node_Str")).executeUpdate();
      User admin=new User();
      admin.setName("String_Node_Str");
      admin.setEmail("String_Node_Str");
      admin.setAdmin(true);
      admin.setPassword("String_Node_Str");
      addUser(admin);
      Server server=new Server();
      server.setRegistration(true);
      QueryBuilder.create(dataSource,getQuery("String_Node_Str")).setObject(server).executeUpdate();
      mockData(admin.getId());
    }
  }
}