Program: 90612
Project: 90612
Buggy source:
/** 
 * Retrieves the PortletContext associated with the given ServletContext. If one does not exist, it is created.
 * @param config the servlet config.
 * @return the InternalPortletContext associated with the ServletContext.
 * @throws PortletContainerException
 */
public String register(ServletConfig config) throws PortletContainerException {
  ServletContext servletContext=config.getServletContext();
  String contextPath=getContextPath(servletContext);
  if (!portletContexts.containsKey(contextPath)) {
    PortletApplicationDefinition portletApp=portletRegistry.getPortletAppDD(servletContext,contextPath,contextPath);
    DriverPortletContext portletContext=new DriverPortletContextImpl(servletContext,portletApp,rdService);
    portletContexts.put(contextPath,portletContext);
    fireRegistered(portletContext);
    if (LOG.isInfoEnabled()) {
      LOG.info("String_Node_Str" + contextPath + "String_Node_Str");
      LOG.info("String_Node_Str" + portletApp.getPortlets().size() + "String_Node_Str"+ portletContext.getApplicationName());
    }
    classLoaders.put(portletApp.getName(),Thread.currentThread().getContextClassLoader());
    for (    PortletDefinition portlet : portletApp.getPortlets()) {
      String appName=portletContext.getApplicationName();
      if (appName == null) {
        throw new PortletContainerException("String_Node_Str");
      }
      portletConfigs.put(portletContext.getApplicationName() + "String_Node_Str" + portlet.getPortletName(),new DriverPortletConfigImpl(portletContext,portlet));
    }
  }
 else {
    if (LOG.isInfoEnabled()) {
      LOG.info("String_Node_Str" + contextPath + "String_Node_Str");
    }
  }
  return contextPath;
}

Fixed version (ground truth):
/** 
 * Retrieves the PortletContext associated with the given ServletContext. If one does not exist, it is created.
 * @param config the servlet config.
 * @return the InternalPortletContext associated with the ServletContext.
 * @throws PortletContainerException
 */
public String register(ServletConfig config) throws PortletContainerException {
  ServletContext servletContext=config.getServletContext();
  String contextPath=getContextPath(servletContext);
  if (!portletContexts.containsKey(contextPath)) {
    PortletApplicationDefinition portletApp=portletRegistry.getPortletAppDD(servletContext,contextPath,contextPath);
    if (isDebug) {
      StringBuilder txt=new StringBuilder(128);
      txt.append("String_Node_Str").append(portletApp.getName());
      txt.append("String_Node_Str").append(portletApp.getContextPath());
      txt.append("String_Node_Str").append(portletApp.getPortlets().size());
      txt.append("String_Node_Str");
      String sep="String_Node_Str";
      for (      PortletDefinition pd : portletApp.getPortlets()) {
        txt.append(sep).append(pd.getPortletName());
        sep="String_Node_Str";
      }
      LOG.debug(txt.toString());
    }
    DriverPortletContext portletContext=new DriverPortletContextImpl(servletContext,portletApp,rdService);
    portletContexts.put(contextPath,portletContext);
    fireRegistered(portletContext);
    if (LOG.isInfoEnabled()) {
      LOG.info("String_Node_Str" + contextPath + "String_Node_Str");
      LOG.info("String_Node_Str" + portletApp.getPortlets().size() + "String_Node_Str"+ portletContext.getApplicationName());
    }
    classLoaders.put(portletApp.getName(),Thread.currentThread().getContextClassLoader());
    for (    PortletDefinition portlet : portletApp.getPortlets()) {
      String appName=portletContext.getApplicationName();
      if (appName == null) {
        throw new PortletContainerException("String_Node_Str");
      }
      portletConfigs.put(portletContext.getApplicationName() + "String_Node_Str" + portlet.getPortletName(),new DriverPortletConfigImpl(portletContext,portlet));
    }
  }
 else {
    if (LOG.isInfoEnabled()) {
      LOG.info("String_Node_Str" + contextPath + "String_Node_Str");
    }
  }
  return contextPath;
}