Program: 74862
Project: 74862
Buggy source:
/** 
 * Load a class defined in a file, and return the   {@link Class} object ofthe class.
 * @param classFile The file that defines the class.
 * @return The object of the loaded class.
 * @exception FileNotFoundException If the file cannot be found.
 * @exception IOException If error occurs when trying to read the file.
 * @exception LinkageError If {@link URLClassLoader#defineClass(java.lang.String,sun.misc.Resource)}issues a   {@link LinkageError} and fails to define the class.
 * @exception ClassNotFoundException If some classes referenced by theclass in the file cannot be found.
 */
public Class loadClass(File classFile) throws FileNotFoundException, IOException, LinkageError, ClassNotFoundException {
  FileInputStream inputStream=new FileInputStream(classFile);
  byte[] buffer=new byte[inputStream.available()];
  inputStream.read(buffer);
  try {
    return defineClass(null,buffer,0,buffer.length);
  }
 catch (  IllegalAccessError e) {
    String errorPrefix="String_Node_Str";
    String message=e.getMessage();
    if (message.startsWith(errorPrefix)) {
      String className=message.substring(errorPrefix.length());
      int pos;
      if ((pos=className.indexOf(' ')) >= 0) {
        className=className.substring(0,pos);
      }
      return loadClass(className);
    }
 else {
      throw e;
    }
  }
catch (  LinkageError e) {
    String errorPrefix="String_Node_Str";
    String message=e.getMessage();
    if (message.startsWith(errorPrefix)) {
      String path=message.substring(errorPrefix.length());
      String classFullName=path.replace('/','.');
      return loadClass(classFullName);
    }
 else {
      throw e;
    }
  }
}

Fixed version (ground truth):
/** 
 * Load a class defined in a file, and return the   {@link Class} object ofthe class.
 * @param classFile The file that defines the class.
 * @return The object of the loaded class.
 * @exception FileNotFoundException If the file cannot be found.
 * @exception IOException If error occurs when trying to read the file.
 * @exception LinkageError If {@link URLClassLoader#defineClass(java.lang.String,sun.misc.Resource)}issues a   {@link LinkageError} and fails to define the class.
 * @exception ClassNotFoundException If some classes referenced by theclass in the file cannot be found.
 */
public Class loadClass(File classFile) throws FileNotFoundException, IOException, LinkageError, ClassNotFoundException {
  FileInputStream inputStream=new FileInputStream(classFile);
  byte[] buffer=new byte[inputStream.available()];
  inputStream.read(buffer);
  try {
    return defineClass(null,buffer,0,buffer.length);
  }
 catch (  IllegalAccessError e) {
    String errorPrefix="String_Node_Str";
    String message=e.getMessage();
    if (message.startsWith(errorPrefix)) {
      String className=message.substring(errorPrefix.length());
      int pos;
      if ((pos=className.indexOf(' ')) >= 0) {
        className=className.substring(0,pos);
      }
      return loadClass(className);
    }
 else {
      throw e;
    }
  }
catch (  LinkageError e) {
    String message=e.getMessage();
    int slashIndex=message.indexOf('/');
    if (slashIndex < 0) {
      throw e;
    }
 else {
      int startIndex=message.lastIndexOf(' ',slashIndex);
      if (startIndex < 0) {
        throw e;
      }
 else {
        int endIndex=message.indexOf(' ',slashIndex);
        if (endIndex < 0) {
          endIndex=message.length();
        }
        String path=message.substring(startIndex + 1,endIndex);
        String classFullName=path.replace('/','.');
        return loadClass(classFullName);
      }
    }
  }
}