Program: 64463
Project: 64463
Buggy source:
public UnmarshalRecord buildSelfRecord(UnmarshalRecord unmarshalRecord,Attributes atts){
  try {
    Descriptor xmlDescriptor=(Descriptor)xmlCompositeObjectMapping.getReferenceDescriptor();
    if (null == xmlDescriptor) {
      xmlDescriptor=findReferenceDescriptor(null,unmarshalRecord,atts,xmlCompositeObjectMapping,xmlCompositeObjectMapping.getKeepAsElementPolicy());
    }
    if (xmlDescriptor != null) {
      if (xmlDescriptor.hasInheritance()) {
        unmarshalRecord.setAttributes(atts);
        Class clazz=xmlDescriptor.getInheritancePolicy().classFromRow((org.eclipse.persistence.oxm.record.UnmarshalRecord)unmarshalRecord,(AbstractSession)unmarshalRecord.getSession());
        if (clazz == null) {
          XPathQName leafElementType=unmarshalRecord.getLeafElementType();
          if (leafElementType != null) {
            Object indicator=xmlDescriptor.getInheritancePolicy().getClassIndicatorMapping().get(leafElementType);
            if (indicator != null) {
              clazz=(Class)indicator;
            }
          }
        }
        if (clazz != null) {
          xmlDescriptor=(Descriptor)unmarshalRecord.getSession().getDescriptor(clazz);
        }
 else {
          if (Modifier.isAbstract(xmlDescriptor.getJavaClass().getModifiers())) {
            throw DescriptorException.missingClassIndicatorField(unmarshalRecord,(org.eclipse.persistence.oxm.XMLDescriptor)xmlDescriptor.getInheritancePolicy().getDescriptor());
          }
        }
      }
      TreeObjectBuilder stob2=(TreeObjectBuilder)xmlDescriptor.getObjectBuilder();
      UnmarshalRecord childRecord=(UnmarshalRecord)stob2.createRecord((AbstractSession)unmarshalRecord.getSession());
      childRecord.setUnmarshaller(unmarshalRecord.getUnmarshaller());
      childRecord.setSelfRecord(true);
      unmarshalRecord.setChildRecord(childRecord);
      childRecord.setXMLReader(unmarshalRecord.getXMLReader());
      childRecord.startDocument();
      childRecord.initializeRecord(this.xmlCompositeObjectMapping);
      return childRecord;
    }
 else {
      return null;
    }
  }
 catch (  SAXException e) {
    throw XMLMarshalException.unmarshalException(e);
  }
}

Fixed version (ground truth):
public UnmarshalRecord buildSelfRecord(UnmarshalRecord unmarshalRecord,Attributes atts){
  try {
    Descriptor xmlDescriptor=(Descriptor)xmlCompositeObjectMapping.getReferenceDescriptor();
    if (null == xmlDescriptor) {
      xmlDescriptor=findReferenceDescriptor(null,unmarshalRecord,atts,xmlCompositeObjectMapping,xmlCompositeObjectMapping.getKeepAsElementPolicy());
    }
    if (xmlDescriptor != null) {
      if (xmlDescriptor.hasInheritance()) {
        unmarshalRecord.setAttributes(atts);
        Class clazz=xmlDescriptor.getInheritancePolicy().classFromRow((org.eclipse.persistence.oxm.record.UnmarshalRecord)unmarshalRecord,(AbstractSession)unmarshalRecord.getSession());
        if (clazz == null) {
          XPathQName leafElementType=unmarshalRecord.getLeafElementType();
          if (leafElementType != null) {
            Object indicator=xmlDescriptor.getInheritancePolicy().getClassIndicatorMapping().get(leafElementType);
            if (indicator != null) {
              clazz=(Class)indicator;
            }
          }
        }
        if (clazz != null) {
          xmlDescriptor=(Descriptor)unmarshalRecord.getSession().getDescriptor(clazz);
        }
 else {
          if (Modifier.isAbstract(xmlDescriptor.getJavaClass().getModifiers())) {
            throw DescriptorException.missingClassIndicatorField(unmarshalRecord,(org.eclipse.persistence.oxm.XMLDescriptor)xmlDescriptor.getInheritancePolicy().getDescriptor());
          }
        }
      }
      ObjectBuilder stob2=(ObjectBuilder)xmlDescriptor.getObjectBuilder();
      UnmarshalRecord childRecord=(UnmarshalRecord)stob2.createRecord(unmarshalRecord.getSession());
      childRecord.setUnmarshaller(unmarshalRecord.getUnmarshaller());
      childRecord.setSelfRecord(true);
      unmarshalRecord.setChildRecord(childRecord);
      childRecord.setXMLReader(unmarshalRecord.getXMLReader());
      childRecord.startDocument();
      childRecord.initializeRecord(this.xmlCompositeObjectMapping);
      return childRecord;
    }
 else {
      return null;
    }
  }
 catch (  SAXException e) {
    throw XMLMarshalException.unmarshalException(e);
  }
}