Program: 90551
Project: 90551
Buggy source:
/** 
 * Fire Event for the portlet associated with the given portlet window and eventName
 * @param portletWindow  the portlet window.
 * @param request  the servlet request.
 * @param response  the servlet response.
 * @param event the event
 * @throws PortletException
 * @throws IOException
 * @throws PortletContainerException
 * @see javax.portlet.EventPortlet#processEvent(javax.portlet.EventRequest,javax.portlet.EventResponse)
 */
public void doEvent(PortletWindow portletWindow,HttpServletRequest request,HttpServletResponse response,Event event) throws PortletException, IOException, PortletContainerException {
  ensureInitialized();
  debugWithName("String_Node_Str" + event.getName() + "String_Node_Str"+ portletWindow.getPortletDefinition().getPortletName());
  PortletRequestContextService rcService=getContainerServices().getPortletRequestContextService();
  PortletEnvironmentService envService=getContainerServices().getPortletEnvironmentService();
  PortletInvokerService invoker=getContainerServices().getPortletInvokerService();
  PortletRequestContext requestContext=rcService.getPortletEventRequestContext(this,request,response,portletWindow);
  PortletEventResponseContext responseContext=rcService.getPortletEventResponseContext(this,request,response,portletWindow,requestContext);
  EventRequest portletRequest=envService.createEventRequest(requestContext,responseContext,event);
  EventResponse portletResponse=envService.createEventResponse(responseContext);
  FilterManager filterManager=filterInitialisation(portletWindow,PortletRequest.EVENT_PHASE);
  List<Event> events=null;
  try {
    invoker.event(requestContext,portletRequest,portletResponse,filterManager);
    debugWithName("String_Node_Str" + portletWindow.getPortletDefinition().getPortletName());
    responseContext.close();
    events=responseContext.getEvents();
  }
  finally {
    responseContext.release();
  }
  if (events != null && !events.isEmpty()) {
    getContainerServices().getEventCoordinationService().processEvents(this,portletWindow,request,response,events);
  }
  debugWithName("String_Node_Str" + event.getName() + "String_Node_Str"+ portletWindow.getPortletDefinition().getPortletName());
}

Fixed version (ground truth):
/** 
 * Fire Event for the portlet associated with the given portlet window and eventName
 * @param portletWindow  the portlet window.
 * @param request  the servlet request.
 * @param response  the servlet response.
 * @param event the event
 * @throws PortletException
 * @throws IOException
 * @throws PortletContainerException
 * @see javax.portlet.EventPortlet#processEvent(javax.portlet.EventRequest,javax.portlet.EventResponse)
 */
public void doEvent(PortletWindow portletWindow,HttpServletRequest request,HttpServletResponse response,Event event) throws PortletException, IOException, PortletContainerException {
  ensureInitialized();
  debugWithName("String_Node_Str" + event.getName() + "String_Node_Str"+ portletWindow.getPortletDefinition().getPortletName());
  PortletRequestContextService rcService=getContainerServices().getPortletRequestContextService();
  PortletEnvironmentService envService=getContainerServices().getPortletEnvironmentService();
  PortletInvokerService invoker=getContainerServices().getPortletInvokerService();
  PortletRequestContext requestContext=rcService.getPortletEventRequestContext(this,request,response,portletWindow);
  PortletEventResponseContext responseContext=rcService.getPortletEventResponseContext(this,request,response,portletWindow,requestContext);
  EventRequest portletRequest=envService.createEventRequest(requestContext,responseContext,event);
  EventResponse portletResponse=envService.createEventResponse(responseContext);
  FilterManager filterManager=filterInitialisation(portletWindow,PortletRequest.EVENT_PHASE);
  List<Event> events=null;
  try {
    invoker.event(requestContext,portletRequest,portletResponse,filterManager);
    debugWithName("String_Node_Str" + portletWindow.getPortletDefinition().getPortletName());
    responseContext.close();
    events=responseContext.getEvents();
  }
 catch (  Throwable t) {
    responseContext.reset();
    StringBuilder txt=new StringBuilder(128);
    txt.append("String_Node_Str");
    StringWriter sw=new StringWriter();
    PrintWriter pw=new PrintWriter(sw);
    t.printStackTrace(pw);
    pw.flush();
    txt.append(sw.toString());
    LOG.warn(txt.toString());
  }
 finally {
    responseContext.release();
  }
  if (events != null && !events.isEmpty()) {
    getContainerServices().getEventCoordinationService().processEvents(this,portletWindow,request,response,events);
  }
  debugWithName("String_Node_Str" + event.getName() + "String_Node_Str"+ portletWindow.getPortletDefinition().getPortletName());
}