Program: 70017
Project: 70017
Buggy source:
@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;
}

Fixed version (ground truth):
@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;
}