Program: 140742
Project: 140742
Buggy source:
public static void main(String[] args){
  TypedProperties connectionParams=PropertiesLoader.getProperties(THAT,"String_Node_Str");
  String driverClassName=connectionParams.getProperty("String_Node_Str");
  String dbUrl=connectionParams.getProperty("String_Node_Str");
  DBConnect connector=new DBConnect(dbUrl,driverClassName,connectionParams);
  try {
    TimeTracer tt=new TimeTracer("String_Node_Str",log);
    tt.start();
    FolderProvider folderProvider=new FolderProvider();
    folderProvider.setFolder(new File("String_Node_Str"));
    initializeConnection(connector,folderProvider);
    tt.end("String_Node_Str");
    TdProviderConnection providerConnection=connector.getProviderConnection();
    TypedReturnCode<Connection> rc=JavaSqlFactory.createConnection(providerConnection);
    if (!rc.isOk()) {
      log.error(rc.getMessage());
      return;
    }
    boolean ok=false;
    Collection<TdCatalog> catalogs=connector.getCatalogs();
    Connection connection=rc.getObject();
    for (    TdCatalog tdCatalog : catalogs) {
      List<TdSchema> schemas=CatalogHelper.getSchemas(tdCatalog);
      for (      TdSchema tdSchema : schemas) {
        List<TdTable> tables=SchemaHelper.getTables(tdSchema);
        if (tables.isEmpty()) {
          List<TdTable> tablesWithAllColumns=DatabaseContentRetriever.getTablesWithColumns(tdCatalog.getName(),tdSchema.getName(),null,connection);
          ok=SchemaHelper.addTables(tablesWithAllColumns,tdSchema);
        }
      }
      List<TdTable> tables=CatalogHelper.getTables(tdCatalog);
      if (tables.isEmpty()) {
        List<TdTable> tablesWithAllColumns=DatabaseContentRetriever.getTablesWithColumns(tdCatalog.getName(),null,null,connection);
        ok=CatalogHelper.addTables(tablesWithAllColumns,tdCatalog);
        Resource resource=tdCatalog.eResource();
        if (resource == null) {
          log.error("String_Node_Str");
        }
        for (        TdTable tdTable : tablesWithAllColumns) {
          List<TdColumn> columns=TableHelper.getColumns(tdTable);
          for (          TdColumn tdColumn : columns) {
            if (resource != null) {
              Classifier type=tdColumn.getType();
              if (type != null) {
                resource.getContents().add(type);
              }
            }
          }
        }
      }
    }
    if (!ok) {
      log.error("String_Node_Str");
    }
 else {
      log.info("String_Node_Str");
    }
    connection.close();
    EMFUtil util=new EMFUtil();
    ResourceSet resourceSet=providerConnection.eResource().getResourceSet();
    util.setResourceSet(resourceSet);
    util.save();
  }
 catch (  SQLException e) {
    e.printStackTrace();
  }
}

Fixed version (ground truth):
public static void main(String[] args){
  TypedProperties connectionParams=PropertiesLoader.getProperties(THAT,"String_Node_Str");
  String driverClassName=connectionParams.getProperty("String_Node_Str");
  String dbUrl=connectionParams.getProperty("String_Node_Str");
  DBConnect connector=new DBConnect(dbUrl,driverClassName,connectionParams);
  try {
    TimeTracer tt=new TimeTracer("String_Node_Str",log);
    tt.start();
    FolderProvider folderProvider=new FolderProvider();
    folderProvider.setFolder(new File("String_Node_Str"));
    initializeConnection(connector,folderProvider);
    tt.end("String_Node_Str");
    TdProviderConnection providerConnection=connector.getProviderConnection();
    TypedReturnCode<Connection> rc=JavaSqlFactory.createConnection(providerConnection);
    if (!rc.isOk()) {
      log.error(rc.getMessage());
      return;
    }
    boolean ok=false;
    Collection<TdCatalog> catalogs=connector.getCatalogs();
    Connection connection=rc.getObject();
    for (    TdCatalog tdCatalog : catalogs) {
      List<TdSchema> schemas=CatalogHelper.getSchemas(tdCatalog);
      for (      TdSchema tdSchema : schemas) {
        List<TdTable> tables=SchemaHelper.getTables(tdSchema);
        if (tables.isEmpty()) {
          List<TdTable> tablesWithAllColumns=DatabaseContentRetriever.getTablesWithColumns(tdCatalog.getName(),tdSchema.getName(),null,connection);
          ok=SchemaHelper.addTables(tablesWithAllColumns,tdSchema);
        }
      }
      List<TdTable> tables=CatalogHelper.getTables(tdCatalog);
      if (tables.isEmpty()) {
        List<TdTable> tablesWithAllColumns=DatabaseContentRetriever.getTablesWithColumns(tdCatalog.getName(),null,null,connection);
        ok=CatalogHelper.addTables(tablesWithAllColumns,tdCatalog);
        Resource resource=tdCatalog.eResource();
        if (resource == null) {
          log.error("String_Node_Str");
        }
        for (        TdTable tdTable : tablesWithAllColumns) {
          List<TdColumn> columns=TableHelper.getColumns(tdTable);
          for (          TdColumn tdColumn : columns) {
            if (resource != null) {
              Classifier type=tdColumn.getType();
              if (type != null) {
                resource.getContents().add(type);
              }
            }
          }
        }
      }
    }
    if (!ok) {
      log.error("String_Node_Str");
    }
 else {
      log.info("String_Node_Str");
    }
    connection.close();
    EMFUtil util=EMFUtil.getInstance();
    ResourceSet resourceSet=providerConnection.eResource().getResourceSet();
    util.setResourceSet(resourceSet);
    util.save();
  }
 catch (  SQLException e) {
    e.printStackTrace();
  }
}