Program: 119833
Project: 119833
Buggy source:
private boolean filterRepositoryNode(RepositoryNode node){
  if (node == null) {
    return false;
  }
  if (node.isBin()) {
    return false;
  }
  if (node.getObject() != null) {
    ERepositoryStatus status=FACTORY.getStatus(node.getObject());
    if (status == ERepositoryStatus.LOCK_BY_OTHER || (status == ERepositoryStatus.LOCK_BY_USER && RepositoryManager.isOpenedItemInEditor(node.getObject()))) {
      return false;
    }
    if (node.getObject() instanceof org.talend.core.model.metadata.MetadataTable) {
      return false;
    }
    ERepositoryObjectType objectType=node.getObjectType();
    if (objectType == ERepositoryObjectType.SQLPATTERNS || objectType == ERepositoryObjectType.ROUTINES) {
      RepositoryNode systemNode=node.getParent();
      if (systemNode != null) {
        if (systemNode.getType() == ENodeType.STABLE_SYSTEM_FOLDER && systemNode.getLabel().equalsIgnoreCase(RepositoryConstants.SYSTEM_DIRECTORY)) {
          return false;
        }
      }
    }
    if (node.getObject().isDeleted()) {
      return false;
    }
  }
  ERepositoryObjectType contentType=node.getContentType();
  if (contentType != null) {
    if (contentType == ERepositoryObjectType.REFERENCED_PROJECTS || contentType == ERepositoryObjectType.GENERATED) {
      return false;
    }
 else     if (contentType == ERepositoryObjectType.SQLPATTERNS || contentType == ERepositoryObjectType.ROUTINES) {
      if (node.getType() == ENodeType.STABLE_SYSTEM_FOLDER && node.getLabel().equalsIgnoreCase(RepositoryConstants.SYSTEM_DIRECTORY)) {
        return false;
      }
    }
  }
  if (node.getType() == ENodeType.STABLE_SYSTEM_FOLDER) {
    RepositoryNode parentNode=node.getParent();
    if (parentNode != null) {
      if (parentNode.getObjectType() == ERepositoryObjectType.METADATA_CONNECTIONS) {
        return false;
      }
    }
  }
  return true;
}

Fixed version (ground truth):
private boolean filterRepositoryNode(RepositoryNode node){
  if (node == null) {
    return false;
  }
  if (node.isBin()) {
    return false;
  }
  if (node.getObject() != null) {
    ERepositoryStatus status=FACTORY.getStatus(node.getObject());
    if (status == ERepositoryStatus.LOCK_BY_OTHER || (status == ERepositoryStatus.LOCK_BY_USER && RepositoryManager.isOpenedItemInEditor(node.getObject()))) {
      return false;
    }
    if (node.getObject() instanceof org.talend.core.model.metadata.MetadataTable) {
      return false;
    }
    ERepositoryObjectType objectType=node.getObjectType();
    if (objectType == ERepositoryObjectType.SQLPATTERNS || objectType == ERepositoryObjectType.ROUTINES) {
      RepositoryNode systemNode=node.getParent();
      if (systemNode != null) {
        if (systemNode.getType() == ENodeType.STABLE_SYSTEM_FOLDER && systemNode.getLabel().equalsIgnoreCase(RepositoryConstants.SYSTEM_DIRECTORY)) {
          return false;
        }
      }
    }
    if (node.getObject().isDeleted()) {
      return false;
    }
  }
  ERepositoryObjectType contentType=node.getContentType();
  if (contentType != null) {
    if (contentType == ERepositoryObjectType.REFERENCED_PROJECTS || contentType == ERepositoryObjectType.GENERATED) {
      return false;
    }
 else     if (contentType == ERepositoryObjectType.SQLPATTERNS || contentType == ERepositoryObjectType.ROUTINES) {
      if (node.getType() == ENodeType.STABLE_SYSTEM_FOLDER && node.getLabel().equalsIgnoreCase(RepositoryConstants.SYSTEM_DIRECTORY)) {
        return false;
      }
    }
 else     if (contentType == ERepositoryObjectType.valueOf(ERepositoryObjectType.class,"String_Node_Str")) {
      return false;
    }
  }
  if (node.getType() == ENodeType.STABLE_SYSTEM_FOLDER) {
    RepositoryNode parentNode=node.getParent();
    if (parentNode != null) {
      if (parentNode.getObjectType() == ERepositoryObjectType.METADATA_CONNECTIONS) {
        return false;
      }
    }
  }
  return true;
}