Program: 63625
Project: 63625
Buggy source:
public void generateDescriptorForJAXBElementSubclass(JavaClass javaClass,CoreProject project,NamespaceResolver nsr){
  String jClassName=javaClass.getQualifiedName();
  TypeInfo info=typeInfo.get(jClassName);
  Descriptor xmlDescriptor=new XMLDescriptor();
  xmlDescriptor.setJavaClassName(jClassName);
  String[] factoryMethodParamTypes=info.getFactoryMethodParamTypes();
  MultiArgInstantiationPolicy policy=new MultiArgInstantiationPolicy();
  policy.useFactoryInstantiationPolicy(info.getObjectFactoryClassName(),info.getFactoryMethodName());
  policy.setParameterTypeNames(factoryMethodParamTypes);
  policy.setDefaultValues(new String[]{null});
  xmlDescriptor.setInstantiationPolicy(policy);
  JavaClass paramClass=helper.getJavaClass(factoryMethodParamTypes[0]);
  boolean isObject=paramClass.getName().equals("String_Node_Str");
  if (helper.isBuiltInJavaType(paramClass) && !isObject) {
    if (isBinaryData(paramClass)) {
      BinaryDataMapping mapping=new XMLBinaryDataMapping();
      mapping.setAttributeName("String_Node_Str");
      mapping.setXPath("String_Node_Str");
      ((Field)mapping.getField()).setSchemaType(Constants.BASE_64_BINARY_QNAME);
      mapping.setSetMethodName("String_Node_Str");
      mapping.setGetMethodName("String_Node_Str");
      Class attributeClassification=org.eclipse.persistence.internal.helper.Helper.getClassFromClasseName(factoryMethodParamTypes[0],getClass().getClassLoader());
      mapping.setAttributeClassification(attributeClassification);
      mapping.getNullPolicy().setNullRepresentedByEmptyNode(false);
      mapping.setShouldInlineBinaryData(false);
      if (mapping.getMimeType() == null) {
        if (areEquals(paramClass,javax.xml.transform.Source.class)) {
          mapping.setMimeTypePolicy(new FixedMimeTypePolicy("String_Node_Str"));
        }
 else {
          mapping.setMimeTypePolicy(new FixedMimeTypePolicy("String_Node_Str"));
        }
      }
      xmlDescriptor.addMapping((CoreMapping)mapping);
    }
 else {
      DirectMapping mapping=new XMLDirectMapping();
      mapping.setNullValueMarshalled(true);
      mapping.setAttributeName("String_Node_Str");
      mapping.setGetMethodName("String_Node_Str");
      mapping.setSetMethodName("String_Node_Str");
      mapping.setXPath("String_Node_Str");
      Class attributeClassification=org.eclipse.persistence.internal.helper.Helper.getClassFromClasseName(factoryMethodParamTypes[0],getClass().getClassLoader());
      mapping.setAttributeClassification(attributeClassification);
      xmlDescriptor.addMapping((CoreMapping)mapping);
    }
  }
 else   if (paramClass.isEnum()) {
    EnumTypeInfo enumInfo=(EnumTypeInfo)typeInfo.get(paramClass.getQualifiedName());
    DirectMapping mapping=new XMLDirectMapping();
    mapping.setConverter(buildJAXBEnumTypeConverter(mapping,enumInfo));
    mapping.setNullValueMarshalled(true);
    mapping.setAttributeName("String_Node_Str");
    mapping.setGetMethodName("String_Node_Str");
    mapping.setSetMethodName("String_Node_Str");
    mapping.setXPath("String_Node_Str");
    Class attributeClassification=org.eclipse.persistence.internal.helper.Helper.getClassFromClasseName(factoryMethodParamTypes[0],getClass().getClassLoader());
    mapping.setAttributeClassification(attributeClassification);
    xmlDescriptor.addMapping((CoreMapping)mapping);
  }
 else {
    CompositeObjectMapping mapping=new XMLCompositeObjectMapping();
    mapping.setAttributeName("String_Node_Str");
    mapping.setGetMethodName("String_Node_Str");
    mapping.setSetMethodName("String_Node_Str");
    mapping.setXPath("String_Node_Str");
    if (isObject) {
      mapping.setKeepAsElementPolicy(UnmarshalKeepAsElementPolicy.KEEP_UNKNOWN_AS_ELEMENT);
    }
 else {
      mapping.setReferenceClassName(factoryMethodParamTypes[0]);
    }
    xmlDescriptor.addMapping((CoreMapping)mapping);
  }
  xmlDescriptor.setNamespaceResolver(nsr);
  setSchemaContext(xmlDescriptor,info);
  project.addDescriptor((CoreDescriptor)xmlDescriptor);
  info.setDescriptor(xmlDescriptor);
}

