Program: 67506
Project: 67506
Buggy source:
public void addToSchemaType(ArrayList<Property> properties,TypeDefParticle compositor,ComplexType type,Schema schema){
  for (  Property next : properties) {
    if (next == null) {
      continue;
    }
    TypeDefParticle parentCompositor=compositor;
    boolean isChoice=(parentCompositor instanceof Choice);
    ComplexType parentType=type;
    if (!helper.isAnnotationPresent(next.getElement(),XmlTransient.class)) {
      if (!isChoice && helper.isAnnotationPresent(next.getElement(),XmlElementWrapper.class)) {
        XmlElementWrapper wrapper=(XmlElementWrapper)helper.getAnnotation(next.getElement(),XmlElementWrapper.class);
        Element wrapperElement=new Element();
        String name=wrapper.name();
        if (name.equals("String_Node_Str")) {
          name=next.getPropertyName();
        }
        wrapperElement.setName(name);
        wrapperElement.setMinOccurs("String_Node_Str");
        compositor.addElement(wrapperElement);
        ComplexType wrapperType=new ComplexType();
        Sequence wrapperSequence=new Sequence();
        wrapperType.setSequence(wrapperSequence);
        wrapperElement.setComplexType(wrapperType);
        parentType=wrapperType;
        parentCompositor=wrapperSequence;
      }
      if (helper.isAnnotationPresent(next.getElement(),XmlAttribute.class)) {
        Attribute attribute=new Attribute();
        QName attributeName=next.getSchemaName();
        attribute.setName(attributeName.getLocalPart());
        if (next.isRequired()) {
          attribute.setUse(Attribute.REQUIRED);
        }
        JavaClass javaType=next.getType();
        if (next.getGenericType() != null) {
          javaType=(JavaClass)next.getGenericType();
        }
        String typeName=null;
        TypeInfo info=(TypeInfo)typeInfo.get(next.getType().getQualifiedName());
        if (info != null) {
          if (!info.isComplexType()) {
            typeName=info.getSimpleType().getName();
          }
        }
 else {
          if (helper.isAnnotationPresent(next.getElement(),XmlID.class)) {
            typeName=XMLConstants.SCHEMA_PREFIX + "String_Node_Str";
          }
 else           if (helper.isAnnotationPresent(next.getElement(),XmlIDREF.class)) {
            typeName=XMLConstants.SCHEMA_PREFIX + "String_Node_Str";
          }
 else {
            QName schemaType=next.getSchemaType();
            if (schemaType == null) {
              schemaType=getSchemaTypeFor(javaType);
            }
            if (schemaType != null) {
              typeName=XMLConstants.SCHEMA_PREFIX + "String_Node_Str" + schemaType.getLocalPart();
            }
 else {
              typeName=XMLConstants.SCHEMA_PREFIX + "String_Node_Str";
            }
          }
        }
        if (isCollectionType(next)) {
          SimpleType localType=new SimpleType();
          org.eclipse.persistence.internal.oxm.schema.model.List list=new org.eclipse.persistence.internal.oxm.schema.model.List();
          list.setItemType(typeName);
          localType.setList(list);
          attribute.setSimpleType(localType);
        }
 else {
          if (typeName != null && !typeName.contains("String_Node_Str")) {
            if (info.getSchema() == schema) {
              String prefix=getPrefixForNamespace(schema.getTargetNamespace(),schema.getNamespaceResolver());
              if (prefix != null) {
                typeName=prefix + "String_Node_Str" + typeName;
              }
            }
          }
          attribute.setType(typeName);
        }
        String lookupNamespace=schema.getTargetNamespace();
        if (lookupNamespace == null) {
          lookupNamespace="String_Node_Str";
        }
        NamespaceInfo namespaceInfo=getNamespaceInfoForNamespace(lookupNamespace);
        boolean isAttributeFormQualified=true;
        if (namespaceInfo != null) {
          isAttributeFormQualified=namespaceInfo.isAttributeFormQualified();
        }
        if ((isAttributeFormQualified && !attributeName.getNamespaceURI().equals(lookupNamespace)) || (!namespaceInfo.isAttributeFormQualified() && !attributeName.getNamespaceURI().equals("String_Node_Str"))) {
          Schema attributeSchema=this.getSchemaForNamespace(attributeName.getNamespaceURI());
          if (attributeSchema != null && attributeSchema.getTopLevelAttributes().get(attribute.getName()) == null) {
            attributeSchema.getTopLevelAttributes().put(attribute.getName(),attribute);
          }
          addImportIfRequired(schema,attributeSchema,attributeName.getNamespaceURI());
          Attribute reference=new Attribute();
          String prefix=getPrefixForNamespace(attributeName.getNamespaceURI(),schema.getNamespaceResolver());
          if (prefix == null) {
            reference.setRef(attribute.getName());
          }
 else {
            reference.setRef(prefix + "String_Node_Str" + attribute.getName());
          }
          if (parentType.getSimpleContent() != null) {
            parentType.getSimpleContent().getExtension().getOrderedAttributes().add(reference);
          }
 else {
            parentType.getOrderedAttributes().add(reference);
          }
        }
 else {
          if (parentType.getSimpleContent() != null) {
            parentType.getSimpleContent().getExtension().getOrderedAttributes().add(attribute);
          }
 else           if (parentType.getComplexContent() != null) {
            parentType.getComplexContent().getExtension().getOrderedAttributes().add(attribute);
          }
 else {
            parentType.getOrderedAttributes().add(attribute);
          }
        }
      }
 else       if (helper.isAnnotationPresent(next.getElement(),XmlAnyAttribute.class)) {
        AnyAttribute anyAttribute=new AnyAttribute();
        anyAttribute.setProcessContents(AnyAttribute.LAX);
        if (type.getSimpleContent() != null) {
          SimpleContent content=type.getSimpleContent();
          content.getRestriction().setAnyAttribute(anyAttribute);
        }
 else {
          type.setAnyAttribute(anyAttribute);
        }
      }
 else       if (next.isChoice()) {
        Choice choice=new Choice();
        ArrayList<Property> choiceProperties=(ArrayList<Property>)((ChoiceProperty)next).getChoiceProperties();
        addToSchemaType(choiceProperties,choice,parentType,schema);
        if (isCollectionType(next)) {
          choice.setMaxOccurs("String_Node_Str");
        }
        if (parentCompositor instanceof Sequence) {
          ((Sequence)parentCompositor).addChoice(choice);
        }
 else         if (parentCompositor instanceof Choice) {
          ((Choice)parentCompositor).addChoice(choice);
        }
      }
 else       if (next.isAny()) {
        Any any=new Any();
        any.setNamespace("String_Node_Str");
        AnyProperty anyProp=(AnyProperty)next;
        if (anyProp.isLax()) {
          any.setProcessContents(Any.LAX);
        }
 else {
          any.setProcessContents("String_Node_Str");
        }
        if (parentCompositor instanceof Sequence) {
          ((Sequence)parentCompositor).addAny(any);
        }
 else         if (parentCompositor instanceof Choice) {
          ((Choice)parentCompositor).addAny(any);
        }
      }
 else       if (next.isReference()) {
        ReferenceProperty refProp=(ReferenceProperty)next;
        java.util.List<ElementDeclaration> referencedElements=refProp.getReferencedElements();
        if (referencedElements.size() == 1) {
          Element element=new Element();
          ElementDeclaration decl=referencedElements.get(0);
          String localName=decl.getElementName().getLocalPart();
          Schema referencedSchema=this.getSchemaForNamespace(decl.getElementName().getNamespaceURI());
          addImportIfRequired(schema,referencedSchema,decl.getElementName().getNamespaceURI());
          String prefix=this.getPrefixForNamespace(decl.getElementName().getNamespaceURI(),schema.getNamespaceResolver());
          if (prefix == null || prefix.equals("String_Node_Str")) {
            element.setRef(localName);
          }
 else {
            element.setRef(prefix + "String_Node_Str" + localName);
          }
          if (isCollectionType(next)) {
            element.setMaxOccurs("String_Node_Str");
          }
          parentCompositor.addElement(element);
        }
 else {
          Choice choice=new Choice();
          if (isCollectionType(next)) {
            choice.setMaxOccurs("String_Node_Str");
          }
          for (          ElementDeclaration elementDecl : referencedElements) {
            Element element=new Element();
            String localName=elementDecl.getElementName().getLocalPart();
            Schema referencedSchema=this.getSchemaForNamespace(elementDecl.getElementName().getNamespaceURI());
            addImportIfRequired(schema,referencedSchema,elementDecl.getElementName().getNamespaceURI());
            String prefix=this.getPrefixForNamespace(elementDecl.getElementName().getNamespaceURI(),schema.getNamespaceResolver());
            if (prefix == null || prefix.equals("String_Node_Str")) {
              element.setRef(localName);
            }
 else {
              element.setRef(prefix + "String_Node_Str" + localName);
            }
            choice.addElement(element);
          }
          if (parentCompositor instanceof Sequence) {
            ((Sequence)parentCompositor).addChoice(choice);
          }
 else           if (parentCompositor instanceof Choice) {
            ((Choice)parentCompositor).addChoice(choice);
          }
        }
      }
 else       if (!helper.isAnnotationPresent(next.getElement(),XmlValue.class)) {
        Element element=new Element();
        if (!(parentCompositor instanceof All)) {
          element.setMinOccurs(next.isRequired() ? "String_Node_Str" : "String_Node_Str");
        }
        QName elementName=next.getSchemaName();
        JavaClass javaType=next.getType();
        boolean isCollectionType=isCollectionType(next);
        if (isCollectionType) {
          JavaClass gType=next.getGenericType();
          if (gType != null && javaType.hasActualTypeArguments()) {
            Object[] params=javaType.getActualTypeArguments().toArray();
            javaType=(JavaClass)params[0];
          }
        }
        element.setName(elementName.getLocalPart());
        TypeInfo info=(TypeInfo)typeInfo.get(javaType.getQualifiedName());
        String typeName=null;
        boolean isComplexType=false;
        if (info != null) {
          if (helper.isAnnotationPresent(next.getElement(),XmlID.class)) {
            typeName=XMLConstants.SCHEMA_PREFIX + "String_Node_Str";
          }
 else           if (helper.isAnnotationPresent(next.getElement(),XmlIDREF.class)) {
            typeName=XMLConstants.SCHEMA_PREFIX + "String_Node_Str";
          }
 else {
            isComplexType=info.isComplexType();
            if (info.isComplexType()) {
              typeName=info.getComplexType().getName();
            }
 else             if (info.getSimpleType() != null) {
              typeName=info.getSimpleType().getName();
            }
 else {
              typeName=info.getSchemaTypeName();
            }
          }
          if (typeName == null) {
            if (!info.hasRootElement()) {
              if (info.isComplexType()) {
                element.setComplexType(info.getComplexType());
              }
 else {
                element.setSimpleType(info.getSimpleType());
              }
            }
          }
          if (addImportIfRequired(schema,info.getSchema(),info.getClassNamespace())) {
            String prefix=schema.getNamespaceResolver().resolveNamespaceURI(info.getClassNamespace());
            if (prefix != null && !typeName.equals("String_Node_Str")) {
              typeName=prefix + "String_Node_Str" + typeName;
            }
          }
        }
 else {
          if (helper.isAnnotationPresent(next.getElement(),XmlID.class)) {
            typeName=XMLConstants.SCHEMA_PREFIX + "String_Node_Str";
          }
 else {
            QName schemaType=next.getSchemaType();
            if (schemaType == null) {
              schemaType=getSchemaTypeFor(javaType);
            }
            if (schemaType != null) {
              typeName=XMLConstants.SCHEMA_PREFIX + "String_Node_Str" + schemaType.getLocalPart();
            }
          }
        }
        if (typeName != null && !typeName.contains("String_Node_Str")) {
          if (info.getSchema() == schema) {
            String prefix=getPrefixForNamespace(schema.getTargetNamespace(),schema.getNamespaceResolver());
            if (prefix != null) {
              typeName=prefix + "String_Node_Str" + typeName;
            }
          }
        }
        if (isCollectionType) {
          if (helper.isAnnotationPresent(next.getElement(),XmlList.class)) {
            if (isComplexType) {
            }
            SimpleType localSimpleType=new SimpleType();
            org.eclipse.persistence.internal.oxm.schema.model.List list=new org.eclipse.persistence.internal.oxm.schema.model.List();
            list.setItemType(typeName);
            localSimpleType.setList(list);
            element.setSimpleType(localSimpleType);
          }
 else {
            element.setMaxOccurs("String_Node_Str");
            element.setType(typeName);
          }
        }
 else {
          element.setType(typeName);
        }
        String lookupNamespace=schema.getTargetNamespace();
        if (lookupNamespace == null) {
          lookupNamespace="String_Node_Str";
        }
        NamespaceInfo namespaceInfo=getNamespaceInfoForNamespace(lookupNamespace);
        boolean isElementFormQualified=false;
        if (namespaceInfo != null) {
          isElementFormQualified=namespaceInfo.isElementFormQualified();
        }
        if ((isElementFormQualified && !elementName.getNamespaceURI().equals(lookupNamespace)) || (!isElementFormQualified && !elementName.getNamespaceURI().equals("String_Node_Str"))) {
          Element reference=new Element();
          reference.setMinOccurs(element.getMinOccurs());
          reference.setMaxOccurs(element.getMaxOccurs());
          Schema attributeSchema=this.getSchemaForNamespace(elementName.getNamespaceURI());
          if (attributeSchema != null && attributeSchema.getTopLevelElements().get(element.getName()) == null) {
            element.setMinOccurs(null);
            element.setMaxOccurs(null);
            attributeSchema.getTopLevelElements().put(element.getName(),element);
          }
          addImportIfRequired(schema,attributeSchema,elementName.getNamespaceURI());
          String prefix=getPrefixForNamespace(elementName.getNamespaceURI(),schema.getNamespaceResolver());
          if (prefix == null) {
            reference.setRef(element.getName());
          }
 else {
            reference.setRef(prefix + "String_Node_Str" + element.getName());
          }
          parentCompositor.addElement(reference);
        }
 else {
          parentCompositor.addElement(element);
        }
      }
    }
  }
}

