Program: 130185
Project: 130185
Buggy source:
@Override public List<TdView> fillViews(Package pack,DatabaseMetaData dbJDBCMetadata,List<String> viewFilter,String viewPattern,String[] tableType){
  List<TdView> viewList=new ArrayList<TdView>();
  if (dbJDBCMetadata == null) {
    return null;
  }
  Package catalogOrSchema=PackageHelper.getCatalogOrSchema(pack);
  String catalogName=null;
  String schemaPattern=null;
  if (catalogOrSchema != null) {
    if (catalogOrSchema instanceof Catalog) {
      catalogName=catalogOrSchema.getName();
      if (MetadataConnectionUtils.isAS400(catalogOrSchema)) {
        return viewList;
      }
    }
 else {
      Package parentCatalog=PackageHelper.getParentPackage(catalogOrSchema);
      schemaPattern=catalogOrSchema.getName();
      catalogName=parentCatalog == null ? null : parentCatalog.getName();
    }
  }
  try {
    ResultSet tables=dbJDBCMetadata.getTables(catalogName,schemaPattern,viewPattern,tableType);
    while (tables.next()) {
      String tableName=getStringFromResultSet(tables,GetTable.TABLE_NAME.name());
      String type=getStringFromResultSet(tables,GetTable.TABLE_TYPE.name());
      if (!isCreateElement(viewFilter,tableName)) {
        continue;
      }
      boolean flag=true;
      String tableComment=null;
      if (pack != null) {
        Connection c=ConnectionHelper.getConnection(pack);
        flag=MetadataConnectionUtils.isOracle8i(c);
      }
      if (!flag) {
        tableComment=getTableComment(dbJDBCMetadata,tables,tableName,catalogName,schemaPattern);
      }
      TdView table=RelationalFactory.eINSTANCE.createTdView();
      table.setName(tableName);
      table.setTableType(type);
      table.setLabel(table.getName());
      if (tableComment != null) {
        ColumnSetHelper.setComment(tableComment,table);
      }
      viewList.add(table);
    }
    if (isLinked()) {
      PackageHelper.addMetadataTable(ListUtils.castList(MetadataTable.class,viewList),pack);
    }
  }
 catch (  SQLException e) {
    log.error(e,e);
  }
  return viewList;
}

Fixed version (ground truth):
@Override public List<TdView> fillViews(Package pack,DatabaseMetaData dbJDBCMetadata,List<String> viewFilter,String viewPattern,String[] tableType){
  List<TdView> viewList=new ArrayList<TdView>();
  if (dbJDBCMetadata == null) {
    return null;
  }
  Package catalogOrSchema=PackageHelper.getCatalogOrSchema(pack);
  String catalogName=null;
  String schemaPattern=null;
  if (catalogOrSchema != null) {
    if (catalogOrSchema instanceof Catalog) {
      catalogName=catalogOrSchema.getName();
      if (MetadataConnectionUtils.isAS400(catalogOrSchema)) {
        return viewList;
      }
    }
 else {
      Package parentCatalog=PackageHelper.getParentPackage(catalogOrSchema);
      schemaPattern=catalogOrSchema.getName();
      catalogName=parentCatalog == null ? null : parentCatalog.getName();
    }
  }
  try {
    ResultSet tables=dbJDBCMetadata.getTables(catalogName,schemaPattern,viewPattern,tableType);
    while (tables.next()) {
      String tableName=getStringFromResultSet(tables,GetTable.TABLE_NAME.name());
      String type=getStringFromResultSet(tables,GetTable.TABLE_TYPE.name());
      type=convertSpecialTableType(type);
      if (!isCreateElement(viewFilter,tableName)) {
        continue;
      }
      boolean flag=true;
      String tableComment=null;
      if (pack != null) {
        Connection c=ConnectionHelper.getConnection(pack);
        flag=MetadataConnectionUtils.isOracle8i(c);
      }
      if (!flag) {
        tableComment=getTableComment(dbJDBCMetadata,tables,tableName,catalogName,schemaPattern);
      }
      TdView table=RelationalFactory.eINSTANCE.createTdView();
      table.setName(tableName);
      table.setTableType(type);
      table.setLabel(table.getName());
      if (tableComment != null) {
        ColumnSetHelper.setComment(tableComment,table);
      }
      viewList.add(table);
    }
    if (isLinked()) {
      PackageHelper.addMetadataTable(ListUtils.castList(MetadataTable.class,viewList),pack);
    }
  }
 catch (  SQLException e) {
    log.error(e,e);
  }
  return viewList;
}