Program: 51774
Project: 51774
Buggy source:
@Override public Class<?> findClass(String name) throws ClassNotFoundException {
  if (invalidClasses.contains(name)) {
    throw new ClassNotFoundException(name);
  }
  for (  String st : classLoaderExceptions) {
    if (name.startsWith(st)) {
      return parent.loadClass(name);
    }
  }
  if (cachedClasses.containsKey(name)) {
    return cachedClasses.get(name);
  }
  for (  String st : transformerExceptions) {
    if (name.startsWith(st)) {
      try {
        Class<?> cl=super.findClass(name);
        cachedClasses.put(name,cl);
        return cl;
      }
 catch (      ClassNotFoundException e) {
        invalidClasses.add(name);
        throw e;
      }
    }
  }
  try {
    CodeSigner[] signers=null;
    String transformedName=transformName(name);
    String untransformedName=untransformName(name);
    int lastDot=untransformedName.lastIndexOf('.');
    String pkgname=lastDot == -1 ? "String_Node_Str" : untransformedName.substring(0,lastDot);
    String fName=untransformedName.replace('.','/').concat("String_Node_Str");
    String pkgPath=pkgname.replace('.','/');
    URLConnection urlConnection=findCodeSourceConnectionFor(fName);
    if (urlConnection instanceof JarURLConnection && lastDot > -1 && !untransformedName.startsWith("String_Node_Str")) {
      JarURLConnection jarUrlConn=(JarURLConnection)urlConnection;
      JarFile jf=jarUrlConn.getJarFile();
      if (jf != null && jf.getManifest() != null) {
        Manifest mf=jf.getManifest();
        JarEntry ent=jf.getJarEntry(fName);
        Package pkg=getPackage(pkgname);
        getClassBytes(untransformedName);
        signers=ent.getCodeSigners();
        if (pkg == null) {
          pkg=definePackage(pkgname,mf,jarUrlConn.getJarFileURL());
          packageManifests.put(pkg,mf);
        }
 else {
          if (pkg.isSealed() && !pkg.isSealed(jarUrlConn.getJarFileURL())) {
            FMLLog.severe("String_Node_Str",jf.getName(),pkgname);
          }
 else           if (isSealed(pkgname,mf)) {
            FMLLog.severe("String_Node_Str",jf.getName(),pkgname);
          }
        }
      }
    }
 else     if (lastDot > -1 && !untransformedName.startsWith("String_Node_Str")) {
      Package pkg=getPackage(pkgname);
      if (pkg == null) {
        pkg=definePackage(pkgname,null,null,null,null,null,null,null);
        packageManifests.put(pkg,EMPTY);
      }
 else       if (pkg.isSealed()) {
        FMLLog.severe("String_Node_Str",urlConnection.getURL(),pkgname);
      }
    }
    byte[] basicClass=getClassBytes(untransformedName);
    byte[] transformedClass=runTransformers(untransformedName,transformedName,basicClass);
    Class<?> cl=defineClass(transformedName,transformedClass,0,transformedClass.length,new CodeSource(urlConnection.getURL(),signers));
    cachedClasses.put(transformedName,cl);
    return cl;
  }
 catch (  Throwable e) {
    invalidClasses.add(name);
    if (DEBUG_CLASSLOADING) {
      FMLLog.log(Level.FINEST,e,"String_Node_Str",name);
    }
    throw new ClassNotFoundException(name,e);
  }
}

Fixed version (ground truth):
@Override public Class<?> findClass(String name) throws ClassNotFoundException {
  if (invalidClasses.contains(name)) {
    throw new ClassNotFoundException(name);
  }
  for (  String st : classLoaderExceptions) {
    if (name.startsWith(st)) {
      return parent.loadClass(name);
    }
  }
  if (cachedClasses.containsKey(name)) {
    return cachedClasses.get(name);
  }
  for (  String st : transformerExceptions) {
    if (name.startsWith(st)) {
      try {
        Class<?> cl=super.findClass(name);
        cachedClasses.put(name,cl);
        return cl;
      }
 catch (      ClassNotFoundException e) {
        invalidClasses.add(name);
        throw e;
      }
    }
  }
  try {
    CodeSigner[] signers=null;
    String transformedName=transformName(name);
    String untransformedName=untransformName(name);
    int lastDot=untransformedName.lastIndexOf('.');
    String pkgname=lastDot == -1 ? "String_Node_Str" : untransformedName.substring(0,lastDot);
    String fName=untransformedName.replace('.','/').concat("String_Node_Str");
    String pkgPath=pkgname.replace('.','/');
    URLConnection urlConnection=findCodeSourceConnectionFor(fName);
    if (urlConnection instanceof JarURLConnection && lastDot > -1 && !untransformedName.startsWith("String_Node_Str")) {
      JarURLConnection jarUrlConn=(JarURLConnection)urlConnection;
      JarFile jf=jarUrlConn.getJarFile();
      if (jf != null && jf.getManifest() != null) {
        Manifest mf=jf.getManifest();
        JarEntry ent=jf.getJarEntry(fName);
        Package pkg=getPackage(pkgname);
        getClassBytes(untransformedName);
        signers=ent.getCodeSigners();
        if (pkg == null) {
          pkg=definePackage(pkgname,mf,jarUrlConn.getJarFileURL());
          packageManifests.put(pkg,mf);
        }
 else {
          if (pkg.isSealed() && !pkg.isSealed(jarUrlConn.getJarFileURL())) {
            FMLLog.severe("String_Node_Str",jf.getName(),pkgname);
          }
 else           if (isSealed(pkgname,mf)) {
            FMLLog.severe("String_Node_Str",jf.getName(),pkgname);
          }
        }
      }
    }
 else     if (lastDot > -1 && !untransformedName.startsWith("String_Node_Str")) {
      Package pkg=getPackage(pkgname);
      if (pkg == null) {
        pkg=definePackage(pkgname,null,null,null,null,null,null,null);
        packageManifests.put(pkg,EMPTY);
      }
 else       if (pkg.isSealed()) {
        FMLLog.severe("String_Node_Str",urlConnection.getURL(),pkgname);
      }
    }
    byte[] basicClass=getClassBytes(untransformedName);
    byte[] transformedClass=runTransformers(untransformedName,transformedName,basicClass);
    Class<?> cl=defineClass(transformedName,transformedClass,0,transformedClass.length,(urlConnection == null ? null : new CodeSource(urlConnection.getURL(),signers)));
    cachedClasses.put(transformedName,cl);
    return cl;
  }
 catch (  Throwable e) {
    invalidClasses.add(name);
    if (DEBUG_CLASSLOADING) {
      FMLLog.log(Level.FINEST,e,"String_Node_Str",name);
    }
    throw new ClassNotFoundException(name,e);
  }
}