Program: 90763
Project: 90763
Buggy source:
private void dispatch(HttpServletRequest request,HttpServletResponse response) throws ServletException, IOException {
  try {
    request.setAttribute(org.apache.pluto.Constants.PORTLET_CONFIG,portletConfig);
    Integer method_id=(Integer)request.getAttribute(org.apache.pluto.Constants.METHOD_ID);
    if (method_id == org.apache.pluto.Constants.METHOD_RENDER) {
      RenderRequestImpl renderRequest=(RenderRequestImpl)request.getAttribute(org.apache.pluto.Constants.PORTLET_REQUEST);
      RenderResponseImpl renderResponse=(RenderResponseImpl)request.getAttribute(org.apache.pluto.Constants.PORTLET_RESPONSE);
      portlet.render(renderRequest,renderResponse);
    }
 else     if (method_id == org.apache.pluto.Constants.METHOD_ACTION) {
      ActionRequestImpl actionRequest=(ActionRequestImpl)request.getAttribute(org.apache.pluto.Constants.PORTLET_REQUEST);
      ActionResponseImpl actionResponse=(ActionResponseImpl)request.getAttribute(org.apache.pluto.Constants.PORTLET_RESPONSE);
      portlet.processAction(actionRequest,actionResponse);
    }
 else     if (method_id == org.apache.pluto.Constants.METHOD_NOOP) {
    }
  }
 catch (  javax.portlet.UnavailableException e) {
    e.printStackTrace();
    try {
      portlet.destroy();
    }
 catch (    Throwable t) {
    }
    throw new javax.servlet.UnavailableException(e.getMessage());
  }
catch (  PortletException e) {
    e.printStackTrace();
    throw new ServletException(e);
  }
 finally {
    request.removeAttribute(org.apache.pluto.Constants.PORTLET_CONFIG);
  }
}

Fixed version (ground truth):
private void dispatch(HttpServletRequest request,HttpServletResponse response) throws ServletException, IOException {
  try {
    request.setAttribute(org.apache.pluto.Constants.PORTLET_CONFIG,portletConfig);
    Integer method_id=(Integer)request.getAttribute(org.apache.pluto.Constants.METHOD_ID);
    InternalPortletRequest pRequest=(InternalPortletRequest)request.getAttribute(Constants.PORTLET_REQUEST);
    InternalPortletResponse pResponse=(InternalPortletResponse)request.getAttribute(Constants.PORTLET_RESPONSE);
    pRequest.setPortletContext(portletContext);
    if (method_id == org.apache.pluto.Constants.METHOD_RENDER) {
      RenderRequestImpl renderRequest=(RenderRequestImpl)pRequest;
      RenderResponseImpl renderResponse=(RenderResponseImpl)pResponse;
      portlet.render(renderRequest,renderResponse);
    }
 else     if (method_id == org.apache.pluto.Constants.METHOD_ACTION) {
      ActionRequestImpl actionRequest=(ActionRequestImpl)pRequest;
      ActionResponseImpl actionResponse=(ActionResponseImpl)pResponse;
      portlet.processAction(actionRequest,actionResponse);
    }
 else     if (method_id == org.apache.pluto.Constants.METHOD_NOOP) {
    }
  }
 catch (  javax.portlet.UnavailableException e) {
    e.printStackTrace();
    try {
      portlet.destroy();
    }
 catch (    Throwable t) {
    }
    throw new javax.servlet.UnavailableException(e.getMessage());
  }
catch (  PortletException e) {
    e.printStackTrace();
    throw new ServletException(e);
  }
 finally {
    request.removeAttribute(org.apache.pluto.Constants.PORTLET_CONFIG);
  }
}