Program: 44640
Project: 44640
Buggy source:
@Override public void startElement(String uri,String localName,String qName,Attributes atts) throws SAXException {
  logger.debug("String_Node_Str",localName,uri);
  if (doNotProcessEvent()) {
    return;
  }
  if (importResult == null) {
    createRootEntity(uri,localName,atts);
  }
 else {
    throwExceptionIfQeueIsEmpty(uri,localName);
    Object currentEntity=getCurrentEntityImported();
    if (currentEntity instanceof ContentObject) {
      if (CmsConstants.OWNER_ELEMENT_NAME.equals(localName)) {
        if (processOwner(atts)) {
          return;
        }
      }
 else {
        processCmsProperty(localName,atts,uri);
        return;
      }
    }
 else     if (currentEntity instanceof CmsProperty) {
      processCmsProperty(localName,atts,uri);
      return;
    }
 else     if (currentEntity instanceof BinaryChannel && CmsConstants.CONTENT_ELEMENT_NAME.equals(localName)) {
      return;
    }
 else     if (CmsConstants.LOCALIZED_LABEL_ELEMENT_NAME.equals(localName)) {
      String langValue=getValueForAttribute(CmsConstants.LANG_ATTRIBUTE_NAME_WITH_PREFIX,atts);
      if (langValue == null) {
        langValue=getValueForAttribute(CmsConstants.LANG_ATTRIBUTE_NAME,atts);
      }
      if (langValue != null) {
        addAttributeToImportedEntity(CmsConstants.LANG_ATTRIBUTE_NAME_WITH_PREFIX,langValue);
      }
 else {
        if (atts.getLength() > 0 && currentEntity instanceof Localization) {
          addLabelsForLocaleToImportedEntity(atts);
        }
      }
      return;
    }
 else     if (CmsConstants.OWNER_ELEMENT_NAME.equals(localName)) {
      if (processOwner(atts)) {
        return;
      }
    }
 else     if (shouldIgnoreElement(localName)) {
      return;
    }
 else {
      if (currentEntity instanceof Topic) {
        final Topic currentlyImportedTopic=(Topic)currentEntity;
        if (CmsBuiltInItem.Taxonomy.getLocalPart().equals(localName)) {
          Taxonomy taxonomy=createNewTaxonomy(atts,localName);
          currentlyImportedTopic.setTaxonomy(taxonomy);
          pushEntity(localName,taxonomy,atts);
          return;
        }
 else         if (CmsBuiltInItem.Topic.getLocalPart().equals(localName)) {
          if (atts != null && importContext.isEntityCached(getValueForAttribute(CmsBuiltInItem.Name.getLocalPart(),atts))) {
            throw new SAXException("String_Node_Str" + getValueForAttribute(CmsBuiltInItem.Name.getLocalPart(),atts) + "String_Node_Str");
          }
          Topic childTopic=createNewTopic(atts,localName);
          currentlyImportedTopic.addChild(childTopic);
          if (childTopic.getTaxonomy() == null && currentlyImportedTopic.getTaxonomy() != null) {
            childTopic.setTaxonomy(currentlyImportedTopic.getTaxonomy());
          }
          pushEntity(localName,childTopic,atts);
          return;
        }
 else         if (CmsConstants.PARENT_TOPIC.equals(localName)) {
          Topic parentTopic=createNewTopic(atts,localName);
          currentlyImportedTopic.setParent(parentTopic);
          pushEntity(localName,parentTopic,atts);
          return;
        }
      }
 else       if (currentEntity instanceof Space) {
        if (CmsBuiltInItem.Space.getLocalPart().equals(localName)) {
          Space space=createNewSpace(atts,localName);
          ((Space)currentEntity).addChild(space);
          pushEntity(localName,space,atts);
          return;
        }
 else         if (CmsConstants.PARENT_SPACE.equals(localName)) {
          Space space=createNewSpace(atts,localName);
          ((Space)currentEntity).setParent(space);
          pushEntity(localName,space,atts);
          return;
        }
      }
 else       if (currentEntity instanceof Taxonomy) {
        if (CmsBuiltInItem.Topic.getLocalPart().equals(localName)) {
          if (atts != null && importContext.isEntityCached(getValueForAttribute(CmsBuiltInItem.Name.getLocalPart(),atts))) {
            throw new SAXException("String_Node_Str" + getValueForAttribute(CmsBuiltInItem.Name.getLocalPart(),atts) + "String_Node_Str");
          }
          Topic topic=createNewTopic(atts,localName);
          ((Taxonomy)currentEntity).addRootTopic(topic);
          pushEntity(localName,topic,atts);
          return;
        }
      }
 else       if (currentEntity instanceof RepositoryUser) {
        if (CmsBuiltInItem.Space.getLocalPart().equals(localName)) {
          Space space=createNewSpace(atts,localName);
          ((RepositoryUserImpl)currentEntity).setSpace(space);
          pushEntity(localName,space,atts);
          return;
        }
 else         if (CmsBuiltInItem.Taxonomy.getLocalPart().equals(localName)) {
          Taxonomy taxonomy=createNewTaxonomy(atts,localName);
          ((RepositoryUserImpl)currentEntity).setFolksonomy(taxonomy);
          pushEntity(localName,taxonomy,atts);
          return;
        }
      }
 else       if (currentEntity instanceof Repository) {
        if (CmsBuiltInItem.Taxonomy.getLocalPart().equals(localName)) {
          Taxonomy taxonomy=createNewTaxonomy(atts,localName);
          pushEntity(localName,taxonomy,atts);
          return;
        }
 else         if (CmsBuiltInItem.OrganizationSpace.getLocalPart().equals(localName)) {
          Space space=createNewSpace(atts,localName);
          pushEntity(localName,space,atts);
          return;
        }
 else         if (CmsBuiltInItem.RepositoryUser.getLocalPart().equals(localName)) {
          RepositoryUser repositoryUser=createNewRepositoryUser(atts,localName);
          pushEntity(localName,repositoryUser,atts);
          return;
        }
 else {
          ContentObject contentObject=createNewContentObject(atts,localName,uri);
          pushEntity(localName,contentObject,atts);
          return;
        }
      }
 else       if (currentEntity instanceof List) {
        if (CmsBuiltInItem.Taxonomy.getLocalPart().equals(localName)) {
          Taxonomy taxonomy=createNewTaxonomy(atts,localName);
          ((List)currentEntity).add(taxonomy);
          pushEntity(localName,taxonomy,atts);
          return;
        }
 else         if (CmsBuiltInItem.Space.getLocalPart().equals(localName)) {
          Space space=createNewSpace(atts,localName);
          ((List)currentEntity).add(space);
          pushEntity(localName,space,atts);
          return;
        }
 else         if (CmsBuiltInItem.RepositoryUser.getLocalPart().equals(localName)) {
          RepositoryUser repositoryUser=createNewRepositoryUser(atts,localName);
          ((List)currentEntity).add(repositoryUser);
          pushEntity(localName,repositoryUser,atts);
          return;
        }
 else         if (CmsBuiltInItem.Topic.getLocalPart().equals(localName)) {
          Topic topic=createNewTopic(atts,localName);
          ((List)currentEntity).add(topic);
          pushEntity(localName,topic,atts);
          return;
        }
 else {
          ContentObject contentObject=createNewContentObject(atts,localName,uri);
          ((List)currentEntity).add(contentObject);
          pushEntity(localName,contentObject,atts);
          return;
        }
      }
    }
    throw new SAXException("String_Node_Str" + localName);
  }
}

