Program: 29675
Project: 29675
Buggy source:
/** 
 * Find the specified class in our local repositories, if possible.  If not found, throw <code>ClassNotFoundException</code>.
 * @param name Name of the class to be loaded
 * @exception ClassNotFoundException if the class was not found
 */
@Override protected Class<?> findClass(String name) throws ClassNotFoundException {
  if (logger.isLoggable(Level.FINER))   logger.finer("String_Node_Str" + name + "String_Node_Str");
  if (securityManager != null && packageDefinitionEnabled) {
    int i=name.lastIndexOf('.');
    if (i >= 0) {
      try {
        if (logger.isLoggable(Level.FINER))         logger.finer("String_Node_Str");
        securityManager.checkPackageDefinition(name.substring(0,i));
      }
 catch (      Exception se) {
        if (logger.isLoggable(Level.FINER))         logger.log(Level.FINER,"String_Node_Str",se);
        throw new ClassNotFoundException(name,se);
      }
    }
  }
  Class<?> clazz=null;
  try {
    if (logger.isLoggable(Level.FINER))     logger.finer("String_Node_Str" + name + "String_Node_Str");
    try {
      ResourceEntry entry=findClassInternal(name);
      CodeSource codeSource=new CodeSource(entry.codeBase,entry.certificates);
synchronized (this) {
        if (entry.loadedClass == null) {
          byte[] binaryContent=entry.binaryContent;
          if (!byteCodePreprocessors.isEmpty()) {
            String resourceName=name.replace('.','/') + "String_Node_Str";
            for (            BytecodePreprocessor preprocessor : byteCodePreprocessors) {
              binaryContent=preprocessor.preprocess(resourceName,binaryContent);
            }
          }
          clazz=defineClass(name,binaryContent,0,binaryContent.length,codeSource);
          entry.loadedClass=clazz;
          entry.binaryContent=null;
          entry.source=null;
          entry.codeBase=null;
          entry.manifest=null;
          entry.certificates=null;
        }
 else {
          clazz=entry.loadedClass;
        }
      }
    }
 catch (    ClassNotFoundException cnfe) {
      if (!hasExternalRepositories) {
        throw cnfe;
      }
    }
catch (    UnsupportedClassVersionError ucve) {
      throw new UnsupportedClassVersionError(getString("String_Node_Str",name,getJavaVersion()));
    }
catch (    AccessControlException ace) {
      if (logger.isLoggable(Level.WARNING)) {
        logger.log(Level.WARNING,"String_Node_Str" + name + "String_Node_Str"+ ace.getMessage(),ace);
      }
      throw new ClassNotFoundException(name,ace);
    }
catch (    RuntimeException rex) {
      throw rex;
    }
catch (    Error err) {
      throw err;
    }
catch (    Throwable t) {
      throw new RuntimeException(getString("String_Node_Str",name,t.toString()),t);
    }
    if ((clazz == null) && hasExternalRepositories) {
      try {
        clazz=super.findClass(name);
      }
 catch (      AccessControlException ace) {
        if (logger.isLoggable(Level.WARNING)) {
          logger.log(Level.WARNING,"String_Node_Str" + name + "String_Node_Str"+ ace.getMessage(),ace);
        }
        throw new ClassNotFoundException(name,ace);
      }
catch (      RuntimeException e) {
        if (logger.isLoggable(Level.FINER))         logger.log(Level.FINER,"String_Node_Str",e);
        throw e;
      }
    }
    if (clazz == null) {
      if (logger.isLoggable(Level.FINER))       logger.finer("String_Node_Str");
      throw new ClassNotFoundException(name);
    }
  }
 catch (  ClassNotFoundException e) {
    if (logger.isLoggable(Level.FINER))     logger.finer("String_Node_Str");
    throw e;
  }
  if (logger.isLoggable(Level.FINER))   logger.finer("String_Node_Str" + clazz);
  if (logger.isLoggable(Level.FINER) && clazz != null) {
    ClassLoader cl;
    if (securityManager != null) {
      cl=AccessController.doPrivileged(new PrivilegedGetClassLoader(clazz));
    }
 else {
      cl=clazz.getClassLoader();
    }
    logger.finer("String_Node_Str" + cl);
  }
  return (clazz);
}