Fixed version (ground truth):
public void addToSchemaType(java.util.List<Property> properties,TypeDefParticle compositor,ComplexType type,Schema schema){
  for (  Property next : properties) {
    if (next == null) {
      continue;
    }
    TypeDefParticle parentCompositor=compositor;
    boolean isChoice=(parentCompositor instanceof Choice);
    ComplexType parentType=type;
    if (!helper.isAnnotationPresent(next.getElement(),XmlTransient.class)) {
      if (!isChoice && helper.isAnnotationPresent(next.getElement(),XmlElementWrapper.class)) {
        XmlElementWrapper wrapper=(XmlElementWrapper)helper.getAnnotation(next.getElement(),XmlElementWrapper.class);
        Element wrapperElement=new Element();
        String name=wrapper.name();
        if (name.equals("String_Node_Str")) {
          name=next.getPropertyName();
        }
        wrapperElement.setName(name);
        wrapperElement.setMinOccurs("String_Node_Str");
        compositor.addElement(wrapperElement);
        ComplexType wrapperType=new ComplexType();
        Sequence wrapperSequence=new Sequence();
        wrapperType.setSequence(wrapperSequence);
        wrapperElement.setComplexType(wrapperType);
        parentType=wrapperType;
        parentCompositor=wrapperSequence;
      }
      if (helper.isAnnotationPresent(next.getElement(),XmlAttribute.class)) {
        Attribute attribute=new Attribute();
        QName attributeName=next.getSchemaName();
        attribute.setName(attributeName.getLocalPart());
        if (next.isRequired()) {
          attribute.setUse(Attribute.REQUIRED);
        }
        JavaClass javaType=next.getType();
        if (next.getGenericType() != null) {
          javaType=(JavaClass)next.getGenericType();
        }
        String typeName=null;
        TypeInfo info=(TypeInfo)typeInfo.get(next.getType().getQualifiedName());
        if (info != null) {
          if (!info.isComplexType()) {
            typeName=info.getSimpleType().getName();
          }
        }
 else {
          if (helper.isAnnotationPresent(next.getElement(),XmlID.class)) {
            typeName=XMLConstants.SCHEMA_PREFIX + "String_Node_Str";
          }
 else           if (helper.isAnnotationPresent(next.getElement(),XmlIDREF.class)) {
            typeName=XMLConstants.SCHEMA_PREFIX + "String_Node_Str";
          }
 else {
            QName schemaType=next.getSchemaType();
            if (schemaType == null) {
              schemaType=getSchemaTypeFor(javaType);
            }
            if (schemaType != null) {
              typeName=XMLConstants.SCHEMA_PREFIX + "String_Node_Str" + schemaType.getLocalPart();
            }
 else {
              typeName=XMLConstants.SCHEMA_PREFIX + "String_Node_Str";
            }
          }
        }
        if (isCollectionType(next)) {
          SimpleType localType=new SimpleType();
          org.eclipse.persistence.internal.oxm.schema.model.List list=new org.eclipse.persistence.internal.oxm.schema.model.List();
          list.setItemType(typeName);
          localType.setList(list);
          attribute.setSimpleType(localType);
        }
 else {
          if (typeName != null && !typeName.contains("String_Node_Str")) {
            if (info.getSchema() == schema) {
              String prefix=getPrefixForNamespace(schema.getTargetNamespace(),schema.getNamespaceResolver());
              if (prefix != null) {
                typeName=prefix + "String_Node_Str" + typeName;
              }
            }
          }
          attribute.setType(typeName);
        }
        String lookupNamespace=schema.getTargetNamespace();
        if (lookupNamespace == null) {
          lookupNamespace="String_Node_Str";
        }
        NamespaceInfo namespaceInfo=getNamespaceInfoForNamespace(lookupNamespace);
        boolean isAttributeFormQualified=true;
        if (namespaceInfo != null) {
          isAttributeFormQualified=namespaceInfo.isAttributeFormQualified();
        }
        if ((isAttributeFormQualified && !attributeName.getNamespaceURI().equals(lookupNamespace)) || (!namespaceInfo.isAttributeFormQualified() && !attributeName.getNamespaceURI().equals("String_Node_Str"))) {
          Schema attributeSchema=this.getSchemaForNamespace(attributeName.getNamespaceURI());
          if (attributeSchema != null && attributeSchema.getTopLevelAttributes().get(attribute.getName()) == null) {
            attributeSchema.getTopLevelAttributes().put(attribute.getName(),attribute);
          }
          addImportIfRequired(schema,attributeSchema,attributeName.getNamespaceURI());
          Attribute reference=new Attribute();
          String prefix=getPrefixForNamespace(attributeName.getNamespaceURI(),schema.getNamespaceResolver());
          if (prefix == null) {
            reference.setRef(attribute.getName());
          }
 else {
            reference.setRef(prefix + "String_Node_Str" + attribute.getName());
          }
          if (parentType.getSimpleContent() != null) {
            parentType.getSimpleContent().getExtension().getOrderedAttributes().add(reference);
          }
 else {
            parentType.getOrderedAttributes().add(reference);
          }
        }
 else {
          if (parentType.getSimpleContent() != null) {
            parentType.getSimpleContent().getExtension().getOrderedAttributes().add(attribute);
          }
 else           if (parentType.getComplexContent() != null) {
            parentType.getComplexContent().getExtension().getOrderedAttributes().add(attribute);
          }
 else {
            parentType.getOrderedAttributes().add(attribute);
          }
        }
      }
 else       if (helper.isAnnotationPresent(next.getElement(),XmlAnyAttribute.class)) {
        AnyAttribute anyAttribute=new AnyAttribute();
        anyAttribute.setProcessContents(AnyAttribute.LAX);
        if (type.getSimpleContent() != null) {
          SimpleContent content=type.getSimpleContent();
          content.getRestriction().setAnyAttribute(anyAttribute);
        }
 else {
          type.setAnyAttribute(anyAttribute);
        }
      }
 else       if (next.isChoice()) {
        Choice choice=new Choice();
        ArrayList<Property> choiceProperties=(ArrayList<Property>)((ChoiceProperty)next).getChoiceProperties();
        addToSchemaType(choiceProperties,choice,parentType,schema);
        if (isCollectionType(next)) {
          choice.setMaxOccurs("String_Node_Str");
        }
        if (parentCompositor instanceof Sequence) {
          ((Sequence)parentCompositor).addChoice(choice);
        }
 else         if (parentCompositor instanceof Choice) {
          ((Choice)parentCompositor).addChoice(choice);
        }
      }
 else       if (next.isAny()) {
        Any any=new Any();
        any.setNamespace("String_Node_Str");
        AnyProperty anyProp=(AnyProperty)next;
        if (anyProp.isLax()) {
          any.setProcessContents(Any.LAX);
        }
 else {
          any.setProcessContents("String_Node_Str");
        }
        if (parentCompositor instanceof Sequence) {
          ((Sequence)parentCompositor).addAny(any);
        }
 else         if (parentCompositor instanceof Choice) {
          ((Choice)parentCompositor).addAny(any);
        }
      }
 else       if (next.isReference()) {
        ReferenceProperty refProp=(ReferenceProperty)next;
        java.util.List<ElementDeclaration> referencedElements=refProp.getReferencedElements();
        if (referencedElements.size() == 1) {
          Element element=new Element();
          ElementDeclaration decl=referencedElements.get(0);
          String localName=decl.getElementName().getLocalPart();
          Schema referencedSchema=this.getSchemaForNamespace(decl.getElementName().getNamespaceURI());
          addImportIfRequired(schema,referencedSchema,decl.getElementName().getNamespaceURI());
          String prefix=this.getPrefixForNamespace(decl.getElementName().getNamespaceURI(),schema.getNamespaceResolver());
          if (prefix == null || prefix.equals("String_Node_Str")) {
            element.setRef(localName);
          }
 else {
            element.setRef(prefix + "String_Node_Str" + localName);
          }
          if (isCollectionType(next)) {
            element.setMaxOccurs("String_Node_Str");
          }
          parentCompositor.addElement(element);
        }
 else {
          Choice choice=new Choice();
          if (isCollectionType(next)) {
            choice.setMaxOccurs("String_Node_Str");
          }
          for (          ElementDeclaration elementDecl : referencedElements) {
            Element element=new Element();
            String localName=elementDecl.getElementName().getLocalPart();
            Schema referencedSchema=this.getSchemaForNamespace(elementDecl.getElementName().getNamespaceURI());
            addImportIfRequired(schema,referencedSchema,elementDecl.getElementName().getNamespaceURI());
            String prefix=this.getPrefixForNamespace(elementDecl.getElementName().getNamespaceURI(),schema.getNamespaceResolver());
            if (prefix == null || prefix.equals("String_Node_Str")) {
              element.setRef(localName);
            }
 else {
              element.setRef(prefix + "String_Node_Str" + localName);
            }
            choice.addElement(element);
          }
          if (parentCompositor instanceof Sequence) {
            ((Sequence)parentCompositor).addChoice(choice);
          }
 else           if (parentCompositor instanceof Choice) {
            ((Choice)parentCompositor).addChoice(choice);
          }
        }
      }
 else       if (!helper.isAnnotationPresent(next.getElement(),XmlValue.class)) {
        Element element=new Element();
        if (!(parentCompositor instanceof All)) {
          element.setMinOccurs(next.isRequired() ? "String_Node_Str" : "String_Node_Str");
        }
        QName elementName=next.getSchemaName();
        JavaClass javaType=next.getType();
        boolean isCollectionType=isCollectionType(next);
        if (isCollectionType) {
          JavaClass gType=next.getGenericType();
          if (gType != null && javaType.hasActualTypeArguments()) {
            Object[] params=javaType.getActualTypeArguments().toArray();
            javaType=(JavaClass)params[0];
          }
        }
        element.setName(elementName.getLocalPart());
        TypeInfo info=(TypeInfo)typeInfo.get(javaType.getQualifiedName());
        String typeName=null;
        boolean isComplexType=false;
        if (info != null) {
          if (helper.isAnnotationPresent(next.getElement(),XmlID.class)) {
            typeName=XMLConstants.SCHEMA_PREFIX + "String_Node_Str";
          }
 else           if (helper.isAnnotationPresent(next.getElement(),XmlIDREF.class)) {
            typeName=XMLConstants.SCHEMA_PREFIX + "String_Node_Str";
          }
 else {
            isComplexType=info.isComplexType();
            if (info.isComplexType()) {
              typeName=info.getComplexType().getName();
            }
 else             if (info.getSimpleType() != null) {
              typeName=info.getSimpleType().getName();
            }
 else {
              typeName=info.getSchemaTypeName();
            }
          }
          if (typeName == null) {
            if (!info.hasRootElement()) {
              if (info.isComplexType()) {
                element.setComplexType(info.getComplexType());
              }
 else {
                element.setSimpleType(info.getSimpleType());
              }
            }
          }
          if (addImportIfRequired(schema,info.getSchema(),info.getClassNamespace())) {
            String prefix=schema.getNamespaceResolver().resolveNamespaceURI(info.getClassNamespace());
            if (prefix != null && !typeName.equals("String_Node_Str")) {
              typeName=prefix + "String_Node_Str" + typeName;
            }
          }
        }
 else {
          if (helper.isAnnotationPresent(next.getElement(),XmlID.class)) {
            typeName=XMLConstants.SCHEMA_PREFIX + "String_Node_Str";
          }
 else {
            QName schemaType=next.getSchemaType();
            if (schemaType == null) {
              schemaType=getSchemaTypeFor(javaType);
            }
            if (schemaType != null) {
              typeName=XMLConstants.SCHEMA_PREFIX + "String_Node_Str" + schemaType.getLocalPart();
            }
          }
        }
        if (typeName != null && !typeName.contains("String_Node_Str")) {
          if (info.getSchema() == schema) {
            String prefix=getPrefixForNamespace(schema.getTargetNamespace(),schema.getNamespaceResolver());
            if (prefix != null) {
              typeName=prefix + "String_Node_Str" + typeName;
            }
          }
        }
        if (isCollectionType) {
          if (helper.isAnnotationPresent(next.getElement(),XmlList.class)) {
            if (isComplexType) {
            }
            SimpleType localSimpleType=new SimpleType();
            org.eclipse.persistence.internal.oxm.schema.model.List list=new org.eclipse.persistence.internal.oxm.schema.model.List();
            list.setItemType(typeName);
            localSimpleType.setList(list);
            element.setSimpleType(localSimpleType);
          }
 else {
            element.setMaxOccurs("String_Node_Str");
            element.setType(typeName);
          }
        }
 else {
          element.setType(typeName);
        }
        String lookupNamespace=schema.getTargetNamespace();
        if (lookupNamespace == null) {
          lookupNamespace="String_Node_Str";
        }
        NamespaceInfo namespaceInfo=getNamespaceInfoForNamespace(lookupNamespace);
        boolean isElementFormQualified=false;
        if (namespaceInfo != null) {
          isElementFormQualified=namespaceInfo.isElementFormQualified();
        }
        if ((isElementFormQualified && !elementName.getNamespaceURI().equals(lookupNamespace)) || (!isElementFormQualified && !elementName.getNamespaceURI().equals("String_Node_Str"))) {
          Element reference=new Element();
          reference.setMinOccurs(element.getMinOccurs());
          reference.setMaxOccurs(element.getMaxOccurs());
          Schema attributeSchema=this.getSchemaForNamespace(elementName.getNamespaceURI());
          if (attributeSchema != null && attributeSchema.getTopLevelElements().get(element.getName()) == null) {
            element.setMinOccurs(null);
            element.setMaxOccurs(null);
            attributeSchema.getTopLevelElements().put(element.getName(),element);
          }
          addImportIfRequired(schema,attributeSchema,elementName.getNamespaceURI());
          String prefix=getPrefixForNamespace(elementName.getNamespaceURI(),schema.getNamespaceResolver());
          if (prefix == null) {
            reference.setRef(element.getName());
          }
 else {
            reference.setRef(prefix + "String_Node_Str" + element.getName());
          }
          parentCompositor.addElement(reference);
        }
 else {
          parentCompositor.addElement(element);
        }
      }
    }
  }
}