Program: 102478
Project: 102478
Buggy source:
/** 
 * Get the uri people.
 * @param portalContainer
 * @param remoteId
 * @return
 * @throws Exception
 */
private String getURIForPeople(PortalContainer portalContainer,String remoteId) throws Exception {
  UserPortalConfigService userPortalConfigSer=(UserPortalConfigService)portalContainer.getComponentInstanceOfType(UserPortalConfigService.class);
  UserPortalContext NULL_CONTEXT=new UserPortalContext(){
    public ResourceBundle getBundle(    UserNavigation navigation){
      return null;
    }
    public Locale getUserLocale(){
      return Locale.ENGLISH;
    }
  }
;
  StringBuffer stringBuffer=new StringBuffer();
  try {
    RequestLifeCycle.begin(portalContainer);
    UserPortalConfig userPortalCfg=userPortalConfigSer.getUserPortalConfig(userPortalConfigSer.getDefaultPortal(),remoteId,NULL_CONTEXT);
    UserPortal userPortal=userPortalCfg.getUserPortal();
    SiteKey siteKey=SiteKey.portal(userPortalConfigSer.getDefaultPortal());
    UserNavigation userNav=userPortal.getNavigation(siteKey);
    UserNode rootNode=userPortal.getNode(userNav,Scope.ALL,null,null);
    UserNode peopleNode=rootNode.getChild("String_Node_Str");
    UserNode iteratorNode=peopleNode;
    if (iteratorNode != null) {
      while (iteratorNode != null && iteratorNode.getParent() != null) {
        stringBuffer.insert(0,iteratorNode.getName());
        stringBuffer.insert(0,"String_Node_Str");
        iteratorNode=iteratorNode.getParent();
      }
      stringBuffer.insert(0,userPortalConfigSer.getDefaultPortal());
      stringBuffer.insert(0,"String_Node_Str");
      stringBuffer.insert(0,portalContainer.getName());
      stringBuffer.insert(0,"String_Node_Str");
    }
  }
 catch (  Exception e) {
  }
  RequestLifeCycle.end();
  return stringBuffer.toString();
}

Fixed version (ground truth):
/** 
 * Get the uri people.
 * @param portalContainer
 * @param remoteId
 * @return
 * @throws Exception
 */
private String getURIForPeople(PortalContainer portalContainer,String remoteId) throws Exception {
  UserPortalConfigService userPortalConfigSer=(UserPortalConfigService)portalContainer.getComponentInstanceOfType(UserPortalConfigService.class);
  UserPortalContext NULL_CONTEXT=new UserPortalContext(){
    public ResourceBundle getBundle(    UserNavigation navigation){
      return null;
    }
    public Locale getUserLocale(){
      return Locale.ENGLISH;
    }
  }
;
  StringBuffer stringBuffer=new StringBuffer();
  try {
    RequestLifeCycle.begin(portalContainer);
    UserPortalConfig userPortalCfg=userPortalConfigSer.getUserPortalConfig(userPortalConfigSer.getDefaultPortal(),remoteId,NULL_CONTEXT);
    UserPortal userPortal=userPortalCfg.getUserPortal();
    SiteKey siteKey=SiteKey.portal(userPortalConfigSer.getDefaultPortal());
    UserNavigation userNav=userPortal.getNavigation(siteKey);
    UserNode rootNode=userPortal.getNode(userNav,Scope.ALL,null,null);
    UserNode peopleNode=rootNode.getChild("String_Node_Str");
    UserNode iteratorNode=peopleNode;
    if (iteratorNode != null) {
      while (iteratorNode != null && iteratorNode.getParent() != null) {
        stringBuffer.insert(0,iteratorNode.getName());
        stringBuffer.insert(0,"String_Node_Str");
        iteratorNode=iteratorNode.getParent();
      }
      stringBuffer.insert(0,userPortalConfigSer.getDefaultPortal());
      stringBuffer.insert(0,"String_Node_Str");
      stringBuffer.insert(0,portalContainer.getName());
      stringBuffer.insert(0,"String_Node_Str");
    }
  }
 catch (  Exception e) {
    LOG.debug("String_Node_Str");
  }
  RequestLifeCycle.end();
  return stringBuffer.toString();
}