Program: 29754
Project: 29754
Buggy source:
private Wrapper preInvoke(Request request,Response response){
  HttpRequest hreq=(HttpRequest)request;
  if (request.getCheckRestrictedResources()) {
    DataChunk requestPathDC=hreq.getRequestPathMB();
    if ((requestPathDC.startsWithIgnoreCase("String_Node_Str",0)) || (requestPathDC.equalsIgnoreCase("String_Node_Str")) || (requestPathDC.startsWithIgnoreCase("String_Node_Str",0))|| (requestPathDC.equalsIgnoreCase("String_Node_Str"))) {
      notFound((HttpServletResponse)response.getResponse());
      return null;
    }
  }
  boolean reloaded=false;
  while (((StandardContext)container).getPaused()) {
    reloaded=true;
    try {
      Thread.sleep(1000);
    }
 catch (    InterruptedException e) {
    }
  }
  if (reloaded && context.getLoader() != null && context.getLoader().getClassLoader() != null) {
    Thread.currentThread().setContextClassLoader(context.getLoader().getClassLoader());
  }
  Wrapper wrapper=request.getWrapper();
  if (wrapper == null) {
    notFound((HttpServletResponse)response.getResponse());
    return null;
  }
 else   if (wrapper.isUnavailable()) {
    wrapper=(Wrapper)container.findChild(wrapper.getName());
    if (wrapper == null) {
      notFound((HttpServletResponse)response.getResponse());
      return null;
    }
  }
  return wrapper;
}

Fixed version (ground truth):
/** 
 * Log a message on the Logger associated with our Container (if any)
 * @param message Message to be loggedprivate void log(String message) { org.apache.catalina.Logger logger = null; String containerName = null; if (container != null) { logger = container.getLogger(); containerName = container.getName(); } if (logger != null) { logger.log("StandardContextValve[" + container.getName() + "]: " + message); } else { if (log.isLoggable(Level.INFO)) { log.info("StandardContextValve[" + containerName + "]: " + message); } } } / Log a message on the Logger associated with our Container (if any)
 * @param message Message to be logged
 * @param t Associated exceptionprivate void log(String message, Throwable t) { org.apache.catalina.Logger logger = null; String containerName = null; if (container != null) { logger = container.getLogger(); containerName = container.getName(); } if (logger != null) { logger.log("StandardContextValve[" + container.getName() + "]: " + message, t, org.apache.catalina.Logger.WARNING); } else { log.log(Level.WARNING, "StandardContextValve[" + containerName + "]: " + message, t); } }
 */
private Wrapper preInvoke(Request request,Response response){
  HttpRequest hreq=(HttpRequest)request;
  if (request.getCheckRestrictedResources()) {
    DataChunk requestPathDC=hreq.getRequestPathMB();
    if ((requestPathDC.startsWithIgnoreCase("String_Node_Str",0)) || (requestPathDC.equalsIgnoreCase("String_Node_Str")) || (requestPathDC.startsWithIgnoreCase("String_Node_Str",0))|| (requestPathDC.equalsIgnoreCase("String_Node_Str"))) {
      notFound((HttpServletResponse)response.getResponse());
      return null;
    }
  }
  boolean reloaded=false;
  while (((StandardContext)container).getPaused()) {
    reloaded=true;
    try {
      Thread.sleep(1000);
    }
 catch (    InterruptedException e) {
    }
  }
  if (reloaded && context.getLoader() != null && context.getLoader().getClassLoader() != null) {
    Thread.currentThread().setContextClassLoader(context.getLoader().getClassLoader());
  }
  Wrapper wrapper=request.getWrapper();
  if (wrapper == null) {
    notFound((HttpServletResponse)response.getResponse());
    return null;
  }
 else   if (wrapper.isUnavailable()) {
    wrapper=(Wrapper)container.findChild(wrapper.getName());
    if (wrapper == null) {
      notFound((HttpServletResponse)response.getResponse());
      return null;
    }
  }
  return wrapper;
}