Program: 68478
Project: 68478
Buggy source:
/** 
 * INTERNAL: This method is invoked only for the abstract descriptors.
 */
public Class classFromRow(AbstractRecord rowFromDatabase,AbstractSession session) throws DescriptorException {
  ((XMLRecord)rowFromDatabase).setSession(session);
  if (hasClassExtractor() || shouldUseClassNameAsIndicator()) {
    return super.classFromRow(rowFromDatabase,session);
  }
  Object indicator=rowFromDatabase.get(getClassIndicatorField());
  if (indicator == AbstractRecord.noEntry) {
    return null;
  }
  Object classFieldValue=session.getDatasourcePlatform().getConversionManager().convertObject(indicator,getClassIndicatorField().getType());
  if (classFieldValue == null) {
    return null;
  }
  Class concreteClass;
  if (classFieldValue instanceof String) {
    String indicatorValue=(String)classFieldValue;
    int index=indicatorValue.indexOf("String_Node_Str");
    if (index == -1) {
      concreteClass=(Class)this.classIndicatorMapping.get(classFieldValue);
    }
 else {
      String prefix=indicatorValue.substring(0,index);
      String localPart=indicatorValue.substring(index + 1);
      String uri=((XMLRecord)rowFromDatabase).resolveNamespacePrefix(prefix);
      if (uri != null) {
        QName qname=new QName(uri,localPart);
        concreteClass=(Class)this.classIndicatorMapping.get(qname);
      }
 else {
        concreteClass=(Class)this.classIndicatorMapping.get(indicatorValue);
      }
    }
  }
 else {
    concreteClass=(Class)this.classIndicatorMapping.get(classFieldValue);
  }
  if (concreteClass == null) {
    throw DescriptorException.missingClassForIndicatorFieldValue(classFieldValue,getDescriptor());
  }
  return concreteClass;
}

Fixed version (ground truth):
/** 
 * INTERNAL: This method is invoked only for the abstract descriptors.
 */
public Class classFromRow(AbstractRecord rowFromDatabase,AbstractSession session) throws DescriptorException {
  ((XMLRecord)rowFromDatabase).setSession(session);
  if (hasClassExtractor() || shouldUseClassNameAsIndicator()) {
    return super.classFromRow(rowFromDatabase,session);
  }
  Object indicator=rowFromDatabase.get(getClassIndicatorField());
  if (indicator == AbstractRecord.noEntry) {
    return null;
  }
  Object classFieldValue=session.getDatasourcePlatform().getConversionManager().convertObject(indicator,getClassIndicatorField().getType());
  if (classFieldValue == null) {
    return null;
  }
  Class concreteClass;
  if (classFieldValue instanceof String) {
    String indicatorValue=(String)classFieldValue;
    int index=indicatorValue.indexOf("String_Node_Str");
    if (index == -1) {
      String uri=((XMLRecord)rowFromDatabase).resolveNamespacePrefix(null);
      if (uri == null) {
        concreteClass=(Class)this.classIndicatorMapping.get(classFieldValue);
      }
 else {
        QName qname=new QName(uri,indicatorValue);
        concreteClass=(Class)this.classIndicatorMapping.get(qname);
      }
    }
 else {
      String prefix=indicatorValue.substring(0,index);
      String localPart=indicatorValue.substring(index + 1);
      String uri=((XMLRecord)rowFromDatabase).resolveNamespacePrefix(prefix);
      if (uri != null) {
        QName qname=new QName(uri,localPart);
        concreteClass=(Class)this.classIndicatorMapping.get(qname);
      }
 else {
        concreteClass=(Class)this.classIndicatorMapping.get(indicatorValue);
      }
    }
  }
 else {
    concreteClass=(Class)this.classIndicatorMapping.get(classFieldValue);
  }
  if (concreteClass == null) {
    throw DescriptorException.missingClassForIndicatorFieldValue(classFieldValue,getDescriptor());
  }
  return concreteClass;
}