Program: 64301
Project: 64301
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(new org.eclipse.persistence.oxm.record.UnmarshalRecord(unmarshalRecord),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();
      org.eclipse.persistence.oxm.record.UnmarshalRecord wrapper=(org.eclipse.persistence.oxm.record.UnmarshalRecord)stob2.createRecord(unmarshalRecord.getSession());
      UnmarshalRecord childRecord=wrapper.getUnmarshalRecord();
      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=((ObjectBuilder)xmlDescriptor.getObjectBuilder()).classFromRow(unmarshalRecord,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();
      org.eclipse.persistence.oxm.record.UnmarshalRecord wrapper=(org.eclipse.persistence.oxm.record.UnmarshalRecord)stob2.createRecord(unmarshalRecord.getSession());
      UnmarshalRecord childRecord=wrapper.getUnmarshalRecord();
      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);
  }
}