Program: 64574
Project: 64574
Buggy source:
public XMLBinaryDataCollectionMapping generateBinaryDataCollectionMapping(Property property,XMLDescriptor descriptor,NamespaceInfo namespaceInfo){
  XMLBinaryDataCollectionMapping mapping=new XMLBinaryDataCollectionMapping();
  mapping.setAttributeName(property.getPropertyName());
  initializeXMLContainerMapping(mapping);
  if (property.isSetReadOnly()) {
    mapping.setIsReadOnly(property.isReadOnly());
  }
  if (property.isSetWriteOnly()) {
    mapping.setIsWriteOnly(property.isWriteOnly());
  }
  if (property.isSetXmlElementWrapper()) {
    mapping.setWrapperNullPolicy(getWrapperNullPolicyFromProperty(property));
  }
  if (property.isMethodProperty()) {
    if (property.getGetMethodName() == null) {
      String paramTypeAsString=property.getType().getName();
      mapping.setAttributeAccessor(new JAXBSetMethodAttributeAccessor(paramTypeAsString,helper.getClassLoader()));
      mapping.setIsReadOnly(true);
      mapping.setSetMethodName(property.getSetMethodName());
    }
 else     if (property.getSetMethodName() == null) {
      mapping.setGetMethodName(property.getGetMethodName());
      mapping.setIsWriteOnly(true);
    }
 else {
      mapping.setSetMethodName(property.getSetMethodName());
      mapping.setGetMethodName(property.getGetMethodName());
    }
  }
  if (property.isSetNullPolicy()) {
    mapping.setNullPolicy(getNullPolicyFromProperty(property,namespaceInfo.getNamespaceResolverForDescriptor()));
  }
 else   if (property.isNillable()) {
    mapping.getNullPolicy().setNullRepresentedByXsiNil(true);
    mapping.getNullPolicy().setMarshalNullRepresentation(XMLNullRepresentationType.XSI_NIL);
  }
  mapping.setField(getXPathForField(property,namespaceInfo,false));
  if (property.isSwaAttachmentRef()) {
    ((XMLField)mapping.getField()).setSchemaType(XMLConstants.SWA_REF_QNAME);
    mapping.setSwaRef(true);
  }
 else   if (property.isMtomAttachment()) {
    ((XMLField)mapping.getField()).setSchemaType(XMLConstants.BASE_64_BINARY_QNAME);
  }
  if (property.isInlineBinaryData()) {
    mapping.setShouldInlineBinaryData(true);
  }
  if (property.getMimeType() != null) {
    mapping.setMimeTypePolicy(new FixedMimeTypePolicy(property.getMimeType()));
  }
 else {
    if (areEquals(property.getType(),javax.xml.transform.Source.class)) {
      mapping.setMimeTypePolicy(new FixedMimeTypePolicy("String_Node_Str"));
    }
 else {
      mapping.setMimeTypePolicy(new FixedMimeTypePolicy("String_Node_Str"));
    }
  }
  JavaClass collectionType=property.getType();
  JavaClass itemType=property.getActualType();
  if (collectionType != null && isCollectionType(collectionType)) {
    try {
      Class declaredClass=PrivilegedAccessHelper.getClassForName(itemType.getQualifiedName(),false,helper.getClassLoader());
      mapping.setAttributeElementClass(declaredClass);
    }
 catch (    Exception e) {
    }
  }
  collectionType=containerClassImpl(collectionType);
  mapping.useCollectionClassName(collectionType.getRawName());
  return mapping;
}

Fixed version (ground truth):
public XMLBinaryDataCollectionMapping generateBinaryDataCollectionMapping(Property property,XMLDescriptor descriptor,NamespaceInfo namespaceInfo){
  XMLBinaryDataCollectionMapping mapping=new XMLBinaryDataCollectionMapping();
  mapping.setAttributeName(property.getPropertyName());
  initializeXMLContainerMapping(mapping);
  if (property.isSetReadOnly()) {
    mapping.setIsReadOnly(property.isReadOnly());
  }
  if (property.isSetWriteOnly()) {
    mapping.setIsWriteOnly(property.isWriteOnly());
  }
  if (property.isSetXmlElementWrapper()) {
    mapping.setWrapperNullPolicy(getWrapperNullPolicyFromProperty(property));
  }
  if (property.isMethodProperty()) {
    if (property.getGetMethodName() == null) {
      String paramTypeAsString=property.getType().getName();
      mapping.setAttributeAccessor(new JAXBSetMethodAttributeAccessor(paramTypeAsString,helper.getClassLoader()));
      mapping.setIsReadOnly(true);
      mapping.setSetMethodName(property.getSetMethodName());
    }
 else     if (property.getSetMethodName() == null) {
      mapping.setGetMethodName(property.getGetMethodName());
      mapping.setIsWriteOnly(true);
    }
 else {
      mapping.setSetMethodName(property.getSetMethodName());
      mapping.setGetMethodName(property.getGetMethodName());
    }
  }
  if (property.isSetNullPolicy()) {
    mapping.setNullPolicy(getNullPolicyFromProperty(property,namespaceInfo.getNamespaceResolverForDescriptor()));
  }
 else   if (property.isNillable()) {
    mapping.getNullPolicy().setNullRepresentedByXsiNil(true);
    mapping.getNullPolicy().setMarshalNullRepresentation(XMLNullRepresentationType.XSI_NIL);
  }
  mapping.setField(getXPathForField(property,namespaceInfo,false));
  if (property.isSwaAttachmentRef()) {
    ((XMLField)mapping.getField()).setSchemaType(XMLConstants.SWA_REF_QNAME);
    mapping.setSwaRef(true);
  }
 else   if (property.isMtomAttachment()) {
    ((XMLField)mapping.getField()).setSchemaType(XMLConstants.BASE_64_BINARY_QNAME);
  }
  if (property.isInlineBinaryData()) {
    mapping.setShouldInlineBinaryData(true);
  }
  if (property.getMimeType() != null) {
    mapping.setMimeTypePolicy(new FixedMimeTypePolicy(property.getMimeType()));
  }
 else {
    if (areEquals(property.getType(),javax.xml.transform.Source.class)) {
      mapping.setMimeTypePolicy(new FixedMimeTypePolicy("String_Node_Str"));
    }
 else {
      mapping.setMimeTypePolicy(new FixedMimeTypePolicy("String_Node_Str"));
    }
  }
  JavaClass collectionType=property.getType();
  JavaClass itemType=property.getActualType();
  if (collectionType != null && helper.isCollectionType(collectionType)) {
    try {
      Class declaredClass=PrivilegedAccessHelper.getClassForName(itemType.getQualifiedName(),false,helper.getClassLoader());
      mapping.setAttributeElementClass(declaredClass);
    }
 catch (    Exception e) {
    }
  }
  collectionType=containerClassImpl(collectionType);
  mapping.useCollectionClassName(collectionType.getRawName());
  return mapping;
}