Program: 189375
Project: 189375
Buggy source:
/** 
 * Download a back export. This may take a considerable amount of time, so we use play's asynchronous features to suspend the current thread until the next chunk of data is ready to be published.
 * @param packager The packager to use for the export.
 */
@Security(RoleType.REVIEWER) public static void batchExport(){
  String packager=params.get("String_Node_Str");
  String packager_extra=params.get("String_Node_Str");
  long saved_filter_id=-1;
  if (packager_extra != null && packager_extra.equals("String_Node_Str")) {
    saved_filter_id=Long.parseLong(params.get("String_Node_Str"));
  }
  SearchFilter filter=getActiveSearchFilter(SUBMISSION);
  if (saved_filter_id >= 0) {
    filter=subRepo.findSearchFilter(saved_filter_id);
  }
  Packager exportPackage=(Packager)Spring.getBean(packager);
  Logger.info("String_Node_Str",context.getPerson().getFormattedName(NameFormat.FIRST_LAST),context.getPerson().getId(),context.getPerson().getEmail(),exportPackage == null ? "String_Node_Str" : exportPackage.getBeanName(),filter == null ? "String_Node_Str" : (filter instanceof ActiveSearchFilter ? ((ActiveSearchFilter)filter).encode() : filter instanceof NamedSearchFilter ? ((NamedSearchFilter)filter).getName() : "String_Node_Str"));
  ExportService exportService=(ExportService)Spring.getBean(exportPackage.getExportServiceBeanName());
  ChunkStream stream=exportService.export(exportPackage,filter);
  response.contentType=stream.getContentType();
  response.setHeader("String_Node_Str",stream.getContentDisposition());
  response.setHeader("String_Node_Str","String_Node_Str");
  response.setHeader("String_Node_Str","String_Node_Str");
  while (stream.hasNextChunk()) {
    Promise<byte[]> nextChunk=stream.nextChunk();
    byte[] chunk=await(nextChunk);
    response.writeChunk(chunk);
  }
}

Fixed version (ground truth):
/** 
 * Download a back export. This may take a considerable amount of time, so we use play's asynchronous features to suspend the current thread until the next chunk of data is ready to be published.
 * @param packager The packager to use for the export.
 */
@Security(RoleType.REVIEWER) public static void batchExport(){
  String packager=params.get("String_Node_Str");
  String packager_extra=params.get("String_Node_Str");
  long saved_filter_id=-1;
  if (packager_extra != null && packager_extra.equals("String_Node_Str")) {
    saved_filter_id=Long.parseLong(params.get("String_Node_Str"));
  }
  ActiveSearchFilter filter=getActiveSearchFilter(SUBMISSION);
  if (saved_filter_id >= 0) {
    filter.copyFrom(subRepo.findSearchFilter(saved_filter_id));
  }
  Packager exportPackage=(Packager)Spring.getBean(packager);
  Logger.info("String_Node_Str",context.getPerson().getFormattedName(NameFormat.FIRST_LAST),context.getPerson().getId(),context.getPerson().getEmail(),exportPackage == null ? "String_Node_Str" : exportPackage.getBeanName(),filter == null ? "String_Node_Str" : filter.encode());
  ExportService exportService=(ExportService)Spring.getBean(exportPackage.getExportServiceBeanName());
  ChunkStream stream=exportService.export(exportPackage,filter);
  response.contentType=stream.getContentType();
  response.setHeader("String_Node_Str",stream.getContentDisposition());
  response.setHeader("String_Node_Str","String_Node_Str");
  response.setHeader("String_Node_Str","String_Node_Str");
  while (stream.hasNextChunk()) {
    Promise<byte[]> nextChunk=stream.nextChunk();
    byte[] chunk=await(nextChunk);
    response.writeChunk(chunk);
  }
}