Fixed version (ground truth):
@Override public void startElement(String uri,String localName,String qName,Attributes atts) throws SAXException {
  logger.debug("String_Node_Str",localName,uri);
  if (doNotProcessEvent()) {
    return;
  }
  if (importResult == null) {
    createRootEntity(uri,localName,atts);
  }
 else {
    throwExceptionIfQeueIsEmpty(uri,localName);
    Object currentEntity=getCurrentEntityImported();
    if (currentEntity instanceof ContentObject) {
      if (CmsConstants.OWNER_ELEMENT_NAME.equals(localName)) {
        if (processOwner(atts)) {
          return;
        }
      }
 else {
        processCmsProperty(localName,atts,uri);
        return;
      }
    }
 else     if (currentEntity instanceof CmsProperty) {
      processCmsProperty(localName,atts,uri);
      return;
    }
 else     if (currentEntity instanceof BinaryChannel && CmsConstants.CONTENT_ELEMENT_NAME.equals(localName)) {
      cmsRepositoryEntityQueue.peek().processingRawData(true);
      return;
    }
 else     if (CmsConstants.LOCALIZED_LABEL_ELEMENT_NAME.equals(localName)) {
      String langValue=getValueForAttribute(CmsConstants.LANG_ATTRIBUTE_NAME_WITH_PREFIX,atts);
      if (langValue == null) {
        langValue=getValueForAttribute(CmsConstants.LANG_ATTRIBUTE_NAME,atts);
      }
      if (langValue != null) {
        addAttributeToImportedEntity(CmsConstants.LANG_ATTRIBUTE_NAME_WITH_PREFIX,langValue);
      }
 else {
        if (atts.getLength() > 0 && currentEntity instanceof Localization) {
          addLabelsForLocaleToImportedEntity(atts);
        }
      }
      return;
    }
 else     if (CmsConstants.OWNER_ELEMENT_NAME.equals(localName)) {
      if (processOwner(atts)) {
        return;
      }
    }
 else     if (shouldIgnoreElement(localName)) {
      return;
    }
 else {
      if (currentEntity instanceof Topic) {
        final Topic currentlyImportedTopic=(Topic)currentEntity;
        if (CmsBuiltInItem.Taxonomy.getLocalPart().equals(localName)) {
          Taxonomy taxonomy=createNewTaxonomy(atts,localName);
          currentlyImportedTopic.setTaxonomy(taxonomy);
          pushEntity(localName,taxonomy,atts);
          return;
        }
 else         if (CmsBuiltInItem.Topic.getLocalPart().equals(localName)) {
          if (atts != null && importContext.isEntityCached(getValueForAttribute(CmsBuiltInItem.Name.getLocalPart(),atts))) {
            throw new SAXException("String_Node_Str" + getValueForAttribute(CmsBuiltInItem.Name.getLocalPart(),atts) + "String_Node_Str");
          }
          Topic childTopic=createNewTopic(atts,localName);
          currentlyImportedTopic.addChild(childTopic);
          if (childTopic.getTaxonomy() == null && currentlyImportedTopic.getTaxonomy() != null) {
            childTopic.setTaxonomy(currentlyImportedTopic.getTaxonomy());
          }
          pushEntity(localName,childTopic,atts);
          return;
        }
 else         if (CmsConstants.PARENT_TOPIC.equals(localName)) {
          Topic parentTopic=createNewTopic(atts,localName);
          currentlyImportedTopic.setParent(parentTopic);
          pushEntity(localName,parentTopic,atts);
          return;
        }
      }
 else       if (currentEntity instanceof Space) {
        if (CmsBuiltInItem.Space.getLocalPart().equals(localName)) {
          Space space=createNewSpace(atts,localName);
          ((Space)currentEntity).addChild(space);
          pushEntity(localName,space,atts);
          return;
        }
 else         if (CmsConstants.PARENT_SPACE.equals(localName)) {
          Space space=createNewSpace(atts,localName);
          ((Space)currentEntity).setParent(space);
          pushEntity(localName,space,atts);
          return;
        }
      }
 else       if (currentEntity instanceof Taxonomy) {
        if (CmsBuiltInItem.Topic.getLocalPart().equals(localName)) {
          if (atts != null && importContext.isEntityCached(getValueForAttribute(CmsBuiltInItem.Name.getLocalPart(),atts))) {
            throw new SAXException("String_Node_Str" + getValueForAttribute(CmsBuiltInItem.Name.getLocalPart(),atts) + "String_Node_Str");
          }
          Topic topic=createNewTopic(atts,localName);
          ((Taxonomy)currentEntity).addRootTopic(topic);
          pushEntity(localName,topic,atts);
          return;
        }
      }
 else       if (currentEntity instanceof RepositoryUser) {
        if (CmsBuiltInItem.Space.getLocalPart().equals(localName)) {
          Space space=createNewSpace(atts,localName);
          ((RepositoryUserImpl)currentEntity).setSpace(space);
          pushEntity(localName,space,atts);
          return;
        }
 else         if (CmsBuiltInItem.Taxonomy.getLocalPart().equals(localName)) {
          Taxonomy taxonomy=createNewTaxonomy(atts,localName);
          ((RepositoryUserImpl)currentEntity).setFolksonomy(taxonomy);
          pushEntity(localName,taxonomy,atts);
          return;
        }
      }
 else       if (currentEntity instanceof Repository) {
        if (CmsBuiltInItem.Taxonomy.getLocalPart().equals(localName)) {
          Taxonomy taxonomy=createNewTaxonomy(atts,localName);
          pushEntity(localName,taxonomy,atts);
          return;
        }
 else         if (CmsBuiltInItem.OrganizationSpace.getLocalPart().equals(localName)) {
          Space space=createNewSpace(atts,localName);
          pushEntity(localName,space,atts);
          return;
        }
 else         if (CmsBuiltInItem.RepositoryUser.getLocalPart().equals(localName)) {
          RepositoryUser repositoryUser=createNewRepositoryUser(atts,localName);
          pushEntity(localName,repositoryUser,atts);
          return;
        }
 else {
          ContentObject contentObject=createNewContentObject(atts,localName,uri);
          pushEntity(localName,contentObject,atts);
          return;
        }
      }
 else       if (currentEntity instanceof List) {
        if (CmsBuiltInItem.Taxonomy.getLocalPart().equals(localName)) {
          Taxonomy taxonomy=createNewTaxonomy(atts,localName);
          ((List)currentEntity).add(taxonomy);
          pushEntity(localName,taxonomy,atts);
          return;
        }
 else         if (CmsBuiltInItem.Space.getLocalPart().equals(localName)) {
          Space space=createNewSpace(atts,localName);
          ((List)currentEntity).add(space);
          pushEntity(localName,space,atts);
          return;
        }
 else         if (CmsBuiltInItem.RepositoryUser.getLocalPart().equals(localName)) {
          RepositoryUser repositoryUser=createNewRepositoryUser(atts,localName);
          ((List)currentEntity).add(repositoryUser);
          pushEntity(localName,repositoryUser,atts);
          return;
        }
 else         if (CmsBuiltInItem.Topic.getLocalPart().equals(localName)) {
          Topic topic=createNewTopic(atts,localName);
          ((List)currentEntity).add(topic);
          pushEntity(localName,topic,atts);
          return;
        }
 else {
          ContentObject contentObject=createNewContentObject(atts,localName,uri);
          ((List)currentEntity).add(contentObject);
          pushEntity(localName,contentObject,atts);
          return;
        }
      }
    }
    throw new SAXException("String_Node_Str" + localName);
  }
}