Program: 29919
Project: 29919
Buggy source:
/** 
 * Start this component, initializing our associated class loader.
 * @exception LifecycleException if a lifecycle error occurs
 */
public void start() throws LifecycleException {
  if (!initialized)   init();
  if (started)   throw new LifecycleException(sm.getString("String_Node_Str"));
  if (log.isLoggable(Level.FINEST))   log.finest(sm.getString("String_Node_Str"));
  lifecycle.fireLifecycleEvent(START_EVENT,null);
  started=true;
  if (container.getResources() == null) {
    if (log.isLoggable(Level.INFO)) {
      log.info("String_Node_Str" + container);
    }
    return;
  }
  URLStreamHandlerFactory streamHandlerFactory=new DirContextURLStreamHandlerFactory();
synchronized (WebappLoader.class) {
    if (first) {
      first=false;
      try {
        URL.setURLStreamHandlerFactory(streamHandlerFactory);
      }
 catch (      Exception e) {
        log.log(Level.SEVERE,"String_Node_Str",e);
      }
catch (      Throwable t) {
        if (log.isLoggable(Level.FINE)) {
          log.fine("String_Node_Str" + t.getMessage());
        }
      }
    }
  }
  try {
    ClassLoader cl=createClassLoader();
    if (cl instanceof WebappClassLoader) {
      classLoader=(WebappClassLoader)cl;
    }
 else {
      classLoader=new WebappClassLoader(cl);
    }
    classLoader.setResources(container.getResources());
    classLoader.setDebug(this.debug);
    classLoader.setDelegate(this.delegate);
    for (int i=0; i < repositories.length; i++) {
      classLoader.addRepository(repositories[i]);
    }
    if (overridablePackages != null) {
      for (int i=0; i < overridablePackages.size(); i++) {
        classLoader.addOverridablePackage(overridablePackages.get(i));
      }
      overridablePackages=null;
    }
    setRepositories();
    setClassPath();
    setPermissions();
    DirContextURLStreamHandler.bind(classLoader,this.container.getResources());
  }
 catch (  Throwable t) {
    log.log(Level.SEVERE,"String_Node_Str",t);
    throw new LifecycleException("String_Node_Str",t);
  }
}

Fixed version (ground truth):
/** 
 * Start this component, initializing our associated class loader.
 * @exception LifecycleException if a lifecycle error occurs
 */
public void start() throws LifecycleException {
  if (!initialized)   init();
  if (started)   throw new LifecycleException(sm.getString("String_Node_Str"));
  if (log.isLoggable(Level.FINEST))   log.finest(sm.getString("String_Node_Str"));
  lifecycle.fireLifecycleEvent(START_EVENT,null);
  started=true;
  if (container.getResources() == null) {
    if (log.isLoggable(Level.INFO)) {
      log.info("String_Node_Str" + container);
    }
    return;
  }
  initStreamHandlerFactory();
  try {
    ClassLoader cl=createClassLoader();
    if (cl instanceof WebappClassLoader) {
      classLoader=(WebappClassLoader)cl;
    }
 else {
      classLoader=new WebappClassLoader(cl);
    }
    classLoader.setResources(container.getResources());
    classLoader.setDebug(this.debug);
    classLoader.setDelegate(this.delegate);
    for (int i=0; i < repositories.length; i++) {
      classLoader.addRepository(repositories[i]);
    }
    if (overridablePackages != null) {
      for (int i=0; i < overridablePackages.size(); i++) {
        classLoader.addOverridablePackage(overridablePackages.get(i));
      }
      overridablePackages=null;
    }
    setRepositories();
    setClassPath();
    setPermissions();
    DirContextURLStreamHandler.bind(classLoader,this.container.getResources());
  }
 catch (  Throwable t) {
    log.log(Level.SEVERE,"String_Node_Str",t);
    throw new LifecycleException("String_Node_Str",t);
  }
}