Program: 67501
Project: 67501
Buggy source:
public ArrayList<Property> getPropertyPropertiesForClass(JavaClass cls,TypeInfo info,boolean onlyPublic){
  ArrayList<Property> properties=new ArrayList<Property>();
  if (cls == null) {
    return properties;
  }
  ArrayList<JavaMethod> propertyMethods=new ArrayList<JavaMethod>();
  for (  JavaMethod next : new ArrayList<JavaMethod>(cls.getDeclaredMethods())) {
    if ((next.getName().startsWith("String_Node_Str") && next.getName().length() > 3) || (next.getName().startsWith("String_Node_Str") && next.getName().length() > 2)) {
      int modifiers=next.getModifiers();
      if (!Modifier.isStatic(modifiers) && !Modifier.isTransient(modifiers) && ((onlyPublic && Modifier.isPublic(next.getModifiers())) || !onlyPublic)) {
        propertyMethods.add(next);
      }
    }
 else     if ((next.getName().startsWith("String_Node_Str") && next.getName().length() > 3)) {
      int modifiers=next.getModifiers();
      if (!Modifier.isStatic(modifiers) && !Modifier.isTransient(modifiers) && ((onlyPublic && Modifier.isPublic(next.getModifiers())) || !onlyPublic)) {
        propertyMethods.add(next);
      }
    }
  }
  boolean hasAnyAttribteProperty=false;
  ArrayList<String> propertyNames=new ArrayList<String>();
  for (int i=0; i < propertyMethods.size(); i++) {
    JavaMethod nextMethod=propertyMethods.get(i);
    String propertyName="String_Node_Str";
    JavaMethod getMethod;
    JavaMethod setMethod;
    JavaMethod propertyMethod=null;
    if (!nextMethod.getName().startsWith("String_Node_Str")) {
      if (nextMethod.getName().startsWith("String_Node_Str")) {
        propertyName=nextMethod.getName().substring(3);
      }
 else       if (nextMethod.getName().startsWith("String_Node_Str")) {
        propertyName=nextMethod.getName().substring(2);
      }
      getMethod=nextMethod;
      String setMethodName="String_Node_Str" + propertyName;
      propertyName=Character.toLowerCase(propertyName.charAt(0)) + propertyName.substring(1);
      JavaClass[] paramTypes={(JavaClass)getMethod.getReturnType()};
      setMethod=cls.getDeclaredMethod(setMethodName,paramTypes);
      if (setMethod != null && !setMethod.getAnnotations().isEmpty()) {
        if (!helper.isAnnotationPresent(setMethod,XmlTransient.class)) {
          propertyMethod=setMethod;
        }
      }
 else {
        if (!helper.isAnnotationPresent(getMethod,XmlTransient.class)) {
          propertyMethod=getMethod;
        }
      }
    }
 else {
      propertyName=nextMethod.getName().substring(3);
      setMethod=nextMethod;
      String getMethodName="String_Node_Str" + propertyName;
      getMethod=cls.getDeclaredMethod(getMethodName,new JavaClass[]{});
      if (getMethod == null) {
        getMethodName="String_Node_Str" + propertyName;
        getMethod=cls.getDeclaredMethod(getMethodName,new JavaClass[]{});
      }
      if (getMethod != null && !getMethod.getAnnotations().isEmpty()) {
        if (!helper.isAnnotationPresent(getMethod,XmlTransient.class)) {
          propertyMethod=getMethod;
        }
      }
 else {
        if (!helper.isAnnotationPresent(setMethod,XmlTransient.class)) {
          propertyMethod=setMethod;
        }
      }
      propertyName=Character.toLowerCase(propertyName.charAt(0)) + propertyName.substring(1);
    }
    if (!propertyNames.contains(propertyName)) {
      propertyNames.add(propertyName);
      Property property=null;
      if (helper.isAnnotationPresent(propertyMethod,XmlElements.class)) {
        property=new ChoiceProperty(helper);
      }
 else       if (helper.isAnnotationPresent(propertyMethod,XmlAnyElement.class)) {
        property=new AnyProperty(helper);
      }
 else       if (helper.isAnnotationPresent(propertyMethod,XmlElementRef.class) || helper.isAnnotationPresent(propertyMethod,XmlElementRefs.class)) {
        property=new ReferenceProperty(helper);
      }
 else {
        property=new Property(helper);
      }
      if (helper.isAnnotationPresent(propertyMethod,XmlMixed.class)) {
        info.setMixed(true);
      }
      property.setElement(propertyMethod);
      property.setSchemaName(getQNameForProperty(propertyName,propertyMethod,getNamespaceInfoForPackage(cls.getPackage())));
      property.setPropertyName(propertyName);
      JavaClass returnClass=null;
      if (getMethod != null) {
        returnClass=(JavaClass)getMethod.getReturnType();
      }
 else {
        returnClass=setMethod.getParameterTypes()[0];
      }
      if (!helper.isAnnotationPresent(returnClass,XmlTransient.class)) {
        property.setType(returnClass);
      }
 else {
        JavaClass parent=returnClass.getSuperclass();
        while (parent != null) {
          if (parent.getName().equals("String_Node_Str")) {
            property.setType(parent);
            break;
          }
          if (!helper.isAnnotationPresent(parent,XmlTransient.class)) {
            property.setType(parent);
            break;
          }
          parent=parent.getSuperclass();
        }
      }
      if (returnClass != null) {
        if (returnClass.hasActualTypeArguments()) {
          ArrayList typeArgs=(ArrayList)returnClass.getActualTypeArguments();
          JavaClass genericType=(JavaClass)typeArgs.get(0);
          property.setGenericType(genericType);
        }
 else {
          property.setGenericType(returnClass);
        }
      }
      if (getMethod != null) {
        property.setGetMethodName(getMethod.getName());
      }
      if (setMethod != null) {
        property.setSetMethodName(setMethod.getName());
      }
      property.setMethodProperty(true);
      JavaClass ptype=property.getType();
      if (helper.isAnnotationPresent(property.getElement(),XmlJavaTypeAdapter.class)) {
        XmlJavaTypeAdapter adapter=(XmlJavaTypeAdapter)helper.getAnnotation(property.getElement(),XmlJavaTypeAdapter.class);
        property.setAdapterClass(adapter.value());
      }
 else       if (info.getAdaptersByClass().get(ptype) != null) {
        property.setAdapterClass(info.getAdaptersByClass().get(ptype));
      }
      if (property.hasAdapterClass()) {
        ptype=property.getValueType();
      }
      if (helper.isAnnotationPresent(property.getElement(),XmlSchemaType.class)) {
        XmlSchemaType schemaType=(XmlSchemaType)helper.getAnnotation(property.getElement(),XmlSchemaType.class);
        QName schemaTypeQname=new QName(schemaType.namespace(),schemaType.name());
        property.setSchemaType(schemaTypeQname);
      }
      if (helper.isAnnotationPresent(property.getElement(),XmlAttachmentRef.class) && areEquals(ptype,JAVAX_ACTIVATION_DATAHANDLER)) {
        property.setIsSwaAttachmentRef(true);
        property.setSchemaType(XMLConstants.SWA_REF_QNAME);
      }
 else       if (areEquals(ptype,JAVAX_ACTIVATION_DATAHANDLER) || areEquals(ptype,byte[].class) || areEquals(ptype,Byte[].class)|| areEquals(ptype,Image.class)|| areEquals(ptype,Source.class)|| areEquals(ptype,JAVAX_MAIL_INTERNET_MIMEMULTIPART)) {
        property.setIsMtomAttachment(true);
        property.setSchemaType(XMLConstants.BASE_64_BINARY_QNAME);
      }
      if (helper.isAnnotationPresent(property.getElement(),XmlMimeType.class)) {
        property.setMimeType(((XmlMimeType)helper.getAnnotation(property.getElement(),XmlMimeType.class)).value());
      }
      if (helper.isAnnotationPresent(property.getElement(),XmlJavaTypeAdapter.class)) {
        XmlJavaTypeAdapter adapter=(XmlJavaTypeAdapter)helper.getAnnotation(property.getElement(),XmlJavaTypeAdapter.class);
        property.setAdapterClass(adapter.value());
      }
 else       if (info.getAdaptersByClass().get(ptype) != null) {
        property.setAdapterClass(info.getAdaptersByClass().get(ptype));
      }
      if (helper.isAnnotationPresent(property.getElement(),XmlAttribute.class)) {
        property.setIsAttribute(true);
        property.setIsRequired(((XmlAttribute)helper.getAnnotation(property.getElement(),XmlAttribute.class)).required());
      }
      if (helper.isAnnotationPresent(property.getElement(),XmlAnyAttribute.class)) {
        if (hasAnyAttribteProperty) {
          throw org.eclipse.persistence.exceptions.JAXBException.multipleAnyAttributeMapping(cls.getName());
        }
        if (!ptype.getName().equals("String_Node_Str")) {
          throw org.eclipse.persistence.exceptions.JAXBException.anyAttributeOnNonMap(property.getPropertyName());
        }
        property.setIsAttribute(true);
        hasAnyAttribteProperty=true;
      }
      if (helper.isAnnotationPresent(property.getElement(),XmlElements.class)) {
        XmlElements xmlElements=(XmlElements)helper.getAnnotation(property.getElement(),XmlElements.class);
        XmlElement[] elements=xmlElements.value();
        ArrayList<Property> choiceProperties=new ArrayList<Property>(elements.length);
        for (int j=0; j < elements.length; j++) {
          XmlElement next=elements[j];
          Property choiceProp=new Property();
          String name=next.name();
          String namespace=next.namespace();
          QName qName=null;
          if (name.equals("String_Node_Str")) {
            name=propertyName;
          }
          if (!namespace.equals("String_Node_Str")) {
            qName=new QName(namespace,name);
          }
 else {
            qName=new QName(name);
          }
          choiceProp.setPropertyName(property.getPropertyName());
          choiceProp.setType(helper.getJavaClass(next.type()));
          choiceProp.setSchemaName(qName);
          choiceProp.setSchemaType(getSchemaTypeFor(helper.getJavaClass(next.type())));
          choiceProp.setElement(property.getElement());
          choiceProperties.add(choiceProp);
        }
        ((ChoiceProperty)property).setChoiceProperties(choiceProperties);
      }
      if (helper.isAnnotationPresent(property.getElement(),XmlAnyElement.class)) {
        XmlAnyElement anyElement=(XmlAnyElement)helper.getAnnotation(property.getElement(),XmlAnyElement.class);
        ((AnyProperty)property).setDomHandlerClass(anyElement.value());
        ((AnyProperty)property).setLax(anyElement.lax());
      }
      if (helper.isAnnotationPresent(property.getElement(),XmlElementRef.class) || helper.isAnnotationPresent(property.getElement(),XmlElementRefs.class)) {
        XmlElementRef[] elementRefs;
        XmlElementRef ref=(XmlElementRef)helper.getAnnotation(property.getElement(),XmlElementRef.class);
        if (ref != null) {
          elementRefs=new XmlElementRef[]{ref};
        }
 else {
          XmlElementRefs refs=(XmlElementRefs)helper.getAnnotation(property.getElement(),XmlElementRefs.class);
          elementRefs=refs.value();
          info.setHasElementRefs(true);
        }
        for (        XmlElementRef nextRef : elementRefs) {
          JavaClass type=ptype;
          String typeName=type.getQualifiedName();
          property.setType(type);
          if (isCollectionType(property)) {
            if (type.hasActualTypeArguments()) {
              type=(JavaClass)type.getActualTypeArguments().toArray()[0];
              typeName=type.getQualifiedName();
            }
          }
          if (nextRef.type() != XmlElementRef.DEFAULT.class) {
            typeName=helper.getJavaClass(nextRef.type()).getQualifiedName();
          }
          ElementDeclaration referencedElement=this.xmlRootElements.get(typeName);
          if (referencedElement != null) {
            addReferencedElement((ReferenceProperty)property,referencedElement);
          }
 else {
            String name=nextRef.name();
            String namespace=nextRef.namespace();
            if (namespace.equals("String_Node_Str")) {
              namespace="String_Node_Str";
            }
            QName qname=new QName(namespace,name);
            referencedElement=this.globalElements.get(qname);
            if (referencedElement != null) {
              addReferencedElement((ReferenceProperty)property,referencedElement);
            }
 else {
              throw org.eclipse.persistence.exceptions.JAXBException.invalidElementRef(property.getPropertyName(),cls.getName());
            }
          }
        }
      }
      if (helper.isAnnotationPresent(property.getElement(),XmlValue.class)) {
        info.setXmlValueProperty(property);
        JavaClass parent=cls.getSuperclass();
        while (parent != null && !(parent.getQualifiedName().equals("String_Node_Str"))) {
          if (typeInfo.get(parent.getQualifiedName()) != null) {
            throw JAXBException.propertyOrFieldCannotBeXmlValue(propertyName);
          }
          parent=parent.getSuperclass();
        }
      }
      if (!helper.isAnnotationPresent(property.getElement(),XmlTransient.class)) {
        properties.add(property);
      }
 else {
        List<String> propOrderList=Arrays.asList(info.getPropOrder());
        if (propOrderList.contains(propertyName)) {
          throw JAXBException.transientInProporder(propertyName);
        }
      }
      if (ptype.isPrimitive()) {
        property.setIsRequired(true);
      }
 else       if (helper.isAnnotationPresent(property.getElement(),XmlElement.class)) {
        property.setIsRequired(((XmlElement)helper.getAnnotation(property.getElement(),XmlElement.class)).required());
        property.setNillable(((XmlElement)helper.getAnnotation(property.getElement(),XmlElement.class)).required());
      }
    }
  }
  return properties;
}

