Program: 64556
Project: 64556
Buggy source:
/** 
 * INTERNAL: Look higher in the hierarchy for the mappings listed in the unMappedAttribute list. We assume that if a mapping exists, the attribute must either be mapped from the owning class or from a superclass.
 */
public void addClassDetailsForMappedSuperClasses(MetadataClass clz,ClassDescriptor initialDescriptor,ClassDetails classDetails,Map classDetailsMap,List unMappedAttributes,boolean weaveChangeTracking){
  if (initialDescriptor.getInheritancePolicyOrNull() != null && initialDescriptor.getInheritancePolicyOrNull().getParentClass() != null) {
    return;
  }
  if (unMappedAttributes.isEmpty()) {
    return;
  }
  MetadataClass superClz=clz.getSuperclass();
  if (superClz == null || superClz.isObject()) {
    return;
  }
  boolean weaveValueHolders=canWeaveValueHolders(superClz,unMappedAttributes);
  List stillUnMappedMappings=null;
  ClassDetails superClassDetails=createClassDetails(superClz,weaveValueHolders,weaveChangeTracking,weaveFetchGroups,weaveInternal,weaveRest);
  superClassDetails.setIsMappedSuperClass(true);
  if (!initialDescriptor.usesPropertyAccessForWeaving()) {
    superClassDetails.useAttributeAccess();
  }
  if (!classDetailsMap.containsKey(superClassDetails.getClassName())) {
    stillUnMappedMappings=storeAttributeMappings(superClz,superClassDetails,unMappedAttributes,weaveValueHolders);
    classDetailsMap.put(superClassDetails.getClassName(),superClassDetails);
  }
  if (((stillUnMappedMappings != null) && (stillUnMappedMappings.size() > 0))) {
    addClassDetailsForMappedSuperClasses(superClz,initialDescriptor,classDetails,classDetailsMap,stillUnMappedMappings,weaveChangeTracking);
  }
}

Fixed version (ground truth):
/** 
 * INTERNAL: Look higher in the hierarchy for the mappings listed in the unMappedAttribute list. We assume that if a mapping exists, the attribute must either be mapped from the owning class or from a superclass.
 */
public void addClassDetailsForMappedSuperClasses(MetadataClass clz,ClassDescriptor initialDescriptor,ClassDetails classDetails,Map classDetailsMap,List unMappedAttributes,boolean weaveChangeTracking){
  if (unMappedAttributes.isEmpty()) {
    return;
  }
  MetadataClass superClz=clz.getSuperclass();
  if (superClz == null || superClz.isObject()) {
    return;
  }
  ClassDescriptor mappedSuperclassDescriptor=((AbstractSession)session).getMappedSuperclass(superClz.getName());
  if (mappedSuperclassDescriptor == null) {
    return;
  }
  boolean weaveValueHolders=canWeaveValueHolders(superClz,unMappedAttributes);
  List stillUnMappedMappings=null;
  ClassDetails superClassDetails=createClassDetails(superClz,weaveValueHolders,weaveChangeTracking,weaveFetchGroups,weaveInternal,weaveRest);
  superClassDetails.setIsMappedSuperClass(true);
  if (!mappedSuperclassDescriptor.usesPropertyAccessForWeaving()) {
    superClassDetails.useAttributeAccess();
  }
  if (!classDetailsMap.containsKey(superClassDetails.getClassName())) {
    stillUnMappedMappings=storeAttributeMappings(superClz,superClassDetails,unMappedAttributes,weaveValueHolders);
    classDetailsMap.put(superClassDetails.getClassName(),superClassDetails);
  }
  if (((stillUnMappedMappings != null) && (stillUnMappedMappings.size() > 0))) {
    addClassDetailsForMappedSuperClasses(superClz,initialDescriptor,classDetails,classDetailsMap,stillUnMappedMappings,weaveChangeTracking);
  }
}