Program: 67203
Project: 67203
Buggy source:
public XMLDirectMapping generateDirectMapping(Property property,XMLDescriptor descriptor,NamespaceInfo namespaceInfo){
  XMLDirectMapping mapping=new XMLDirectMapping();
  mapping.setAttributeName(property.getPropertyName());
  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.isNillable()) {
    mapping.getNullPolicy().setNullRepresentedByXsiNil(true);
  }
  mapping.setField(getXPathForField(property,namespaceInfo,true));
  if (property.getType().getRawName().equals("String_Node_Str")) {
    mapping.getNullPolicy().setNullRepresentedByEmptyNode(false);
  }
  if (!mapping.getXPath().equals("String_Node_Str")) {
    ((NullPolicy)mapping.getNullPolicy()).setSetPerformedForAbsentNode(false);
  }
  if (property.isXmlElementType()) {
    Class theClass=helper.getClassForJavaClass(property.getType());
    mapping.setAttributeClassification(theClass);
  }
  if (XMLConstants.QNAME_QNAME.equals(property.getSchemaType())) {
    ((XMLField)mapping.getField()).setSchemaType(XMLConstants.QNAME_QNAME);
  }
  descriptor.addMapping(mapping);
  return mapping;
}

Fixed version (ground truth):
public XMLDirectMapping generateDirectMapping(Property property,XMLDescriptor descriptor,NamespaceInfo namespaceInfo){
  XMLDirectMapping mapping=new XMLDirectMapping();
  mapping.setAttributeName(property.getPropertyName());
  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.isNillable()) {
    mapping.getNullPolicy().setNullRepresentedByXsiNil(true);
  }
  mapping.setField(getXPathForField(property,namespaceInfo,true));
  mapping.getNullPolicy().setNullRepresentedByEmptyNode(false);
  if (property.getType().getRawName().equals("String_Node_Str")) {
    mapping.setNullValue("String_Node_Str");
  }
  if (!mapping.getXPath().equals("String_Node_Str")) {
    ((NullPolicy)mapping.getNullPolicy()).setSetPerformedForAbsentNode(false);
  }
  if (property.isXmlElementType()) {
    Class theClass=helper.getClassForJavaClass(property.getType());
    mapping.setAttributeClassification(theClass);
  }
  if (XMLConstants.QNAME_QNAME.equals(property.getSchemaType())) {
    ((XMLField)mapping.getField()).setSchemaType(XMLConstants.QNAME_QNAME);
  }
  if (property.getDefaultValue() != null) {
    mapping.setNullValue(property.getDefaultValue());
  }
  descriptor.addMapping(mapping);
  return mapping;
}