Program: 138142
Project: 138142
Buggy source:
/** 
 * Create TableFolderNodeRepositoryNode.
 * @param node parent RepositoryNode
 * @param metadataObject parent CatalogViewObject or SchemaViewObject
 */
private void createRepositoryNodeTableFolderNode(List<IRepositoryNode> node,IRepositoryViewObject metadataObject){
  List<TdTable> tables=new ArrayList<TdTable>();
  String filterCharacter=null;
  try {
    if (metadataObject instanceof MetadataCatalogRepositoryObject) {
      viewObject=((MetadataCatalogRepositoryObject)metadataObject).getViewObject();
      item=(ConnectionItem)viewObject.getProperty().getItem();
      connection=item.getConnection();
      catalog=((MetadataCatalogRepositoryObject)metadataObject).getCatalog();
      tables=PackageHelper.getTables(catalog);
      filterCharacter=RepositoryNodeHelper.getTableFilter(catalog,schema);
      if (!isOnFilterring()) {
        if (tables.isEmpty()) {
          tables=DqRepositoryViewService.getTables(connection,catalog,null,true);
          if (tables.size() > 0) {
            ElementWriterFactory.getInstance().createDataProviderWriter().save(item);
          }
        }
      }
    }
 else {
      viewObject=((MetadataSchemaRepositoryObject)metadataObject).getViewObject();
      item=(ConnectionItem)viewObject.getProperty().getItem();
      connection=item.getConnection();
      schema=((MetadataSchemaRepositoryObject)metadataObject).getSchema();
      tables=PackageHelper.getTables(schema);
      filterCharacter=RepositoryNodeHelper.getTableFilter(catalog,schema);
      RepositoryNode parent=metadataObject.getRepositoryNode().getParent();
      IRepositoryViewObject object=parent.getObject();
      if (object instanceof MetadataCatalogRepositoryObject && filterCharacter.equals("String_Node_Str")) {
        filterCharacter=RepositoryNodeHelper.getTableFilter(((MetadataCatalogRepositoryObject)object).getCatalog(),null);
      }
      if (!isOnFilterring()) {
        if (tables.isEmpty()) {
          tables=DqRepositoryViewService.getTables(connection,schema,null,true);
          if (tables.size() > 0) {
            ElementWriterFactory.getInstance().createDataProviderWriter().save(item);
          }
        }
      }
    }
    if (tables.size() > 0) {
      if (!DQRepositoryNode.isOnFilterring()) {
        Project currentProject=ProjectManager.getInstance().getCurrentProject();
        ProxyRepositoryFactory.getInstance().save(currentProject,item);
      }
    }
 else {
      ConnectionUtils.retrieveColumn(tables);
    }
    if (filterCharacter != null && !filterCharacter.equals("String_Node_Str")) {
      tables=RepositoryNodeHelper.filterTables(tables,filterCharacter);
    }
  }
 catch (  Exception e) {
    log.error(e,e);
  }
  createTableRepositoryNode(tables,node);
}

Fixed version (ground truth):
/** 
 * Create TableFolderNodeRepositoryNode.
 * @param node parent RepositoryNode
 * @param metadataObject parent CatalogViewObject or SchemaViewObject
 */
private void createRepositoryNodeTableFolderNode(List<IRepositoryNode> node,IRepositoryViewObject metadataObject){
  List<TdTable> tables=new ArrayList<TdTable>();
  String filterCharacter=null;
  try {
    if (metadataObject instanceof MetadataCatalogRepositoryObject) {
      viewObject=((MetadataCatalogRepositoryObject)metadataObject).getViewObject();
      item=(ConnectionItem)viewObject.getProperty().getItem();
      connection=item.getConnection();
      catalog=((MetadataCatalogRepositoryObject)metadataObject).getCatalog();
      tables=PackageHelper.getTables(catalog);
      filterCharacter=RepositoryNodeHelper.getTableFilter(catalog,schema);
      if (!isOnFilterring()) {
        if (tables.isEmpty()) {
          tables=DqRepositoryViewService.getTables(connection,catalog,null,true);
          if (tables.size() > 0) {
            ElementWriterFactory.getInstance().createDataProviderWriter().save(item);
          }
        }
      }
    }
 else {
      viewObject=((MetadataSchemaRepositoryObject)metadataObject).getViewObject();
      item=(ConnectionItem)viewObject.getProperty().getItem();
      connection=item.getConnection();
      schema=((MetadataSchemaRepositoryObject)metadataObject).getSchema();
      tables=PackageHelper.getTables(schema);
      filterCharacter=RepositoryNodeHelper.getTableFilter(catalog,schema);
      RepositoryNode parent=metadataObject.getRepositoryNode().getParent();
      IRepositoryViewObject object=parent.getObject();
      if (object instanceof MetadataCatalogRepositoryObject && filterCharacter.equals("String_Node_Str")) {
        filterCharacter=RepositoryNodeHelper.getTableFilter(((MetadataCatalogRepositoryObject)object).getCatalog(),null);
      }
      if (!isOnFilterring()) {
        if (tables.isEmpty()) {
          tables=DqRepositoryViewService.getTables(connection,schema,null,true);
          if (tables.size() > 0) {
            ElementWriterFactory.getInstance().createDataProviderWriter().save(item);
          }
        }
      }
    }
    if (tables.size() > 0) {
      if (!DQRepositoryNode.isOnFilterring()) {
        Project currentProject=ProjectManager.getInstance().getCurrentProject();
        ProxyRepositoryFactory.getInstance().save(currentProject,item);
      }
    }
    ConnectionUtils.retrieveColumn(tables);
    if (filterCharacter != null && !filterCharacter.equals("String_Node_Str")) {
      tables=RepositoryNodeHelper.filterTables(tables,filterCharacter);
    }
  }
 catch (  Exception e) {
    log.error(e,e);
  }
  createTableRepositoryNode(tables,node);
}