Program: 70018
Project: 70018
Buggy source:
private AjaxTreeModel buildTreeModel(){
  AjaxTreeModel model=new AjaxTreeModel(ROOT_NODE_IDENTIFIER){
    private boolean firstLevelDone=false;
    @SuppressWarnings("String_Node_Str") @Override public List<AjaxTreeNode> getChildrenFor(    String nodeId){
      List<AjaxTreeNode> children=new ArrayList<AjaxTreeNode>();
      AjaxTreeNode child;
      try {
        List<PortfolioStructure> structs=null;
        if (nodeId.equals(ROOT_NODE_IDENTIFIER)) {
          structs=ePFMgr.getStructureElementsForUser(getIdentity(),ElementType.STRUCTURED_MAP,ElementType.DEFAULT_MAP);
          firstLevelDone=false;
        }
 else {
          PortfolioStructure selStruct=ePFMgr.loadPortfolioStructureByKey(new Long(nodeId));
          structs=ePFMgr.loadStructureChildren(selStruct);
        }
        if (structs == null || structs.size() == 0) {
          return null;
        }
        if (!firstLevelDone) {
          child=new AjaxTreeNode(NO_MAP_CHOOSEN,translate("String_Node_Str"));
          child.put(AjaxTreeNode.CONF_LEAF,true);
          child.put(AjaxTreeNode.CONF_IS_TYPE_LEAF,true);
          child.put(AjaxTreeNode.CONF_ALLOWDRAG,false);
          child.put(AjaxTreeNode.CONF_ALLOWDROP,false);
          child.put(AjaxTreeNode.CONF_ICON_CSS_CLASS,"String_Node_Str");
          child.put(AjaxTreeNode.CONF_QTIP,translate("String_Node_Str"));
          if (isUsedInStepWizzard())           children.add(child);
          firstLevelDone=true;
        }
        for (        PortfolioStructure portfolioStructure : structs) {
          if (portfolioStructure instanceof EPStructuredMap) {
            if (((EPStructuredMap)portfolioStructure).getStatus().equals(StructureStatusEnum.CLOSED)) {
              continue;
            }
          }
          String title=portfolioStructure.getTitle();
          if (!isUsedInStepWizzard() && oldStructure.getKey().equals(portfolioStructure.getKey())) {
            title=portfolioStructure.getTitle() + "String_Node_Str" + translate("String_Node_Str");
          }
          child=new AjaxTreeNode(String.valueOf(portfolioStructure.getKey()),title);
          boolean hasChilds=ePFMgr.countStructureChildren(portfolioStructure) > 0;
          child.put(AjaxTreeNode.CONF_LEAF,!hasChilds);
          child.put(AjaxTreeNode.CONF_IS_TYPE_LEAF,!hasChilds);
          child.put(AjaxTreeNode.CONF_ALLOWDRAG,false);
          child.put(AjaxTreeNode.CONF_ALLOWDROP,false);
          child.put(AjaxTreeNode.CONF_EXPANDED,true);
          child.put(AjaxTreeNode.CONF_DISABLED,portfolioStructure instanceof EPAbstractMap);
          child.put(AjaxTreeNode.CONF_ICON_CSS_CLASS,portfolioStructure.getIcon());
          child.put(AjaxTreeNode.CONF_QTIP,portfolioStructure.getDescription());
          children.add(child);
        }
      }
 catch (      JSONException e) {
        throw new OLATRuntimeException("String_Node_Str",e);
      }
      return children;
    }
  }
;
  model.setCustomRootIconCssClass("String_Node_Str");
  return model;
}

Fixed version (ground truth):
private AjaxTreeModel buildTreeModel(){
  AjaxTreeModel model=new AjaxTreeModel(ROOT_NODE_IDENTIFIER){
    private boolean firstLevelDone=false;
    @SuppressWarnings("String_Node_Str") @Override public List<AjaxTreeNode> getChildrenFor(    String nodeId){
      List<AjaxTreeNode> children=new ArrayList<AjaxTreeNode>();
      AjaxTreeNode child;
      try {
        List<PortfolioStructure> structs=null;
        if (nodeId.equals(ROOT_NODE_IDENTIFIER)) {
          structs=ePFMgr.getStructureElementsForUser(getIdentity(),ElementType.STRUCTURED_MAP,ElementType.DEFAULT_MAP);
          firstLevelDone=false;
        }
 else {
          PortfolioStructure selStruct=ePFMgr.loadPortfolioStructureByKey(new Long(nodeId));
          structs=ePFMgr.loadStructureChildren(selStruct);
        }
        if (structs == null || structs.size() == 0) {
          return null;
        }
        if (!firstLevelDone) {
          child=new AjaxTreeNode(NO_MAP_CHOOSEN,translate("String_Node_Str"));
          child.put(AjaxTreeNode.CONF_LEAF,true);
          child.put(AjaxTreeNode.CONF_IS_TYPE_LEAF,true);
          child.put(AjaxTreeNode.CONF_ALLOWDRAG,false);
          child.put(AjaxTreeNode.CONF_ALLOWDROP,false);
          child.put(AjaxTreeNode.CONF_ICON_CSS_CLASS,"String_Node_Str");
          child.put(AjaxTreeNode.CONF_QTIP,translate("String_Node_Str"));
          if (isUsedInStepWizzard())           children.add(child);
          firstLevelDone=true;
        }
        for (        PortfolioStructure portfolioStructure : structs) {
          if (portfolioStructure instanceof EPStructuredMap) {
            if (((EPStructuredMap)portfolioStructure).getStatus() != null && ((EPStructuredMap)portfolioStructure).getStatus().equals(StructureStatusEnum.CLOSED)) {
              continue;
            }
          }
          String title=portfolioStructure.getTitle();
          if (!isUsedInStepWizzard() && oldStructure.getKey().equals(portfolioStructure.getKey())) {
            title=portfolioStructure.getTitle() + "String_Node_Str" + translate("String_Node_Str");
          }
          child=new AjaxTreeNode(String.valueOf(portfolioStructure.getKey()),title);
          boolean hasChilds=ePFMgr.countStructureChildren(portfolioStructure) > 0;
          child.put(AjaxTreeNode.CONF_LEAF,!hasChilds);
          child.put(AjaxTreeNode.CONF_IS_TYPE_LEAF,!hasChilds);
          child.put(AjaxTreeNode.CONF_ALLOWDRAG,false);
          child.put(AjaxTreeNode.CONF_ALLOWDROP,false);
          child.put(AjaxTreeNode.CONF_EXPANDED,true);
          child.put(AjaxTreeNode.CONF_DISABLED,portfolioStructure instanceof EPAbstractMap);
          child.put(AjaxTreeNode.CONF_ICON_CSS_CLASS,portfolioStructure.getIcon());
          child.put(AjaxTreeNode.CONF_QTIP,portfolioStructure.getDescription());
          children.add(child);
        }
      }
 catch (      JSONException e) {
        throw new OLATRuntimeException("String_Node_Str",e);
      }
      return children;
    }
  }
;
  model.setCustomRootIconCssClass("String_Node_Str");
  return model;
}