Program: 30435
Project: 30435
Buggy source:
/** 
 * Log the interesting request parameters, invoke the next Valve in the sequence, and log the interesting response parameters.
 * @param request The servlet request to be processed
 * @param response The servlet response to be created
 * @exception IOException if an input/output error occurs
 * @exception ServletException if a servlet error occurs
 */
public int invoke(Request request,Response response) throws IOException, ServletException {
  if (!(request instanceof HttpRequest) || !(response instanceof HttpResponse)) {
    return INVOKE_NEXT;
  }
  HttpRequest hrequest=(HttpRequest)request;
  HttpResponse hresponse=(HttpResponse)response;
  HttpServletRequest hreq=(HttpServletRequest)hrequest.getRequest();
  log("String_Node_Str" + hreq.getRequestURI());
  log("String_Node_Str" + hreq.getAuthType());
  log("String_Node_Str" + hreq.getCharacterEncoding());
  log("String_Node_Str" + hreq.getContentLength());
  log("String_Node_Str" + hreq.getContentType());
  log("String_Node_Str" + hreq.getContextPath());
  Cookie cookies[]=hreq.getCookies();
  if (cookies != null) {
    for (int i=0; i < cookies.length; i++)     log("String_Node_Str" + cookies[i].getName() + "String_Node_Str"+ cookies[i].getValue());
  }
  Enumeration<String> hnames=hreq.getHeaderNames();
  while (hnames.hasMoreElements()) {
    String hname=hnames.nextElement();
    Enumeration<String> hvalues=hreq.getHeaders(hname);
    while (hvalues.hasMoreElements()) {
      String hvalue=hvalues.nextElement();
      log("String_Node_Str" + hname + "String_Node_Str"+ hvalue);
    }
  }
  log("String_Node_Str" + hreq.getLocale());
  log("String_Node_Str" + hreq.getMethod());
  Enumeration<String> pnames=hreq.getParameterNames();
  while (pnames.hasMoreElements()) {
    String pname=pnames.nextElement();
    String pvalues[]=hreq.getParameterValues(pname);
    StringBuilder result=new StringBuilder(pname);
    result.append('=');
    for (int i=0; i < pvalues.length; i++) {
      if (i > 0)       result.append("String_Node_Str");
      result.append(pvalues[i]);
    }
    log("String_Node_Str" + result.toString());
  }
  log("String_Node_Str" + hreq.getPathInfo());
  log("String_Node_Str" + hreq.getProtocol());
  log("String_Node_Str" + hreq.getQueryString());
  log("String_Node_Str" + hreq.getRemoteAddr());
  log("String_Node_Str" + hreq.getRemoteHost());
  log("String_Node_Str" + hreq.getRemoteUser());
  log("String_Node_Str" + hreq.getRequestedSessionId());
  log("String_Node_Str" + hreq.getScheme());
  log("String_Node_Str" + hreq.getServerName());
  log("String_Node_Str" + hreq.getServerPort());
  log("String_Node_Str" + hreq.getServletPath());
  log("String_Node_Str" + hreq.isSecure());
  log("String_Node_Str");
  return INVOKE_NEXT;
}

Fixed version (ground truth):
/** 
 * Log the interesting request parameters, invoke the next Valve in the sequence, and log the interesting response parameters.
 * @param request The servlet request to be processed
 * @param response The servlet response to be created
 * @exception IOException if an input/output error occurs
 * @exception ServletException if a servlet error occurs
 */
public int invoke(Request request,Response response) throws IOException, ServletException {
  if (!(request instanceof HttpRequest) || !(response instanceof HttpResponse)) {
    return INVOKE_NEXT;
  }
  HttpRequest hrequest=(HttpRequest)request;
  HttpServletRequest hreq=(HttpServletRequest)hrequest.getRequest();
  log("String_Node_Str" + hreq.getRequestURI());
  log("String_Node_Str" + hreq.getAuthType());
  log("String_Node_Str" + hreq.getCharacterEncoding());
  log("String_Node_Str" + hreq.getContentLength());
  log("String_Node_Str" + hreq.getContentType());
  log("String_Node_Str" + hreq.getContextPath());
  Cookie cookies[]=hreq.getCookies();
  if (cookies != null) {
    for (int i=0; i < cookies.length; i++)     log("String_Node_Str" + cookies[i].getName() + "String_Node_Str"+ cookies[i].getValue());
  }
  Enumeration<String> hnames=hreq.getHeaderNames();
  while (hnames.hasMoreElements()) {
    String hname=hnames.nextElement();
    Enumeration<String> hvalues=hreq.getHeaders(hname);
    while (hvalues.hasMoreElements()) {
      String hvalue=hvalues.nextElement();
      log("String_Node_Str" + hname + "String_Node_Str"+ hvalue);
    }
  }
  log("String_Node_Str" + hreq.getLocale());
  log("String_Node_Str" + hreq.getMethod());
  Enumeration<String> pnames=hreq.getParameterNames();
  while (pnames.hasMoreElements()) {
    String pname=pnames.nextElement();
    String pvalues[]=hreq.getParameterValues(pname);
    StringBuilder result=new StringBuilder(pname);
    result.append('=');
    for (int i=0; i < pvalues.length; i++) {
      if (i > 0)       result.append("String_Node_Str");
      result.append(pvalues[i]);
    }
    log("String_Node_Str" + result.toString());
  }
  log("String_Node_Str" + hreq.getPathInfo());
  log("String_Node_Str" + hreq.getProtocol());
  log("String_Node_Str" + hreq.getQueryString());
  log("String_Node_Str" + hreq.getRemoteAddr());
  log("String_Node_Str" + hreq.getRemoteHost());
  log("String_Node_Str" + hreq.getRemoteUser());
  log("String_Node_Str" + hreq.getRequestedSessionId());
  log("String_Node_Str" + hreq.getScheme());
  log("String_Node_Str" + hreq.getServerName());
  log("String_Node_Str" + hreq.getServerPort());
  log("String_Node_Str" + hreq.getServletPath());
  log("String_Node_Str" + hreq.isSecure());
  log("String_Node_Str");
  return INVOKE_NEXT;
}