Program: 90648
Project: 90648
Buggy source:
/** 
 * Handle all requests. All POST requests are passed to this method.
 * @param request  the incoming HttpServletRequest.
 * @param response  the incoming HttpServletResponse.
 * @throws ServletException  if an internal error occurs.
 * @throws IOException  if an error occurs writing to the response.
 */
public void doGet(HttpServletRequest request,HttpServletResponse response) throws ServletException, IOException {
  PortalRequestContext portalRequestContext=new PortalRequestContext(getServletContext(),request,response);
  PortalURL portalURL=portalRequestContext.getRequestedPortalURL();
  String actionWindowId=portalURL.getActionWindow();
  String resourceWindowId=portalURL.getResourceWindow();
  PortletWindowConfig actionWindowConfig=null;
  PortletWindowConfig resourceWindowConfig=null;
  if (resourceWindowId != null) {
    resourceWindowConfig=PortletWindowConfig.fromId(resourceWindowId);
  }
 else   if (actionWindowId != null) {
    actionWindowConfig=PortletWindowConfig.fromId(actionWindowId);
  }
  if (actionWindowConfig != null) {
    try {
      if (request.getParameterNames().hasMoreElements()) {
        setPublicRenderParameter(request,portalURL,portalURL.getActionWindow());
      }
    }
 catch (    PortletContainerException e) {
      LOG.warn(e);
    }
    PortletWindowImpl portletWindow=new PortletWindowImpl(actionWindowConfig,portalURL);
    if (LOG.isDebugEnabled()) {
      LOG.debug("String_Node_Str" + portletWindow.getId().getStringId());
    }
    try {
      container.doAction(portletWindow,request,response);
    }
 catch (    PortletContainerException ex) {
      throw new ServletException(ex);
    }
catch (    PortletException ex) {
      throw new ServletException(ex);
    }
    if (LOG.isDebugEnabled()) {
      LOG.debug("String_Node_Str");
    }
  }
 else   if (resourceWindowConfig != null) {
    try {
      if (request.getParameterNames().hasMoreElements())       setPublicRenderParameter(request,portalURL,portalURL.getResourceWindow());
    }
 catch (    PortletContainerException e) {
      LOG.warn(e);
    }
    PortletWindowImpl portletWindow=new PortletWindowImpl(resourceWindowConfig,portalURL);
    if (LOG.isDebugEnabled()) {
      LOG.debug("String_Node_Str" + portletWindow.getId().getStringId());
    }
    try {
      container.doServeResource(portletWindow,request,response);
    }
 catch (    PortletContainerException ex) {
      throw new ServletException(ex);
    }
catch (    PortletException ex) {
      throw new ServletException(ex);
    }
    if (LOG.isDebugEnabled()) {
      LOG.debug("String_Node_Str");
    }
  }
 else {
    if (LOG.isDebugEnabled()) {
      LOG.debug("String_Node_Str");
    }
    PageConfig pageConfig=portalURL.getPageConfig(servletContext);
    if (pageConfig == null) {
      LOG.error("String_Node_Str" + portalURL.getRenderPath() + "String_Node_Str");
    }
    request.setAttribute(AttributeKeys.CURRENT_PAGE,pageConfig);
    String uri=(pageConfig.getUri() != null) ? pageConfig.getUri() : DEFAULT_PAGE_URI;
    if (LOG.isDebugEnabled()) {
      LOG.debug("String_Node_Str" + uri);
    }
    RequestDispatcher dispatcher=request.getRequestDispatcher(uri);
    dispatcher.forward(request,response);
    if (LOG.isDebugEnabled()) {
      LOG.debug("String_Node_Str");
    }
  }
}

Fixed version (ground truth):
/** 
 * Handle all requests. All POST requests are passed to this method.
 * @param request  the incoming HttpServletRequest.
 * @param response  the incoming HttpServletResponse.
 * @throws ServletException  if an internal error occurs.
 * @throws IOException  if an error occurs writing to the response.
 */
public void doGet(HttpServletRequest request,HttpServletResponse response) throws ServletException, IOException {
  PortalRequestContext portalRequestContext=new PortalRequestContext(getServletContext(),request,response);
  PortalURL portalURL=portalRequestContext.getRequestedPortalURL();
  String actionWindowId=portalURL.getActionWindow();
  String resourceWindowId=portalURL.getResourceWindow();
  PortletWindowConfig actionWindowConfig=null;
  PortletWindowConfig resourceWindowConfig=null;
  if (resourceWindowId != null) {
    resourceWindowConfig=PortletWindowConfig.fromId(resourceWindowId);
  }
 else   if (actionWindowId != null) {
    actionWindowConfig=PortletWindowConfig.fromId(actionWindowId);
  }
  if (actionWindowConfig != null) {
    PortletWindowImpl portletWindow=new PortletWindowImpl(actionWindowConfig,portalURL);
    if (LOG.isDebugEnabled()) {
      LOG.debug("String_Node_Str" + portletWindow.getId().getStringId());
    }
    try {
      container.doAction(portletWindow,request,response);
    }
 catch (    PortletContainerException ex) {
      throw new ServletException(ex);
    }
catch (    PortletException ex) {
      throw new ServletException(ex);
    }
    if (LOG.isDebugEnabled()) {
      LOG.debug("String_Node_Str");
    }
  }
 else   if (resourceWindowConfig != null) {
    try {
      if (request.getParameterNames().hasMoreElements())       setPublicRenderParameter(request,portalURL,portalURL.getResourceWindow());
    }
 catch (    PortletContainerException e) {
      LOG.warn(e);
    }
    PortletWindowImpl portletWindow=new PortletWindowImpl(resourceWindowConfig,portalURL);
    if (LOG.isDebugEnabled()) {
      LOG.debug("String_Node_Str" + portletWindow.getId().getStringId());
    }
    try {
      container.doServeResource(portletWindow,request,response);
    }
 catch (    PortletContainerException ex) {
      throw new ServletException(ex);
    }
catch (    PortletException ex) {
      throw new ServletException(ex);
    }
    if (LOG.isDebugEnabled()) {
      LOG.debug("String_Node_Str");
    }
  }
 else {
    if (LOG.isDebugEnabled()) {
      LOG.debug("String_Node_Str");
    }
    PageConfig pageConfig=portalURL.getPageConfig(servletContext);
    if (pageConfig == null) {
      LOG.error("String_Node_Str" + portalURL.getRenderPath() + "String_Node_Str");
    }
    request.setAttribute(AttributeKeys.CURRENT_PAGE,pageConfig);
    String uri=(pageConfig.getUri() != null) ? pageConfig.getUri() : DEFAULT_PAGE_URI;
    if (LOG.isDebugEnabled()) {
      LOG.debug("String_Node_Str" + uri);
    }
    RequestDispatcher dispatcher=request.getRequestDispatcher(uri);
    dispatcher.forward(request,response);
    if (LOG.isDebugEnabled()) {
      LOG.debug("String_Node_Str");
    }
  }
}