Program: 90005
Project: 90005
Buggy source:
/** 
 * {@inheritDoc}
 */
@Override public void executeTask(@NotNull final Map<String,Object> context) throws GenieException, IOException {
  final long start=System.nanoTime();
  try {
    final JobExecutionEnvironment jobExecEnv=(JobExecutionEnvironment)context.get(JobConstants.JOB_EXECUTION_ENV_KEY);
    final String jobWorkingDirectory=jobExecEnv.getJobWorkingDir().getCanonicalPath();
    final Writer writer=(Writer)context.get(JobConstants.WRITER_KEY);
    final String jobId=jobExecEnv.getJobRequest().getId().orElseThrow(() -> new GeniePreconditionException("String_Node_Str"));
    log.info("String_Node_Str",jobId);
    try {
      writer.flush();
      writer.close();
    }
 catch (    IOException e) {
      throw new GenieServerException("String_Node_Str" + e);
    }
    final String runScript=jobWorkingDirectory + JobConstants.FILE_PATH_DELIMITER + JobConstants.GENIE_JOB_LAUNCHER_SCRIPT;
    if (this.isUserCreationEnabled) {
      final String user=jobExecEnv.getJobRequest().getUser();
      this.createUser(user,jobExecEnv.getJobRequest().getGroup().orElse(null));
    }
    final List<String> command=new ArrayList<>();
    if (this.isRunAsUserEnabled) {
      changeOwnershipOfDirectory(jobWorkingDirectory,jobExecEnv.getJobRequest().getUser());
      makeDirGroupWritable(jobWorkingDirectory + "String_Node_Str");
      command.add("String_Node_Str");
      command.add("String_Node_Str");
      command.add(jobExecEnv.getJobRequest().getUser());
    }
    if (SystemUtils.IS_OS_LINUX) {
      command.add("String_Node_Str");
    }
    command.add(runScript);
    final ProcessBuilder pb=new ProcessBuilder(command);
    pb.directory(jobExecEnv.getJobWorkingDir());
    pb.redirectOutput(new File(jobExecEnv.getJobWorkingDir() + JobConstants.GENIE_LOG_PATH));
    pb.redirectError(new File(jobExecEnv.getJobWorkingDir() + JobConstants.GENIE_LOG_PATH));
    try {
      final Process process=pb.start();
      final int processId=this.getProcessId(process);
      final JobRequest request=jobExecEnv.getJobRequest();
      final Calendar calendar=Calendar.getInstance(UTC);
      calendar.add(Calendar.SECOND,request.getTimeout().orElse(JobRequest.DEFAULT_TIMEOUT_DURATION));
      final JobExecution jobExecution=new JobExecution.Builder(this.hostname).withId(jobId).withProcessId(processId).withCheckDelay(jobExecEnv.getCommand().getCheckDelay()).withTimeout(calendar.getTime()).withMemory(jobExecEnv.getMemory()).build();
      context.put(JobConstants.JOB_EXECUTION_DTO_KEY,jobExecution);
    }
 catch (    final IOException ie) {
      throw new GenieServerException("String_Node_Str" + String.valueOf(command),ie);
    }
    log.info("String_Node_Str",jobExecEnv.getJobRequest().getId());
  }
  finally {
    final long finish=System.nanoTime();
    this.timer.record(finish - start,TimeUnit.NANOSECONDS);
  }
}

Fixed version (ground truth):
/** 
 * {@inheritDoc}
 */
@Override public void executeTask(@NotNull final Map<String,Object> context) throws GenieException, IOException {
  final long start=System.nanoTime();
  try {
    final JobExecutionEnvironment jobExecEnv=(JobExecutionEnvironment)context.get(JobConstants.JOB_EXECUTION_ENV_KEY);
    final String jobWorkingDirectory=jobExecEnv.getJobWorkingDir().getCanonicalPath();
    final JobRequest jobRequest=jobExecEnv.getJobRequest();
    final String user=jobRequest.getUser();
    final Writer writer=(Writer)context.get(JobConstants.WRITER_KEY);
    final String jobId=jobRequest.getId().orElseThrow(() -> new GeniePreconditionException("String_Node_Str"));
    log.info("String_Node_Str",jobId);
    try {
      writer.flush();
      writer.close();
    }
 catch (    IOException e) {
      throw new GenieServerException("String_Node_Str" + e);
    }
    if (isUserCreationEnabled) {
      createUser(user,jobRequest.getGroup().orElse(null));
    }
    final List<String> command=new ArrayList<>();
    if (isRunAsUserEnabled) {
      changeOwnershipOfDirectory(jobWorkingDirectory,user);
      makeDirGroupWritable(jobWorkingDirectory + "String_Node_Str");
      command.add("String_Node_Str");
      command.add("String_Node_Str");
      command.add(user);
    }
    if (SystemUtils.IS_OS_LINUX) {
      command.add("String_Node_Str");
    }
    final String runScript=jobWorkingDirectory + JobConstants.FILE_PATH_DELIMITER + JobConstants.GENIE_JOB_LAUNCHER_SCRIPT;
    command.add(runScript);
    final ProcessBuilder pb=new ProcessBuilder(command).directory(jobExecEnv.getJobWorkingDir()).redirectOutput(new File(jobExecEnv.getJobWorkingDir() + JobConstants.GENIE_LOG_PATH)).redirectError(new File(jobExecEnv.getJobWorkingDir() + JobConstants.GENIE_LOG_PATH));
    canExecute(runScript);
    try {
      final Process process=pb.start();
      final int processId=this.getProcessId(process);
      final Calendar calendar=Calendar.getInstance(UTC);
      calendar.add(Calendar.SECOND,jobRequest.getTimeout().orElse(JobRequest.DEFAULT_TIMEOUT_DURATION));
      final JobExecution jobExecution=new JobExecution.Builder(this.hostname).withId(jobId).withProcessId(processId).withCheckDelay(jobExecEnv.getCommand().getCheckDelay()).withTimeout(calendar.getTime()).withMemory(jobExecEnv.getMemory()).build();
      context.put(JobConstants.JOB_EXECUTION_DTO_KEY,jobExecution);
    }
 catch (    final IOException ie) {
      throw new GenieServerException("String_Node_Str" + String.valueOf(command),ie);
    }
    log.info("String_Node_Str",jobId);
  }
  finally {
    final long finish=System.nanoTime();
    this.timer.record(finish - start,TimeUnit.NANOSECONDS);
  }
}