Program: 67788
Project: 67788
Buggy source:
/** 
 * INTERNAL: For this Type generate classes
 * @param packageName
 * @param nr
 */
public void preInitialize(String packageName,List namespaceResolvers){
  String instanceClassName=getInstanceClassName();
  if (null == instanceClassName) {
    if (null == packageName) {
      String uri=getURI();
      if (null == uri) {
        packageName=SDOUtil.getDefaultPackageName() + SDOConstants.JAVA_PACKAGE_NAME_SEPARATOR;
      }
 else {
        packageName=SDOUtil.getPackageNameFromURI(uri) + SDOConstants.JAVA_PACKAGE_NAME_SEPARATOR;
      }
    }
    String mangledClassName=SDOUtil.className(getName(),true);
    StringBuffer fullClassName=new StringBuffer(packageName);
    fullClassName.append(mangledClassName);
    setInstanceClassName(fullClassName.toString());
  }
  AbstractSessionLog.getLog().log(AbstractSessionLog.FINER,"String_Node_Str",new Object[]{Helper.getShortClassName(getClass()),getInstanceClassName()});
  initializeNamespaces(namespaceResolvers);
  getXmlDescriptor().setJavaClassName(getImplClassName());
  getInstanceClass();
  String schemaContext=getName();
  if (getXmlDescriptor().getNamespaceResolver() != null) {
    String prefix=getXmlDescriptor().getNamespaceResolver().resolveNamespaceURI(getURI());
    if ((prefix != null) && !prefix.equals(SDOConstants.EMPTY_STRING)) {
      schemaContext=prefix + SDOConstants.SDO_XPATH_NS_SEPARATOR_FRAGMENT + schemaContext;
    }
  }
  String schemaContextWithSlash=SDOConstants.SDO_XPATH_SEPARATOR_FRAGMENT + schemaContext;
  XMLSchemaReference schemaRef=new XMLSchemaClassPathReference();
  schemaRef.setSchemaContext(schemaContextWithSlash);
  schemaRef.setType(XMLSchemaReference.COMPLEX_TYPE);
  getXmlDescriptor().setSchemaReference(schemaRef);
}

Fixed version (ground truth):
/** 
 * INTERNAL: For this Type generate classes
 * @param packageName
 * @param nr
 */
public void preInitialize(String packageName,List namespaceResolvers){
  String instanceClassName=getInstanceClassName();
  if (null == instanceClassName) {
    if (null == packageName) {
      String uri=getURI();
      if (null == uri) {
        packageName=SDOUtil.getDefaultPackageName() + SDOConstants.JAVA_PACKAGE_NAME_SEPARATOR;
      }
 else {
        packageName=SDOUtil.getPackageNameFromURI(uri) + SDOConstants.JAVA_PACKAGE_NAME_SEPARATOR;
      }
    }
    String mangledClassName=SDOUtil.className(getName(),true);
    StringBuffer fullClassName=new StringBuffer(packageName);
    fullClassName.append(mangledClassName);
    setInstanceClassName(fullClassName.toString());
  }
  AbstractSessionLog.getLog().log(AbstractSessionLog.FINER,"String_Node_Str",new Object[]{Helper.getShortClassName(getClass()),getInstanceClassName()});
  initializeNamespaces(namespaceResolvers);
  getXmlDescriptor().setJavaClassName(getImplClassName());
  getInstanceClass();
  getImplClass();
  String schemaContext=getName();
  if (getXmlDescriptor().getNamespaceResolver() != null) {
    String prefix=getXmlDescriptor().getNamespaceResolver().resolveNamespaceURI(getURI());
    if ((prefix != null) && !prefix.equals(SDOConstants.EMPTY_STRING)) {
      schemaContext=prefix + SDOConstants.SDO_XPATH_NS_SEPARATOR_FRAGMENT + schemaContext;
    }
  }
  String schemaContextWithSlash=SDOConstants.SDO_XPATH_SEPARATOR_FRAGMENT + schemaContext;
  XMLSchemaReference schemaRef=new XMLSchemaClassPathReference();
  schemaRef.setSchemaContext(schemaContextWithSlash);
  schemaRef.setType(XMLSchemaReference.COMPLEX_TYPE);
  getXmlDescriptor().setSchemaReference(schemaRef);
}