Program: 29312
Project: 29312
Buggy source:
/** 
 * Handle the HTTP status code (and corresponding message) generated while processing the specified Request to produce the specified Response.  Any exceptions that occur during generation of the error report are logged and swallowed.
 * @param request The request being processed
 * @param response The response being generated
 */
protected void status(Request request,Response response){
  Context context=request.getContext();
  if (context == null)   return;
  if (!response.isError()) {
    return;
  }
  int statusCode=((HttpResponse)response).getStatus();
  ErrorPage errorPage=context.findErrorPage(statusCode);
  if (errorPage != null) {
    setErrorPageContentType(response,errorPage.getLocation(),context);
    dispatchToErrorPage(request,response,errorPage,null,null,statusCode);
  }
 else   if (statusCode >= 400 && statusCode < 600 && context.getDefaultErrorPage() != null) {
    dispatchToErrorPage(request,response,context.getDefaultErrorPage(),null,null,statusCode);
  }
 else {
    errorPage=((StandardHost)getContainer()).findErrorPage(statusCode);
    if (errorPage != null) {
      try {
        setErrorPageContentType(response,errorPage.getLocation(),context);
        handleHostErrorPage(response,errorPage,statusCode);
      }
 catch (      Exception e) {
        log("String_Node_Str" + errorPage,e);
      }
    }
  }
}

Fixed version (ground truth):
/** 
 * Handle the HTTP status code (and corresponding message) generated while processing the specified Request to produce the specified Response.  Any exceptions that occur during generation of the error report are logged and swallowed.
 * @param request The request being processed
 * @param response The response being generated
 */
protected void status(Request request,Response response){
  Context context=request.getContext();
  if (context == null)   return;
  if (!response.isError()) {
    return;
  }
  int statusCode=((HttpResponse)response).getStatus();
  ErrorPage errorPage=context.findErrorPage(statusCode);
  if (errorPage != null) {
    if (errorPage.getLocation() != null) {
      File file=new File(context.getDocBase(),errorPage.getLocation());
      if (!file.exists()) {
        log.warning("String_Node_Str" + file.getAbsolutePath() + "String_Node_Str");
      }
    }
    setErrorPageContentType(response,errorPage.getLocation(),context);
    dispatchToErrorPage(request,response,errorPage,null,null,statusCode);
  }
 else   if (statusCode >= 400 && statusCode < 600 && context.getDefaultErrorPage() != null) {
    dispatchToErrorPage(request,response,context.getDefaultErrorPage(),null,null,statusCode);
  }
 else {
    errorPage=((StandardHost)getContainer()).findErrorPage(statusCode);
    if (errorPage != null) {
      if (errorPage.getLocation() != null) {
        File file=new File(context.getDocBase(),errorPage.getLocation());
        if (!file.exists()) {
          log.warning("String_Node_Str" + file.getAbsolutePath() + "String_Node_Str");
        }
      }
      try {
        setErrorPageContentType(response,errorPage.getLocation(),context);
        handleHostErrorPage(response,errorPage,statusCode);
      }
 catch (      Exception e) {
        log("String_Node_Str" + errorPage,e);
      }
    }
  }
}