Fixed version (ground truth):
public void generateDescriptorForJAXBElementSubclass(JavaClass javaClass,CoreProject project,NamespaceResolver nsr){
  String jClassName=javaClass.getQualifiedName();
  TypeInfo info=typeInfo.get(jClassName);
  Descriptor xmlDescriptor=new XMLDescriptor();
  xmlDescriptor.setJavaClassName(jClassName);
  String[] factoryMethodParamTypes=info.getFactoryMethodParamTypes();
  MultiArgInstantiationPolicy policy=new MultiArgInstantiationPolicy();
  policy.useFactoryInstantiationPolicy(info.getObjectFactoryClassName(),info.getFactoryMethodName());
  policy.setParameterTypeNames(factoryMethodParamTypes);
  policy.setDefaultValues(new String[]{null});
  xmlDescriptor.setInstantiationPolicy(policy);
  JavaClass paramClass=helper.getJavaClass(factoryMethodParamTypes[0]);
  boolean isObject=paramClass.getName().equals("String_Node_Str");
  if (helper.isBuiltInJavaType(paramClass) && !isObject) {
    if (isBinaryData(paramClass)) {
      BinaryDataMapping mapping=new XMLBinaryDataMapping();
      mapping.setAttributeName("String_Node_Str");
      mapping.setXPath("String_Node_Str");
      ((Field)mapping.getField()).setSchemaType(Constants.BASE_64_BINARY_QNAME);
      mapping.setSetMethodName("String_Node_Str");
      mapping.setGetMethodName("String_Node_Str");
      Class attributeClassification=org.eclipse.persistence.internal.helper.Helper.getClassFromClasseName(factoryMethodParamTypes[0],helper.getClassLoader());
      mapping.setAttributeClassification(attributeClassification);
      mapping.getNullPolicy().setNullRepresentedByEmptyNode(false);
      mapping.setShouldInlineBinaryData(false);
      if (mapping.getMimeType() == null) {
        if (areEquals(paramClass,javax.xml.transform.Source.class)) {
          mapping.setMimeTypePolicy(new FixedMimeTypePolicy("String_Node_Str"));
        }
 else {
          mapping.setMimeTypePolicy(new FixedMimeTypePolicy("String_Node_Str"));
        }
      }
      xmlDescriptor.addMapping((CoreMapping)mapping);
    }
 else {
      DirectMapping mapping=new XMLDirectMapping();
      mapping.setNullValueMarshalled(true);
      mapping.setAttributeName("String_Node_Str");
      mapping.setGetMethodName("String_Node_Str");
      mapping.setSetMethodName("String_Node_Str");
      mapping.setXPath("String_Node_Str");
      Class attributeClassification=org.eclipse.persistence.internal.helper.Helper.getClassFromClasseName(factoryMethodParamTypes[0],helper.getClassLoader());
      mapping.setAttributeClassification(attributeClassification);
      xmlDescriptor.addMapping((CoreMapping)mapping);
    }
  }
 else   if (paramClass.isEnum()) {
    EnumTypeInfo enumInfo=(EnumTypeInfo)typeInfo.get(paramClass.getQualifiedName());
    DirectMapping mapping=new XMLDirectMapping();
    mapping.setConverter(buildJAXBEnumTypeConverter(mapping,enumInfo));
    mapping.setNullValueMarshalled(true);
    mapping.setAttributeName("String_Node_Str");
    mapping.setGetMethodName("String_Node_Str");
    mapping.setSetMethodName("String_Node_Str");
    mapping.setXPath("String_Node_Str");
    Class attributeClassification=org.eclipse.persistence.internal.helper.Helper.getClassFromClasseName(factoryMethodParamTypes[0],helper.getClassLoader());
    mapping.setAttributeClassification(attributeClassification);
    xmlDescriptor.addMapping((CoreMapping)mapping);
  }
 else {
    CompositeObjectMapping mapping=new XMLCompositeObjectMapping();
    mapping.setAttributeName("String_Node_Str");
    mapping.setGetMethodName("String_Node_Str");
    mapping.setSetMethodName("String_Node_Str");
    mapping.setXPath("String_Node_Str");
    if (isObject) {
      mapping.setKeepAsElementPolicy(UnmarshalKeepAsElementPolicy.KEEP_UNKNOWN_AS_ELEMENT);
    }
 else {
      mapping.setReferenceClassName(factoryMethodParamTypes[0]);
    }
    xmlDescriptor.addMapping((CoreMapping)mapping);
  }
  xmlDescriptor.setNamespaceResolver(nsr);
  setSchemaContext(xmlDescriptor,info);
  project.addDescriptor((CoreDescriptor)xmlDescriptor);
  info.setDescriptor(xmlDescriptor);
}