Program: 23262
Project: 23262
Buggy source:
private void addPageData(JsonObject pages,ImplementationGuidePageComponent page,String source,String title,String label,String breadcrumb){
  FetchedResource r=resources.get(source);
  if (r == null) {
    addPageDataRow(pages,source,title,label,breadcrumb + breadCrumbForPage(page,false),null);
  }
 else {
    Map<String,String> vars=makeVars(r);
    String outputName=determineOutputName(igpkp.getProperty(r,"String_Node_Str"),r,vars,null,"String_Node_Str");
    if (igpkp.wantGen(r,"String_Node_Str")) {
      outputName=determineOutputName(igpkp.getProperty(r,"String_Node_Str"),r,vars,"String_Node_Str","String_Node_Str");
      addPageDataRow(pages,outputName,page.getTitle() + "String_Node_Str",label,breadcrumb + breadCrumbForPage(page,false),null);
    }
    if (igpkp.wantGen(r,"String_Node_Str")) {
      outputName=determineOutputName(igpkp.getProperty(r,"String_Node_Str"),r,vars,"String_Node_Str","String_Node_Str");
      addPageDataRow(pages,outputName,page.getTitle() + "String_Node_Str",label,breadcrumb + breadCrumbForPage(page,false),null);
    }
    if (igpkp.wantGen(r,"String_Node_Str")) {
      outputName=determineOutputName(igpkp.getProperty(r,"String_Node_Str"),r,vars,"String_Node_Str","String_Node_Str");
      addPageDataRow(pages,outputName,page.getTitle() + "String_Node_Str",label,breadcrumb + breadCrumbForPage(page,false),null);
    }
    if (page.getKind().equals(ImplementationGuide.GuidePageKind.RESOURCE) && page.getFormat().equals("String_Node_Str")) {
      outputName=determineOutputName(igpkp.getProperty(r,"String_Node_Str"),r,vars,null,"String_Node_Str");
      addPageDataRow(pages,outputName,page.getTitle() + "String_Node_Str",label,breadcrumb + breadCrumbForPage(page,false),null);
      JsonArray templates=configuration.getAsJsonArray("String_Node_Str");
      if (templates != null)       for (      JsonElement template : templates) {
        String templateName=null;
        String templateDesc=null;
        if (template.isJsonPrimitive()) {
          templateName=template.getAsString();
          templateDesc=templateName;
        }
 else {
          templateName=((JsonObject)template).get("String_Node_Str").getAsString();
          templateDesc=((JsonObject)template).get("String_Node_Str").getAsString();
        }
        outputName=igpkp.getProperty(r,templateName);
        if (outputName == null)         outputName=r.getElement().fhirType() + "String_Node_Str" + r.getId()+ "String_Node_Str"+ templateName+ "String_Node_Str";
 else         outputName=igpkp.doReplacements(outputName,r,vars,"String_Node_Str");
        addPageDataRow(pages,outputName,page.getTitle() + "String_Node_Str" + templateDesc,label,breadcrumb + breadCrumbForPage(page,false),null);
      }
    }
  }
  int i=1;
  for (  ImplementationGuidePageComponent childPage : page.getPage()) {
    addPageData(pages,childPage,(label.equals("String_Node_Str") ? "String_Node_Str" : label + "String_Node_Str") + Integer.toString(i),breadcrumb + breadCrumbForPage(page,true));
    i++;
  }
}

Fixed version (ground truth):
private void addPageData(JsonObject pages,ImplementationGuidePageComponent page,String source,String title,String label,String breadcrumb){
  FetchedResource r=resources.get(source);
  addPageDataRow(pages,source,title,label,breadcrumb + breadCrumbForPage(page,false),null);
  if (r != null) {
    Map<String,String> vars=makeVars(r);
    String outputName=determineOutputName(igpkp.getProperty(r,"String_Node_Str"),r,vars,null,"String_Node_Str");
    if (igpkp.wantGen(r,"String_Node_Str")) {
      outputName=determineOutputName(igpkp.getProperty(r,"String_Node_Str"),r,vars,"String_Node_Str","String_Node_Str");
      addPageDataRow(pages,outputName,page.getTitle() + "String_Node_Str",label,breadcrumb + breadCrumbForPage(page,false),null);
    }
    if (igpkp.wantGen(r,"String_Node_Str")) {
      outputName=determineOutputName(igpkp.getProperty(r,"String_Node_Str"),r,vars,"String_Node_Str","String_Node_Str");
      addPageDataRow(pages,outputName,page.getTitle() + "String_Node_Str",label,breadcrumb + breadCrumbForPage(page,false),null);
    }
    if (igpkp.wantGen(r,"String_Node_Str")) {
      outputName=determineOutputName(igpkp.getProperty(r,"String_Node_Str"),r,vars,"String_Node_Str","String_Node_Str");
      addPageDataRow(pages,outputName,page.getTitle() + "String_Node_Str",label,breadcrumb + breadCrumbForPage(page,false),null);
    }
    if (page.getKind().equals(ImplementationGuide.GuidePageKind.RESOURCE) && page.getFormat().equals("String_Node_Str")) {
      outputName=determineOutputName(igpkp.getProperty(r,"String_Node_Str"),r,vars,null,"String_Node_Str");
      addPageDataRow(pages,outputName,page.getTitle() + "String_Node_Str",label,breadcrumb + breadCrumbForPage(page,false),null);
      JsonArray templates=configuration.getAsJsonArray("String_Node_Str");
      if (templates != null)       for (      JsonElement template : templates) {
        String templateName=null;
        String templateDesc=null;
        if (template.isJsonPrimitive()) {
          templateName=template.getAsString();
          templateDesc=templateName;
        }
 else {
          templateName=((JsonObject)template).get("String_Node_Str").getAsString();
          templateDesc=((JsonObject)template).get("String_Node_Str").getAsString();
        }
        outputName=igpkp.getProperty(r,templateName);
        if (outputName == null)         outputName=r.getElement().fhirType() + "String_Node_Str" + r.getId()+ "String_Node_Str"+ templateName+ "String_Node_Str";
 else         outputName=igpkp.doReplacements(outputName,r,vars,"String_Node_Str");
        addPageDataRow(pages,outputName,page.getTitle() + "String_Node_Str" + templateDesc,label,breadcrumb + breadCrumbForPage(page,false),null);
      }
    }
  }
  int i=1;
  for (  ImplementationGuidePageComponent childPage : page.getPage()) {
    addPageData(pages,childPage,(label.equals("String_Node_Str") ? "String_Node_Str" : label + "String_Node_Str") + Integer.toString(i),breadcrumb + breadCrumbForPage(page,true));
    i++;
  }
}