Program: 23015
Project: 23015
Buggy source:
private void generateOutputs(FetchedFile f,boolean regen) throws TransformerException {
  if (f.getProcessMode() == FetchedFile.PROCESS_NONE) {
    String dst=tempDir;
    if (f.getRelativePath().startsWith(File.separator))     dst=dst + f.getRelativePath();
 else     dst=dst + File.separator + f.getRelativePath();
    try {
      if (f.isFolder()) {
        f.getOutputNames().add(dst);
        Utilities.createDirectory(dst);
      }
 else       checkMakeFile(f.getSource(),dst,f.getOutputNames());
    }
 catch (    IOException e) {
      log("String_Node_Str" + dst + "String_Node_Str"+ e.getMessage());
    }
  }
 else   if (f.getProcessMode() == FetchedFile.PROCESS_XSLT) {
    String dst=tempDir;
    if (f.getRelativePath().startsWith(File.separator))     dst=dst + f.getRelativePath();
 else     dst=dst + File.separator + f.getRelativePath();
    try {
      if (f.isFolder()) {
        f.getOutputNames().add(dst);
        Utilities.createDirectory(dst);
      }
 else       checkMakeFile(transform(f.getSource(),f.getXslt()),dst,f.getOutputNames());
    }
 catch (    IOException e) {
      log("String_Node_Str" + dst + "String_Node_Str"+ e.getMessage());
    }
  }
 else {
    for (    FetchedResource r : f.getResources()) {
      try {
        dlog(LogCategory.PROGRESS,"String_Node_Str" + r.getElement().fhirType() + "String_Node_Str"+ r.getId());
        Map<String,String> vars=makeVars(r);
        saveDirectResourceOutputs(f,r,vars);
        if (r.getResource() != null) {
switch (r.getResource().getResourceType()) {
case CodeSystem:
            generateOutputsCodeSystem(f,r,(CodeSystem)r.getResource(),vars);
          break;
case ValueSet:
        generateOutputsValueSet(f,r,(ValueSet)r.getResource(),vars);
      break;
case ConceptMap:
    generateOutputsConceptMap(f,r,(ConceptMap)r.getResource(),vars);
  break;
case CapabilityStatement:
generateOutputsCapabilityStatement(f,r,(CapabilityStatement)r.getResource(),vars);
break;
case StructureDefinition:
generateOutputsStructureDefinition(f,r,(StructureDefinition)r.getResource(),vars,regen);
break;
case StructureMap:
generateOutputsStructureMap(f,r,(StructureMap)r.getResource(),vars);
break;
default :
}
}
}
 catch (Exception e) {
log("String_Node_Str" + f.getName() + "String_Node_Str"+ r.getElement().fhirType()+ "String_Node_Str"+ r.getId()+ "String_Node_Str"+ e.getMessage());
e.printStackTrace();
for (StackTraceElement m : e.getStackTrace()) {
log("String_Node_Str" + m.toString());
}
}
}
}
}

Fixed version (ground truth):
private void generateOutputs(FetchedFile f,boolean regen) throws TransformerException {
  log("String_Node_Str" + f.getName() + "String_Node_Str"+ f.getPath());
  if (f.getProcessMode() == FetchedFile.PROCESS_NONE) {
    String dst=tempDir;
    if (f.getRelativePath().startsWith(File.separator))     dst=dst + f.getRelativePath();
 else     dst=dst + File.separator + f.getRelativePath();
    try {
      if (f.isFolder()) {
        f.getOutputNames().add(dst);
        Utilities.createDirectory(dst);
      }
 else       checkMakeFile(f.getSource(),dst,f.getOutputNames());
    }
 catch (    IOException e) {
      log("String_Node_Str" + dst + "String_Node_Str"+ e.getMessage());
    }
  }
 else   if (f.getProcessMode() == FetchedFile.PROCESS_XSLT) {
    String dst=tempDir;
    if (f.getRelativePath().startsWith(File.separator))     dst=dst + f.getRelativePath();
 else     dst=dst + File.separator + f.getRelativePath();
    try {
      if (f.isFolder()) {
        f.getOutputNames().add(dst);
        Utilities.createDirectory(dst);
      }
 else       checkMakeFile(transform(f.getSource(),f.getXslt()),dst,f.getOutputNames());
    }
 catch (    IOException e) {
      log("String_Node_Str" + dst + "String_Node_Str"+ e.getMessage());
    }
  }
 else {
    for (    FetchedResource r : f.getResources()) {
      try {
        dlog(LogCategory.PROGRESS,"String_Node_Str" + r.getElement().fhirType() + "String_Node_Str"+ r.getId());
        Map<String,String> vars=makeVars(r);
        saveDirectResourceOutputs(f,r,vars);
        if (r.getResource() != null) {
switch (r.getResource().getResourceType()) {
case CodeSystem:
            generateOutputsCodeSystem(f,r,(CodeSystem)r.getResource(),vars);
          break;
case ValueSet:
        generateOutputsValueSet(f,r,(ValueSet)r.getResource(),vars);
      break;
case ConceptMap:
    generateOutputsConceptMap(f,r,(ConceptMap)r.getResource(),vars);
  break;
case CapabilityStatement:
generateOutputsCapabilityStatement(f,r,(CapabilityStatement)r.getResource(),vars);
break;
case StructureDefinition:
generateOutputsStructureDefinition(f,r,(StructureDefinition)r.getResource(),vars,regen);
break;
case StructureMap:
generateOutputsStructureMap(f,r,(StructureMap)r.getResource(),vars);
break;
default :
}
}
}
 catch (Exception e) {
log("String_Node_Str" + f.getName() + "String_Node_Str"+ r.getElement().fhirType()+ "String_Node_Str"+ r.getId()+ "String_Node_Str"+ e.getMessage());
e.printStackTrace();
for (StackTraceElement m : e.getStackTrace()) {
log("String_Node_Str" + m.toString());
}
}
}
}
}