Program: 68818
Project: 68818
Buggy source:
private void setupInheritance(SDOType parentType){
  if ((parentType.getURI() != null) && (!parentType.getURI().equals(SDOConstants.SDO_URL))) {
    XMLField field=new XMLField("String_Node_Str");
    XMLDescriptor parentDescriptor=(XMLDescriptor)parentType.getXmlDescriptor().getInheritancePolicy().getRootParentDescriptor();
    parentDescriptor.getInheritancePolicy().setClassIndicatorField(field);
    if (getInstanceClassName() != null) {
      String indicator=getName();
      String prefix=parentDescriptor.getNamespaceResolver().resolveNamespaceURI(getURI());
      if (prefix == null) {
        prefix=getXmlDescriptor().getNamespaceResolver().resolveNamespaceURI(getURI());
        if (prefix != null) {
          parentDescriptor.getNamespaceResolver().put(prefix,getURI());
        }
      }
      if (prefix != null) {
        indicator=prefix + SDOConstants.SDO_XPATH_NS_SEPARATOR_FRAGMENT + indicator;
      }
      Class implClass=getImplClass();
      parentDescriptor.getInheritancePolicy().addClassIndicator(implClass,indicator);
      parentDescriptor.getInheritancePolicy().setShouldReadSubclasses(true);
      String parentIndicator=parentType.getName();
      String parentPrefix=parentDescriptor.getNamespaceResolver().resolveNamespaceURI(parentType.getURI());
      if (parentPrefix != null) {
        parentIndicator=parentPrefix + SDOConstants.SDO_XPATH_NS_SEPARATOR_FRAGMENT + parentIndicator;
      }
      Class parentImplClass=parentType.getImplClass();
      parentDescriptor.getInheritancePolicy().addClassIndicator(parentImplClass,parentIndicator);
      Class parentClass=parentType.getImplClass();
      getXmlDescriptor().getInheritancePolicy().setParentClass(parentClass);
      getXmlDescriptor().getInheritancePolicy().setParentDescriptor(parentType.getXmlDescriptor());
      parentType.getXmlDescriptor().getNamespaceResolver().put(XMLConstants.SCHEMA_INSTANCE_PREFIX,XMLConstants.SCHEMA_INSTANCE_URL);
      getXmlDescriptor().getNamespaceResolver().put(XMLConstants.SCHEMA_INSTANCE_PREFIX,XMLConstants.SCHEMA_INSTANCE_URL);
    }
  }
}

Fixed version (ground truth):
private void setupInheritance(SDOType parentType){
  if ((parentType.getURI() != null) && (!parentType.getURI().equals(SDOConstants.SDO_URL))) {
    XMLField field=(XMLField)getXmlDescriptor().buildField("String_Node_Str");
    XMLDescriptor parentDescriptor=(XMLDescriptor)parentType.getXmlDescriptor().getInheritancePolicy().getRootParentDescriptor();
    parentDescriptor.getInheritancePolicy().setClassIndicatorField(field);
    if (getInstanceClassName() != null) {
      String indicator=getName();
      String prefix=parentDescriptor.getNamespaceResolver().resolveNamespaceURI(getURI());
      if (prefix == null) {
        prefix=getXmlDescriptor().getNamespaceResolver().resolveNamespaceURI(getURI());
        if (prefix != null) {
          parentDescriptor.getNamespaceResolver().put(prefix,getURI());
        }
      }
      if (prefix != null) {
        indicator=prefix + SDOConstants.SDO_XPATH_NS_SEPARATOR_FRAGMENT + indicator;
      }
      Class implClass=getImplClass();
      parentDescriptor.getInheritancePolicy().addClassIndicator(implClass,indicator);
      parentDescriptor.getInheritancePolicy().setShouldReadSubclasses(true);
      String parentIndicator=parentType.getName();
      String parentPrefix=parentDescriptor.getNamespaceResolver().resolveNamespaceURI(parentType.getURI());
      if (parentPrefix != null) {
        parentIndicator=parentPrefix + SDOConstants.SDO_XPATH_NS_SEPARATOR_FRAGMENT + parentIndicator;
      }
      Class parentImplClass=parentType.getImplClass();
      parentDescriptor.getInheritancePolicy().addClassIndicator(parentImplClass,parentIndicator);
      Class parentClass=parentType.getImplClass();
      getXmlDescriptor().getInheritancePolicy().setParentClass(parentClass);
      getXmlDescriptor().getInheritancePolicy().setParentDescriptor(parentType.getXmlDescriptor());
      parentType.getXmlDescriptor().getNamespaceResolver().put(XMLConstants.SCHEMA_INSTANCE_PREFIX,XMLConstants.SCHEMA_INSTANCE_URL);
      getXmlDescriptor().getNamespaceResolver().put(XMLConstants.SCHEMA_INSTANCE_PREFIX,XMLConstants.SCHEMA_INSTANCE_URL);
    }
  }
}