Program: 21638
Project: 21638
Buggy source:
public static void registerTypes(List importedOTObjectClasses,TypeService typeService,XMLDatabase xmlDB,boolean addShortcuts) throws Exception {
  ClassLoader classloader=ReflectionTypeDefinitions.class.getClassLoader();
  Vector typeClasses=new Vector();
  for (int i=0; i < importedOTObjectClasses.size(); i++) {
    String className=(String)importedOTObjectClasses.get(i);
    try {
      Class typeClass=classloader.loadClass(className);
      typeClasses.add(typeClass);
    }
 catch (    Exception e) {
      System.err.println("String_Node_Str" + className);
      System.err.println("String_Node_Str");
    }
  }
  ReflectiveOTClassFactory.singleton.loadClasses(typeClasses);
  OTClass baseObjectClass=OTrunkImpl.getOTClass("String_Node_Str");
  typeService.registerUserType(baseObjectClass,typeService.getElementHandler("String_Node_Str"));
  for (int i=0; i < typeClasses.size(); i++) {
    Class otObjectClass=(Class)typeClasses.get(i);
    String className=otObjectClass.getName();
    OTClassImpl otClass=(OTClassImpl)OTrunkImpl.getOTClass(className);
    Class resourceSchemaClass=otClass.getInstanceClass();
    Class constructorSchemaClass=otClass.getConstructorSchemaClass();
    if (constructorSchemaClass != null) {
      resourceSchemaClass=constructorSchemaClass;
    }
    if (resourceSchemaClass == null) {
      throw new RuntimeException("String_Node_Str" + className);
    }
    ObjectTypeHandler objectType=new ObjectTypeHandler(otClass,className,className,null,typeService,xmlDB);
    typeService.registerUserType(className,objectType);
    typeService.registerUserType(otClass,objectType);
    if (addShortcuts) {
      int lastDot=className.lastIndexOf("String_Node_Str");
      String localClassName=className.substring(lastDot + 1,className.length());
      typeService.registerUserType(localClassName,objectType);
      typeService.registerShortcutName(localClassName,otClass);
    }
  }
}

Fixed version (ground truth):
public static void registerTypes(List importedOTObjectClasses,TypeService typeService,XMLDatabase xmlDB,boolean addShortcuts) throws Exception {
  ClassLoader classloader=ReflectionTypeDefinitions.class.getClassLoader();
  Vector typeClasses=new Vector();
  for (int i=0; i < importedOTObjectClasses.size(); i++) {
    String className=(String)importedOTObjectClasses.get(i);
    try {
      Class typeClass=classloader.loadClass(className);
      typeClasses.add(typeClass);
    }
 catch (    Exception e) {
      System.err.println("String_Node_Str" + className);
      System.err.println("String_Node_Str");
    }
  }
  ReflectiveOTClassFactory.singleton.loadClasses(typeClasses);
  OTClass baseObjectClass=OTrunkImpl.getOTClass("String_Node_Str");
  typeService.registerUserType(baseObjectClass,typeService.getElementHandler("String_Node_Str"));
  for (int i=0; i < typeClasses.size(); i++) {
    Class otObjectClass=(Class)typeClasses.get(i);
    String className=otObjectClass.getName();
    OTClassImpl otClass=(OTClassImpl)OTrunkImpl.getOTClass(className);
    if (otClass == null) {
      System.err.println("String_Node_Str" + className);
      continue;
    }
    Class resourceSchemaClass=otClass.getInstanceClass();
    Class constructorSchemaClass=otClass.getConstructorSchemaClass();
    if (constructorSchemaClass != null) {
      resourceSchemaClass=constructorSchemaClass;
    }
    if (resourceSchemaClass == null) {
      throw new RuntimeException("String_Node_Str" + className);
    }
    ObjectTypeHandler objectType=new ObjectTypeHandler(otClass,className,className,null,typeService,xmlDB);
    typeService.registerUserType(className,objectType);
    typeService.registerUserType(otClass,objectType);
    if (addShortcuts) {
      int lastDot=className.lastIndexOf("String_Node_Str");
      String localClassName=className.substring(lastDot + 1,className.length());
      typeService.registerUserType(localClassName,objectType);
      typeService.registerShortcutName(localClassName,otClass);
    }
  }
}