Program: 109744
Project: 109744
Buggy source:
@Override public Class<?> findClass(final String name) throws ClassNotFoundException {
  if (invalidClasses.contains(name)) {
    throw new ClassNotFoundException(name);
  }
  for (  final String exception : classLoaderExceptions) {
    if (name.startsWith(exception)) {
      return parent.loadClass(name);
    }
  }
  if (cachedClasses.containsKey(name)) {
    return cachedClasses.get(name);
  }
  for (  final String exception : transformerExceptions) {
    if (name.startsWith(exception)) {
      try {
        final Class<?> clazz=super.findClass(name);
        cachedClasses.put(name,clazz);
        return clazz;
      }
 catch (      ClassNotFoundException e) {
        invalidClasses.add(name);
        throw e;
      }
    }
  }
  try {
    final String transformedName=transformName(name);
    final String untransformedName=untransformName(name);
    final int lastDot=untransformedName.lastIndexOf('.');
    final String packageName=lastDot == -1 ? "String_Node_Str" : untransformedName.substring(0,lastDot);
    final String fileName=untransformedName.replace('.','/').concat("String_Node_Str");
    URLConnection urlConnection=findCodeSourceConnectionFor(fileName);
    CodeSigner[] signers=null;
    if (lastDot > -1 && !untransformedName.startsWith("String_Node_Str")) {
      if (urlConnection instanceof JarURLConnection) {
        final JarURLConnection jarURLConnection=(JarURLConnection)urlConnection;
        final JarFile jarFile=jarURLConnection.getJarFile();
        if (jarFile != null && jarFile.getManifest() != null) {
          final Manifest manifest=jarFile.getManifest();
          final JarEntry entry=jarFile.getJarEntry(fileName);
          Package pkg=getPackage(packageName);
          getClassBytes(untransformedName);
          signers=entry.getCodeSigners();
          if (pkg == null) {
            pkg=definePackage(packageName,manifest,jarURLConnection.getJarFileURL());
            packageManifests.put(pkg,manifest);
          }
 else {
            if (pkg.isSealed() && !pkg.isSealed(jarURLConnection.getJarFileURL())) {
              LogWrapper.severe("String_Node_Str",jarFile.getName(),packageName);
            }
 else             if (isSealed(packageName,manifest)) {
              LogWrapper.severe("String_Node_Str",jarFile.getName(),packageName);
            }
          }
        }
      }
 else {
        Package pkg=getPackage(packageName);
        if (pkg == null) {
          pkg=definePackage(packageName,null,null,null,null,null,null,null);
          packageManifests.put(pkg,EMPTY);
        }
 else         if (pkg.isSealed()) {
          LogWrapper.severe("String_Node_Str",urlConnection.getURL(),packageName);
        }
      }
    }
    final byte[] transformedClass=runTransformers(untransformedName,transformedName,getClassBytes(untransformedName));
    if (DEBUG_SAVE) {
      saveTransformedClass(transformedClass,transformedName);
    }
    final CodeSource codeSource=urlConnection == null ? null : new CodeSource(urlConnection.getURL(),signers);
    final Class<?> clazz=defineClass(transformedName,transformedClass,0,transformedClass.length,codeSource);
    cachedClasses.put(transformedName,clazz);
    return clazz;
  }
 catch (  Throwable e) {
    invalidClasses.add(name);
    if (DEBUG) {
      LogWrapper.log(Level.FINEST,e,"String_Node_Str",name);
    }
    throw new ClassNotFoundException(name,e);
  }
}

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