Program: 90662
Project: 90662
Buggy source:
/** 
 * Process action for the portlet associated with the given portlet window.
 * @param portletWindow  the portlet window.
 * @param request  the servlet request.
 * @param response  the servlet response.
 * @throws PortletException
 * @throws IOException
 * @throws PortletContainerException
 * @see javax.portlet.Portlet#processAction(ActionRequest,ActionResponse)
 */
public void doAction(PortletWindow portletWindow,HttpServletRequest request,HttpServletResponse response) throws PortletException, IOException, PortletContainerException {
  ensureInitialized();
  InternalPortletWindow internalPortletWindow=new InternalPortletWindowImpl(PortletContextManager.getPortletContext(servletContext,portletWindow.getContextPath()),portletWindow);
  debugWithName("String_Node_Str" + portletWindow.getPortletName());
  InternalActionRequest actionRequest=getOptionalContainerServices().getPortletEnvironmentService().createActionRequest(this,request,response,internalPortletWindow);
  InternalActionResponse actionResponse=getOptionalContainerServices().getPortletEnvironmentService().createActionResponse(this,request,response,internalPortletWindow);
  PortletInvokerService invoker=optionalContainerServices.getPortletInvokerService();
  try {
    ContainerInvocation.setInvocation(this,internalPortletWindow);
    invoker.action(actionRequest,actionResponse,internalPortletWindow);
  }
  finally {
    ContainerInvocation.clearInvocation();
  }
  debugWithName("String_Node_Str" + portletWindow.getPortletName());
  PortletURLProvider portletURLProvider=requiredContainerServices.getPortalCallbackService().getPortletURLProvider(request,internalPortletWindow);
  portletURLProvider.savePortalURL(request);
  saveChangedParameters(actionRequest,actionResponse,portletURLProvider);
  EventProvider provider=this.getRequiredContainerServices().getPortalCallbackService().getEventProvider(request,portletWindow);
  provider.fireEvents(this);
  String location=actionResponse.getRedirectLocation();
  if (location == null) {
    debugWithName("String_Node_Str");
    PortletURLProvider redirectURL=requiredContainerServices.getPortalCallbackService().getPortletURLProvider(request,internalPortletWindow);
    saveChangedParameters(actionRequest,actionResponse,redirectURL);
    location=actionResponse.encodeRedirectURL(redirectURL.toString());
  }
  response.sendRedirect(location);
  debugWithName("String_Node_Str");
}

Fixed version (ground truth):
/** 
 * Process action for the portlet associated with the given portlet window.
 * @param portletWindow  the portlet window.
 * @param request  the servlet request.
 * @param response  the servlet response.
 * @throws PortletException
 * @throws IOException
 * @throws PortletContainerException
 * @see javax.portlet.Portlet#processAction(ActionRequest,ActionResponse)
 */
public void doAction(PortletWindow portletWindow,HttpServletRequest request,HttpServletResponse response) throws PortletException, IOException, PortletContainerException {
  ensureInitialized();
  InternalPortletWindow internalPortletWindow=new InternalPortletWindowImpl(PortletContextManager.getPortletContext(servletContext,portletWindow.getContextPath()),portletWindow);
  debugWithName("String_Node_Str" + portletWindow.getPortletName());
  InternalActionRequest actionRequest=getOptionalContainerServices().getPortletEnvironmentService().createActionRequest(this,request,response,internalPortletWindow);
  InternalActionResponse actionResponse=getOptionalContainerServices().getPortletEnvironmentService().createActionResponse(this,request,response,internalPortletWindow);
  PortletInvokerService invoker=optionalContainerServices.getPortletInvokerService();
  try {
    ContainerInvocation.setInvocation(this,internalPortletWindow);
    invoker.action(actionRequest,actionResponse,internalPortletWindow);
  }
  finally {
    ContainerInvocation.clearInvocation();
  }
  debugWithName("String_Node_Str" + portletWindow.getPortletName());
  PortletURLProvider portletURLProvider=requiredContainerServices.getPortalCallbackService().getPortletURLProvider(request,internalPortletWindow);
  portletURLProvider.savePortalURL(request);
  saveChangedParameters((PortletRequest)actionRequest,(StateAwareResponseImpl)actionResponse,portletURLProvider);
  EventProvider provider=this.getRequiredContainerServices().getPortalCallbackService().getEventProvider(request,portletWindow);
  provider.fireEvents(this);
  String location=actionResponse.getRedirectLocation();
  if (location == null) {
    debugWithName("String_Node_Str");
    PortletURLProvider redirectURL=requiredContainerServices.getPortalCallbackService().getPortletURLProvider(request,internalPortletWindow);
    saveChangedParameters((PortletRequest)actionRequest,(StateAwareResponseImpl)actionResponse,redirectURL);
    location=actionResponse.encodeRedirectURL(redirectURL.toString());
  }
  response.sendRedirect(location);
  debugWithName("String_Node_Str");
}