Program: 109419
Project: 109419
Buggy source:
@Override public void perform(GraphRewrite event,EvaluationContext context,ReportModel payload){
  String templatePath=payload.getTemplatePath();
  String outputFilename=payload.getReportFilename();
  ExecutionStatistics.get().begin("String_Node_Str" + templatePath + "String_Node_Str"+ outputFilename+ "String_Node_Str");
  try {
    ReportService reportService=new ReportService(event.getGraphContext());
    Path outputDir=Paths.get(reportService.getReportDirectory());
    if (!Files.isDirectory(outputDir)) {
      Files.createDirectories(outputDir);
    }
    Path outputPath=outputDir.resolve(outputFilename);
    LOG.info("String_Node_Str" + templatePath + "String_Node_Str"+ outputPath.toAbsolutePath().toString()+ "String_Node_Str");
    Configuration freemarkerConfig=new Configuration();
    freemarkerConfig.setTemplateLoader(new FurnaceFreeMarkerTemplateLoader());
    freemarkerConfig.setTemplateUpdateDelay(500);
    Template template=freemarkerConfig.getTemplate(templatePath);
    Variables varStack=Variables.instance(event);
    Map<String,Object> vars=FreeMarkerUtil.findFreeMarkerContextVariables(varStack,variableNames.toArray(new String[variableNames.size()]));
    if (useDefaultPayloadVariableName) {
      vars.put(DEFAULT_ITERATION_PAYLOAD_NAME,payload);
    }
    Map<String,Object> freeMarkerExtensions=FreeMarkerUtil.findFreeMarkerExtensions(furnace,event);
    Map<String,Object> objects=new HashMap<>(vars);
    objects.putAll(freeMarkerExtensions);
    try (FileWriter fw=new FileWriter(outputPath.toFile())){
      template.process(objects,fw);
    }
     FreeMarkerUtil.addAssociatedReportData(event.getGraphContext(),payload,vars);
  }
 catch (  IOException e) {
    LOG.log(Level.WARNING,"String_Node_Str" + templatePath + "String_Node_Str"+ outputFilename+ "String_Node_Str"+ e.getMessage(),e);
  }
catch (  TemplateException e) {
    LOG.log(Level.WARNING,"String_Node_Str" + templatePath + "String_Node_Str"+ outputFilename+ "String_Node_Str"+ e.getMessage(),e);
  }
 finally {
    ExecutionStatistics.get().end("String_Node_Str" + templatePath + "String_Node_Str"+ outputFilename+ "String_Node_Str");
  }
}

Fixed version (ground truth):
@Override public void perform(GraphRewrite event,EvaluationContext context,ReportModel payload){
  String templatePath=payload.getTemplatePath();
  String outputFilename=payload.getReportFilename();
  ExecutionStatistics.get().begin("String_Node_Str" + templatePath + "String_Node_Str"+ outputFilename+ "String_Node_Str");
  try {
    ReportService reportService=new ReportService(event.getGraphContext());
    Path outputDir=Paths.get(reportService.getReportDirectory());
    if (!Files.isDirectory(outputDir)) {
      Files.createDirectories(outputDir);
    }
    Path outputPath=outputDir.resolve(outputFilename);
    LOG.info("String_Node_Str" + templatePath + "String_Node_Str"+ outputPath.toAbsolutePath().toString()+ "String_Node_Str");
    Configuration freemarkerConfig=new Configuration(Configuration.DEFAULT_INCOMPATIBLE_IMPROVEMENTS);
    freemarkerConfig.setTemplateLoader(new FurnaceFreeMarkerTemplateLoader());
    freemarkerConfig.setTemplateUpdateDelayMilliseconds(3600);
    Template template=freemarkerConfig.getTemplate(templatePath);
    Variables varStack=Variables.instance(event);
    Map<String,Object> vars=FreeMarkerUtil.findFreeMarkerContextVariables(varStack,variableNames.toArray(new String[variableNames.size()]));
    if (useDefaultPayloadVariableName) {
      vars.put(DEFAULT_ITERATION_PAYLOAD_NAME,payload);
    }
    Map<String,Object> freeMarkerExtensions=FreeMarkerUtil.findFreeMarkerExtensions(furnace,event);
    Map<String,Object> objects=new HashMap<>(vars);
    objects.putAll(freeMarkerExtensions);
    try (FileWriter fw=new FileWriter(outputPath.toFile())){
      template.process(objects,fw);
    }
     FreeMarkerUtil.addAssociatedReportData(event.getGraphContext(),payload,vars);
  }
 catch (  IOException e) {
    LOG.log(Level.WARNING,"String_Node_Str" + templatePath + "String_Node_Str"+ outputFilename+ "String_Node_Str"+ e.getMessage(),e);
  }
catch (  TemplateException e) {
    LOG.log(Level.WARNING,"String_Node_Str" + templatePath + "String_Node_Str"+ outputFilename+ "String_Node_Str"+ e.getMessage(),e);
  }
 finally {
    ExecutionStatistics.get().end("String_Node_Str" + templatePath + "String_Node_Str"+ outputFilename+ "String_Node_Str");
  }
}