Fixed version (ground truth):
public ArrayList<Property> getPropertyPropertiesForClass(JavaClass cls,TypeInfo info,boolean onlyPublic){
  ArrayList<Property> properties=new ArrayList<Property>();
  if (cls == null) {
    return properties;
  }
  ArrayList<JavaMethod> propertyMethods=new ArrayList<JavaMethod>();
  for (  JavaMethod next : new ArrayList<JavaMethod>(cls.getDeclaredMethods())) {
    if ((next.getName().startsWith("String_Node_Str") && next.getName().length() > 3) || (next.getName().startsWith("String_Node_Str") && next.getName().length() > 2)) {
      int modifiers=next.getModifiers();
      if (!Modifier.isStatic(modifiers) && !Modifier.isTransient(modifiers) && ((onlyPublic && Modifier.isPublic(next.getModifiers())) || !onlyPublic)) {
        propertyMethods.add(next);
      }
    }
 else     if ((next.getName().startsWith("String_Node_Str") && next.getName().length() > 3)) {
      int modifiers=next.getModifiers();
      if (!Modifier.isStatic(modifiers) && !Modifier.isTransient(modifiers) && ((onlyPublic && Modifier.isPublic(next.getModifiers())) || !onlyPublic)) {
        propertyMethods.add(next);
      }
    }
  }
  boolean hasAnyAttribteProperty=false;
  ArrayList<String> propertyNames=new ArrayList<String>();
  for (int i=0; i < propertyMethods.size(); i++) {
    boolean isPropertyTransient=false;
    JavaMethod nextMethod=propertyMethods.get(i);
    String propertyName="String_Node_Str";
    JavaMethod getMethod;
    JavaMethod setMethod;
    JavaMethod propertyMethod=null;
    if (!nextMethod.getName().startsWith("String_Node_Str")) {
      if (nextMethod.getName().startsWith("String_Node_Str")) {
        propertyName=nextMethod.getName().substring(3);
      }
 else       if (nextMethod.getName().startsWith("String_Node_Str")) {
        propertyName=nextMethod.getName().substring(2);
      }
      getMethod=nextMethod;
      String setMethodName="String_Node_Str" + propertyName;
      propertyName=Character.toLowerCase(propertyName.charAt(0)) + propertyName.substring(1);
      JavaClass[] paramTypes={(JavaClass)getMethod.getReturnType()};
      setMethod=cls.getDeclaredMethod(setMethodName,paramTypes);
      if (setMethod != null && !setMethod.getAnnotations().isEmpty()) {
        if (!helper.isAnnotationPresent(setMethod,XmlTransient.class)) {
          propertyMethod=setMethod;
        }
 else {
          isPropertyTransient=true;
        }
      }
 else {
        if (!helper.isAnnotationPresent(getMethod,XmlTransient.class)) {
          propertyMethod=getMethod;
        }
 else {
          isPropertyTransient=true;
        }
      }
    }
 else {
      propertyName=nextMethod.getName().substring(3);
      setMethod=nextMethod;
      String getMethodName="String_Node_Str" + propertyName;
      getMethod=cls.getDeclaredMethod(getMethodName,new JavaClass[]{});
      if (getMethod == null) {
        getMethodName="String_Node_Str" + propertyName;
        getMethod=cls.getDeclaredMethod(getMethodName,new JavaClass[]{});
      }
      if (getMethod != null && !getMethod.getAnnotations().isEmpty()) {
        if (!helper.isAnnotationPresent(getMethod,XmlTransient.class)) {
          propertyMethod=getMethod;
        }
 else {
          isPropertyTransient=true;
        }
      }
 else {
        if (!helper.isAnnotationPresent(setMethod,XmlTransient.class)) {
          propertyMethod=setMethod;
        }
 else {
          isPropertyTransient=true;
        }
      }
      propertyName=Character.toLowerCase(propertyName.charAt(0)) + propertyName.substring(1);
    }
    if (!propertyNames.contains(propertyName)) {
      propertyNames.add(propertyName);
      Property property=null;
      if (helper.isAnnotationPresent(propertyMethod,XmlElements.class)) {
        property=new ChoiceProperty(helper);
        validateElementIsInPropOrder(info,propertyName);
      }
 else       if (helper.isAnnotationPresent(propertyMethod,XmlAnyElement.class)) {
        property=new AnyProperty(helper);
      }
 else       if (helper.isAnnotationPresent(propertyMethod,XmlElementRef.class) || helper.isAnnotationPresent(propertyMethod,XmlElementRefs.class)) {
        property=new ReferenceProperty(helper);
        validateElementIsInPropOrder(info,propertyName);
      }
 else {
        property=new Property(helper);
      }
      property.setTransient(isPropertyTransient);
      if (helper.isAnnotationPresent(propertyMethod,XmlMixed.class)) {
        info.setMixed(true);
      }
      property.setElement(propertyMethod);
      property.setSchemaName(getQNameForProperty(propertyName,propertyMethod,getNamespaceInfoForPackage(cls.getPackage())));
      property.setPropertyName(propertyName);
      JavaClass returnClass=null;
      if (getMethod != null) {
        returnClass=(JavaClass)getMethod.getReturnType();
      }
 else {
        returnClass=setMethod.getParameterTypes()[0];
      }
      if (!helper.isAnnotationPresent(returnClass,XmlTransient.class)) {
        property.setType(returnClass);
      }
 else {
        JavaClass parent=returnClass.getSuperclass();
        while (parent != null) {
          if (parent.getName().equals("String_Node_Str")) {
            property.setType(parent);
            break;
          }
          if (!helper.isAnnotationPresent(parent,XmlTransient.class)) {
            property.setType(parent);
            break;
          }
          parent=parent.getSuperclass();
        }
      }
      if (returnClass != null) {
        if (returnClass.hasActualTypeArguments()) {
          ArrayList typeArgs=(ArrayList)returnClass.getActualTypeArguments();
          JavaClass genericType=(JavaClass)typeArgs.get(0);
          property.setGenericType(genericType);
        }
 else {
          property.setGenericType(returnClass);
        }
      }
      if (getMethod != null) {
        property.setGetMethodName(getMethod.getName());
      }
      if (setMethod != null) {
        property.setSetMethodName(setMethod.getName());
      }
      property.setMethodProperty(true);
      JavaClass ptype=property.getType();
      if (helper.isAnnotationPresent(property.getElement(),XmlJavaTypeAdapter.class)) {
        XmlJavaTypeAdapter adapter=(XmlJavaTypeAdapter)helper.getAnnotation(property.getElement(),XmlJavaTypeAdapter.class);
        property.setAdapterClass(adapter.value());
      }
 else       if (info.getAdaptersByClass().get(ptype) != null) {
        property.setAdapterClass(info.getAdaptersByClass().get(ptype));
      }
      if (property.hasAdapterClass()) {
        ptype=property.getValueType();
      }
      if (helper.isAnnotationPresent(property.getElement(),XmlSchemaType.class)) {
        XmlSchemaType schemaType=(XmlSchemaType)helper.getAnnotation(property.getElement(),XmlSchemaType.class);
        QName schemaTypeQname=new QName(schemaType.namespace(),schemaType.name());
        property.setSchemaType(schemaTypeQname);
      }
      if (helper.isAnnotationPresent(property.getElement(),XmlAttachmentRef.class) && areEquals(ptype,JAVAX_ACTIVATION_DATAHANDLER)) {
        property.setIsSwaAttachmentRef(true);
        property.setSchemaType(XMLConstants.SWA_REF_QNAME);
      }
 else       if (areEquals(ptype,JAVAX_ACTIVATION_DATAHANDLER) || areEquals(ptype,byte[].class) || areEquals(ptype,Byte[].class)|| areEquals(ptype,Image.class)|| areEquals(ptype,Source.class)|| areEquals(ptype,JAVAX_MAIL_INTERNET_MIMEMULTIPART)) {
        property.setIsMtomAttachment(true);
        property.setSchemaType(XMLConstants.BASE_64_BINARY_QNAME);
      }
      if (helper.isAnnotationPresent(property.getElement(),XmlMimeType.class)) {
        property.setMimeType(((XmlMimeType)helper.getAnnotation(property.getElement(),XmlMimeType.class)).value());
      }
      if (helper.isAnnotationPresent(property.getElement(),XmlJavaTypeAdapter.class)) {
        XmlJavaTypeAdapter adapter=(XmlJavaTypeAdapter)helper.getAnnotation(property.getElement(),XmlJavaTypeAdapter.class);
        property.setAdapterClass(adapter.value());
      }
 else       if (info.getAdaptersByClass().get(ptype) != null) {
        property.setAdapterClass(info.getAdaptersByClass().get(ptype));
      }
      if (helper.isAnnotationPresent(property.getElement(),XmlAttribute.class)) {
        property.setIsAttribute(true);
        property.setIsRequired(((XmlAttribute)helper.getAnnotation(property.getElement(),XmlAttribute.class)).required());
      }
      if (helper.isAnnotationPresent(property.getElement(),XmlAnyAttribute.class)) {
        if (hasAnyAttribteProperty) {
          throw org.eclipse.persistence.exceptions.JAXBException.multipleAnyAttributeMapping(cls.getName());
        }
        if (!ptype.getName().equals("String_Node_Str")) {
          throw org.eclipse.persistence.exceptions.JAXBException.anyAttributeOnNonMap(property.getPropertyName());
        }
        property.setIsAttribute(true);
        hasAnyAttribteProperty=true;
      }
      if (helper.isAnnotationPresent(property.getElement(),XmlElements.class)) {
        XmlElements xmlElements=(XmlElements)helper.getAnnotation(property.getElement(),XmlElements.class);
        XmlElement[] elements=xmlElements.value();
        ArrayList<Property> choiceProperties=new ArrayList<Property>(elements.length);
        validateElementIsInPropOrder(info,propertyName);
        for (int j=0; j < elements.length; j++) {
          XmlElement next=elements[j];
          Property choiceProp=new Property();
          String name=next.name();
          String namespace=next.namespace();
          QName qName=null;
          if (name.equals("String_Node_Str")) {
            name=propertyName;
          }
          if (!namespace.equals("String_Node_Str")) {
            qName=new QName(namespace,name);
          }
 else {
            qName=new QName(name);
          }
          choiceProp.setPropertyName(property.getPropertyName());
          choiceProp.setType(helper.getJavaClass(next.type()));
          choiceProp.setSchemaName(qName);
          choiceProp.setSchemaType(getSchemaTypeFor(helper.getJavaClass(next.type())));
          choiceProp.setElement(property.getElement());
          choiceProperties.add(choiceProp);
        }
        ((ChoiceProperty)property).setChoiceProperties(choiceProperties);
      }
      if (helper.isAnnotationPresent(property.getElement(),XmlAnyElement.class)) {
        XmlAnyElement anyElement=(XmlAnyElement)helper.getAnnotation(property.getElement(),XmlAnyElement.class);
        ((AnyProperty)property).setDomHandlerClass(anyElement.value());
        ((AnyProperty)property).setLax(anyElement.lax());
      }
      if (helper.isAnnotationPresent(property.getElement(),XmlElementRef.class) || helper.isAnnotationPresent(property.getElement(),XmlElementRefs.class)) {
        XmlElementRef[] elementRefs;
        XmlElementRef ref=(XmlElementRef)helper.getAnnotation(property.getElement(),XmlElementRef.class);
        if (ref != null) {
          elementRefs=new XmlElementRef[]{ref};
        }
 else {
          XmlElementRefs refs=(XmlElementRefs)helper.getAnnotation(property.getElement(),XmlElementRefs.class);
          elementRefs=refs.value();
          info.setHasElementRefs(true);
        }
        validateElementIsInPropOrder(info,propertyName);
        for (        XmlElementRef nextRef : elementRefs) {
          JavaClass type=ptype;
          String typeName=type.getQualifiedName();
          property.setType(type);
          if (isCollectionType(property)) {
            if (type.hasActualTypeArguments()) {
              type=(JavaClass)type.getActualTypeArguments().toArray()[0];
              typeName=type.getQualifiedName();
            }
          }
          if (nextRef.type() != XmlElementRef.DEFAULT.class) {
            typeName=helper.getJavaClass(nextRef.type()).getQualifiedName();
          }
          ElementDeclaration referencedElement=this.xmlRootElements.get(typeName);
          if (referencedElement != null) {
            addReferencedElement((ReferenceProperty)property,referencedElement);
          }
 else {
            String name=nextRef.name();
            String namespace=nextRef.namespace();
            if (namespace.equals("String_Node_Str")) {
              namespace="String_Node_Str";
            }
            QName qname=new QName(namespace,name);
            referencedElement=this.globalElements.get(qname);
            if (referencedElement != null) {
              addReferencedElement((ReferenceProperty)property,referencedElement);
            }
 else {
              throw org.eclipse.persistence.exceptions.JAXBException.invalidElementRef(property.getPropertyName(),cls.getName());
            }
          }
        }
      }
      if (helper.isAnnotationPresent(property.getElement(),XmlValue.class)) {
        info.setXmlValueProperty(property);
        JavaClass parent=cls.getSuperclass();
        while (parent != null && !(parent.getQualifiedName().equals("String_Node_Str"))) {
          if (typeInfo.get(parent.getQualifiedName()) != null) {
            throw JAXBException.propertyOrFieldCannotBeXmlValue(propertyName);
          }
          parent=parent.getSuperclass();
        }
      }
      if (!helper.isAnnotationPresent(property.getElement(),XmlTransient.class)) {
        properties.add(property);
      }
 else {
        List<String> propOrderList=Arrays.asList(info.getPropOrder());
        if (propOrderList.contains(propertyName)) {
          throw JAXBException.transientInProporder(propertyName);
        }
        property.setTransient(true);
      }
      if (ptype.isPrimitive()) {
        property.setIsRequired(true);
      }
 else       if (helper.isAnnotationPresent(property.getElement(),XmlElement.class)) {
        XmlElement element=(XmlElement)helper.getAnnotation(property.getElement(),XmlElement.class);
        property.setIsRequired(element.required());
        property.setNillable(element.nillable());
        validateElementIsInPropOrder(info,propertyName);
      }
    }
  }
  return properties;
}