Program: 63790
Project: 63790
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=((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());
          }
        }
      }
      UnmarshalRecord childRecord=unmarshalRecord.getUnmarshaller().createUnmarshalRecord(xmlDescriptor,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=((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());
          }
        }
      }
      UnmarshalRecord childRecord=unmarshalRecord.getChildUnmarshalRecord((ObjectBuilder)xmlDescriptor.getObjectBuilder());
      childRecord.setSelfRecord(true);
      unmarshalRecord.setChildRecord(childRecord);
      childRecord.startDocument();
      childRecord.initializeRecord(this.xmlCompositeObjectMapping);
      return childRecord;
    }
 else {
      return null;
    }
  }
 catch (  SAXException e) {
    throw XMLMarshalException.unmarshalException(e);
  }
}