Fixed version (ground truth):
/** 
 * Find the specified class in our local repositories, if possible.  If not found, throw <code>ClassNotFoundException</code>.
 * @param name Name of the class to be loaded
 * @exception ClassNotFoundException if the class was not found
 */
@Override protected Class<?> findClass(String name) throws ClassNotFoundException {
  if (logger.isLoggable(Level.FINER))   logger.finer("String_Node_Str" + name + "String_Node_Str");
  if (securityManager != null && packageDefinitionEnabled) {
    int i=name.lastIndexOf('.');
    if (i >= 0) {
      try {
        if (logger.isLoggable(Level.FINER))         logger.finer("String_Node_Str");
        securityManager.checkPackageDefinition(name.substring(0,i));
      }
 catch (      Exception se) {
        if (logger.isLoggable(Level.FINER))         logger.log(Level.FINER,"String_Node_Str",se);
        throw new ClassNotFoundException(name,se);
      }
    }
  }
  Class<?> clazz=null;
  try {
    if (logger.isLoggable(Level.FINER))     logger.finer("String_Node_Str" + name + "String_Node_Str");
    try {
      ResourceEntry entry=findClassInternal(name);
      CodeSource codeSource=new CodeSource(entry.codeBase,entry.certificates);
synchronized (this) {
        if (entry.loadedClass == null) {
          byte[] binaryContent=entry.binaryContent;
          if (!byteCodePreprocessors.isEmpty()) {
            String resourceName=name.replace('.','/') + "String_Node_Str";
            for (            BytecodePreprocessor preprocessor : byteCodePreprocessors) {
              binaryContent=preprocessor.preprocess(resourceName,binaryContent);
            }
          }
          clazz=defineClass(name,binaryContent,0,binaryContent.length,codeSource);
          entry.loadedClass=clazz;
          entry.binaryContent=null;
          entry.source=null;
          entry.codeBase=null;
          entry.manifest=null;
          entry.certificates=null;
        }
 else {
          clazz=entry.loadedClass;
        }
      }
    }
 catch (    ClassNotFoundException cnfe) {
      if (!hasExternalRepositories) {
        throw cnfe;
      }
    }
catch (    UnsupportedClassVersionError ucve) {
      throw new UnsupportedClassVersionError(getString("String_Node_Str",name,getJavaVersion()));
    }
catch (    AccessControlException ace) {
      if (logger.isLoggable(Level.WARNING)) {
        logger.log(Level.WARNING,"String_Node_Str" + name + "String_Node_Str"+ ace.getMessage(),ace);
      }
      throw new ClassNotFoundException(name,ace);
    }
catch (    RuntimeException rex) {
      throw rex;
    }
catch (    Error err) {
      throw err;
    }
catch (    Throwable t) {
      throw new RuntimeException(getString("String_Node_Str",name,t.toString()),t);
    }
    if ((clazz == null) && hasExternalRepositories) {
      try {
        clazz=super.findClass(name);
      }
 catch (      AccessControlException ace) {
        if (logger.isLoggable(Level.WARNING)) {
          logger.log(Level.WARNING,"String_Node_Str" + name + "String_Node_Str"+ ace.getMessage(),ace);
        }
        throw new ClassNotFoundException(name,ace);
      }
catch (      RuntimeException e) {
        if (logger.isLoggable(Level.FINER))         logger.log(Level.FINER,"String_Node_Str",e);
        throw e;
      }
    }
    if (clazz == null) {
      if (logger.isLoggable(Level.FINER))       logger.finer("String_Node_Str");
      throw new ClassNotFoundException(name);
    }
  }
 catch (  ClassNotFoundException e) {
    if (logger.isLoggable(Level.FINER))     logger.finer("String_Node_Str");
    throw e;
  }
  if (logger.isLoggable(Level.FINER))   logger.finer("String_Node_Str" + clazz);
  if (logger.isLoggable(Level.FINER)) {
    ClassLoader cl;
    if (securityManager != null) {
      cl=AccessController.doPrivileged(new PrivilegedGetClassLoader(clazz));
    }
 else {
      cl=clazz.getClassLoader();
    }
    logger.finer("String_Node_Str" + cl);
  }
  return (clazz);
}