Program: 90632
Project: 90632
Buggy source:
public PublicRenderParameterMapperImpl(PageConfig paco,PortletRegistryService pore){
  Collection<String> pids=paco.getPortletIds();
  LOGGER.debug("String_Node_Str" + pids.size() + "String_Node_Str");
  StringBuilder dbgstr=new StringBuilder(1024);
  boolean isDebug=LOGGER.isDebugEnabled();
  for (  String pid : pids) {
    if (isDebug) {
      dbgstr.append("String_Node_Str" + pid);
    }
    PortletWindowConfig pwc=null;
    PortletApplicationDefinition pad=null;
    PortletDefinition pd=null;
    pwc=PortletWindowConfig.fromId(pid);
    String cxtpa=pwc.getContextPath();
    String portletName=pwc.getPortletName();
    try {
      pad=pore.getPortletApplication(cxtpa);
      pd=pore.getPortlet(cxtpa,portletName);
      if (isDebug) {
        dbgstr.append("String_Node_Str" + cxtpa + "String_Node_Str"+ pad.getName()+ "String_Node_Str"+ pd.getPortletName());
      }
      Collection<String> prpIds=pd.getSupportedPublicRenderParameters();
      if (prpIds != null && prpIds.size() > 0) {
        Collection<? extends PublicRenderParameter> prpDefs=pad.getPublicRenderParameters();
        String namespace=pad.getDefaultNamespace();
        for (        String prpId : prpIds) {
          Iterator<? extends PublicRenderParameter> i=prpDefs.iterator();
          QName qn=null;
          while (qn == null && i.hasNext()) {
            PublicRenderParameter prpDef=i.next();
            if (prpDef.getIdentifier().equals(prpId)) {
              qn=prpDef.getQName();
              if (qn == null) {
                String name=prpDef.getName();
                if (name == null) {
                  LOGGER.error("String_Node_Str");
                }
 else {
                  qn=new QName(namespace,name);
                }
              }
            }
          }
          if (qn == null) {
            LOGGER.error("String_Node_Str");
          }
 else {
            PortalURLPublicParameter pupp=new PortalURLPublicParameter(pid,prpId,qn);
            prpList.add(pupp);
            if (qn2PRP.containsKey(qn)) {
              qn2PRP.get(qn).add(pupp);
            }
 else {
              List<PortalURLPublicParameter> s=new ArrayList<PortalURLPublicParameter>();
              s.add(pupp);
              qn2PRP.put(qn,s);
              qnList.add(qn);
            }
            if (isDebug) {
              dbgstr.append("String_Node_Str" + pid + "String_Node_Str"+ qn.toString()+ "String_Node_Str"+ prpId);
            }
          }
        }
      }
    }
 catch (    Exception e) {
      if (pad == null) {
        LOGGER.error("String_Node_Str" + cxtpa);
      }
 else {
        LOGGER.error("String_Node_Str" + portletName);
      }
    }
  }
  if (isDebug) {
    LOGGER.debug(dbgstr.toString());
  }
}

Fixed version (ground truth):
public PublicRenderParameterMapperImpl(PageConfig paco,PortletRegistryService pore){
  Collection<String> pids=paco.getPortletIds();
  LOGGER.debug("String_Node_Str" + pids.size() + "String_Node_Str");
  StringBuilder dbgstr=new StringBuilder(1024);
  boolean isDebug=LOGGER.isDebugEnabled();
  for (  String pid : pids) {
    if (isDebug) {
      dbgstr.append("String_Node_Str" + pid);
    }
    PortletWindowConfig pwc=null;
    PortletApplicationDefinition pad=null;
    PortletDefinition pd=null;
    pwc=PortletWindowConfig.fromId(pid);
    String cxtpa=pwc.getContextPath();
    String portletName=pwc.getPortletName();
    try {
      pad=pore.getPortletApplication(cxtpa);
      pd=pore.getPortlet(cxtpa,portletName);
      if (isDebug) {
        dbgstr.append("String_Node_Str" + cxtpa + "String_Node_Str"+ pad.getName()+ "String_Node_Str"+ pd.getPortletName());
      }
      Collection<String> prpIds=pd.getSupportedPublicRenderParameters();
      if (prpIds != null && prpIds.size() > 0) {
        Collection<? extends PublicRenderParameter> prpDefs=pad.getPublicRenderParameters();
        String namespace=pad.getDefaultNamespace();
        for (        String prpId : prpIds) {
          Iterator<? extends PublicRenderParameter> i=prpDefs.iterator();
          QName qn=null;
          while (qn == null && i.hasNext()) {
            PublicRenderParameter prpDef=i.next();
            if (prpDef.getIdentifier().equals(prpId)) {
              qn=prpDef.getQName();
              if (qn == null) {
                String name=prpDef.getName();
                if (name == null) {
                  LOGGER.error("String_Node_Str");
                }
 else {
                  qn=new QName(namespace,name);
                }
              }
            }
          }
          if (qn == null) {
            LOGGER.error("String_Node_Str");
          }
 else {
            PortalURLPublicParameter pupp=new PortalURLPublicParameter(pid,prpId,qn);
            prpList.add(pupp);
            if (qn2PRP.containsKey(qn)) {
              qn2PRP.get(qn).add(pupp);
            }
 else {
              List<PortalURLPublicParameter> s=new ArrayList<PortalURLPublicParameter>();
              s.add(pupp);
              qn2PRP.put(qn,s);
              qnList.add(qn);
            }
            if (isDebug) {
              dbgstr.append("String_Node_Str" + pid + "String_Node_Str"+ qn.toString()+ "String_Node_Str"+ prpId);
            }
          }
        }
      }
    }
 catch (    Exception e) {
      if (pad == null) {
        LOGGER.error("String_Node_Str" + cxtpa);
      }
 else {
        LOGGER.error("String_Node_Str" + portletName);
      }
    }
  }
  if (isDebug) {
    dbgstr.append("String_Node_Str" + paco.getName() + "String_Node_Str"+ prpList.size()+ "String_Node_Str"+ qnList.size()+ "String_Node_Str");
    String prefix="String_Node_Str";
    for (    List<PortalURLPublicParameter> lp : qn2PRP.values()) {
      dbgstr.append(prefix + lp.size());
      prefix="String_Node_Str";
    }
    LOGGER.debug(dbgstr.toString());
  }
}