Program: 128643
Project: 128643
Buggy source:
/** 
 * DOC hywang Comment method "updateDeleteOrReselectSchema".
 */
private static boolean updateDeleteOrReselectSchema(Object table,ConnectionItem connItem,Map<String,EUpdateResult> deletedOrReselectTablesMap,boolean show,boolean onlySimpleShow){
  List<IRepositoryViewObject> updateList=new ArrayList<IRepositoryViewObject>();
  List<RelationshipItemBuilder.Relation> relations=RelationshipItemBuilder.getInstance().getItemsRelatedTo(((ConnectionItem)connItem).getProperty().getId(),ItemCacheManager.LATEST_VERSION,RelationshipItemBuilder.PROPERTY_RELATION);
  if (connItem instanceof GenericSchemaConnectionItem) {
    String id=((ConnectionItem)connItem).getProperty().getId();
    if (table instanceof MetadataTable) {
      id=id + "String_Node_Str" + ((MetadataTable)table).getLabel();
    }
    List<RelationshipItemBuilder.Relation> schemaRelations=RelationshipItemBuilder.getInstance().getItemsRelatedTo(id,ItemCacheManager.LATEST_VERSION,RelationshipItemBuilder.SCHEMA_RELATION);
    if (!schemaRelations.isEmpty()) {
      relations.addAll(schemaRelations);
    }
  }
  RepositoryUpdateManager repositoryUpdateManager=new RepositoryUpdateManager(table,relations){
    @Override public Set<EUpdateItemType> getTypes(){
      Set<EUpdateItemType> types=new HashSet<EUpdateItemType>();
      types.add(EUpdateItemType.NODE_SCHEMA);
      return types;
    }
  }
;
  repositoryUpdateManager.setDeletedOrReselectTablesMap(deletedOrReselectTablesMap);
  final boolean doWork=repositoryUpdateManager.doWork(show,onlySimpleShow);
  repositoryUpdateManager.deletedOrReselectTablesMap.clear();
  return doWork;
}

Fixed version (ground truth):
/** 
 * DOC hywang Comment method "updateDeleteOrReselectSchema".
 */
private static boolean updateDeleteOrReselectSchema(Object table,ConnectionItem connItem,Map<String,EUpdateResult> deletedOrReselectTablesMap,boolean show,boolean onlySimpleShow){
  List<IRepositoryViewObject> updateList=new ArrayList<IRepositoryViewObject>();
  List<RelationshipItemBuilder.Relation> relations=RelationshipItemBuilder.getInstance().getItemsRelatedTo((connItem).getProperty().getId(),ItemCacheManager.LATEST_VERSION,RelationshipItemBuilder.PROPERTY_RELATION);
  if (connItem instanceof GenericSchemaConnectionItem) {
    String id=(connItem).getProperty().getId();
    if (table instanceof MetadataTable) {
      id=id + "String_Node_Str" + ((MetadataTable)table).getLabel();
    }
    List<RelationshipItemBuilder.Relation> schemaRelations=RelationshipItemBuilder.getInstance().getItemsRelatedTo(id,ItemCacheManager.LATEST_VERSION,RelationshipItemBuilder.SCHEMA_RELATION);
    if (!schemaRelations.isEmpty()) {
      relations.addAll(schemaRelations);
    }
  }
  RepositoryUpdateManager repositoryUpdateManager=new RepositoryUpdateManager(table,relations){
    @Override public Set<EUpdateItemType> getTypes(){
      Set<EUpdateItemType> types=new HashSet<EUpdateItemType>();
      types.add(EUpdateItemType.NODE_SCHEMA);
      return types;
    }
  }
;
  repositoryUpdateManager.setDeletedOrReselectTablesMap(deletedOrReselectTablesMap);
  final boolean doWork=repositoryUpdateManager.doWork(show,onlySimpleShow);
  repositoryUpdateManager.deletedOrReselectTablesMap.clear();
  return doWork;
}