Program: 47389
Project: 47389
Buggy source:
public Job createJob(JobScheduleRequest scheduleRequest) throws IOException, SchedulerException, IllegalAccessException {
  boolean runInBackground=scheduleRequest.getSimpleJobTrigger() == null && scheduleRequest.getComplexJobTrigger() == null && scheduleRequest.getCronJobTrigger() == null;
  if (!runInBackground && !policy.isAllowed(SchedulerAction.NAME)) {
    throw new SecurityException();
  }
  boolean hasInputFile=!StringUtils.isEmpty(scheduleRequest.getInputFile());
  RepositoryFile file=null;
  if (hasInputFile) {
    try {
      file=getRepository().getFile(scheduleRequest.getInputFile());
    }
 catch (    UnifiedRepositoryException ure) {
      hasInputFile=false;
      logger.warn(ure.getMessage(),ure);
    }
  }
  if (hasInputFile && StringUtils.isEmpty(scheduleRequest.getJobName())) {
    scheduleRequest.setJobName(file.getName().substring(0,file.getName().lastIndexOf("String_Node_Str")));
  }
 else   if (!StringUtils.isEmpty(scheduleRequest.getActionClass())) {
    String actionClass=scheduleRequest.getActionClass().substring(scheduleRequest.getActionClass().lastIndexOf("String_Node_Str") + 1);
    scheduleRequest.setJobName(actionClass);
  }
 else   if (!hasInputFile && StringUtils.isEmpty(scheduleRequest.getJobName())) {
    scheduleRequest.setJobName("String_Node_Str" + System.currentTimeMillis());
  }
  if (hasInputFile) {
    Map<String,Serializable> metadata=getRepository().getFileMetadata(file.getId());
    if (metadata.containsKey("String_Node_Str")) {
      boolean schedulable=Boolean.parseBoolean((String)metadata.get("String_Node_Str"));
      if (!schedulable) {
        throw new IllegalAccessException();
      }
    }
  }
  Job job=null;
  IJobTrigger jobTrigger=SchedulerResourceUtil.convertScheduleRequestToJobTrigger(scheduleRequest);
  HashMap<String,Serializable> parameterMap=new HashMap<String,Serializable>();
  for (  JobScheduleParam param : scheduleRequest.getJobParameters()) {
    parameterMap.put(param.getName(),param.getValue());
  }
  if (isPdiFile(file)) {
    parameterMap=handlePDIScheduling(file,parameterMap);
  }
  parameterMap.put(LocaleHelper.USER_LOCALE_PARAM,LocaleHelper.getLocale());
  if (hasInputFile) {
    SchedulerOutputPathResolver outputPathResolver=getSchedulerOutputPathResolver(scheduleRequest);
    String outputFile=outputPathResolver.resolveOutputFilePath();
    String actionId=getExtension(scheduleRequest.getInputFile()) + "String_Node_Str";
    job=getScheduler().createJob(scheduleRequest.getJobName(),actionId,parameterMap,jobTrigger,new RepositoryFileStreamProvider(scheduleRequest.getInputFile(),outputFile,getAutoCreateUniqueFilename(scheduleRequest)));
  }
 else {
    String actionClass=scheduleRequest.getActionClass();
    try {
      @SuppressWarnings("String_Node_Str") Class<IAction> iaction=getAction(actionClass);
      job=getScheduler().createJob(scheduleRequest.getJobName(),iaction,parameterMap,jobTrigger);
    }
 catch (    ClassNotFoundException e) {
      throw new RuntimeException(e);
    }
  }
  return job;
}

Fixed version (ground truth):
public Job createJob(JobScheduleRequest scheduleRequest) throws IOException, SchedulerException, IllegalAccessException {
  boolean runInBackground=scheduleRequest.getSimpleJobTrigger() == null && scheduleRequest.getComplexJobTrigger() == null && scheduleRequest.getCronJobTrigger() == null;
  if (!runInBackground && !getPolicy().isAllowed(SchedulerAction.NAME)) {
    throw new SecurityException();
  }
  boolean hasInputFile=!StringUtils.isEmpty(scheduleRequest.getInputFile());
  RepositoryFile file=null;
  if (hasInputFile) {
    try {
      file=getRepository().getFile(scheduleRequest.getInputFile());
    }
 catch (    UnifiedRepositoryException ure) {
      hasInputFile=false;
      logger.warn(ure.getMessage(),ure);
    }
  }
  if (hasInputFile && StringUtils.isEmpty(scheduleRequest.getJobName())) {
    scheduleRequest.setJobName(file.getName().substring(0,file.getName().lastIndexOf("String_Node_Str")));
  }
 else   if (!StringUtils.isEmpty(scheduleRequest.getActionClass())) {
    String actionClass=scheduleRequest.getActionClass().substring(scheduleRequest.getActionClass().lastIndexOf("String_Node_Str") + 1);
    scheduleRequest.setJobName(actionClass);
  }
 else   if (!hasInputFile && StringUtils.isEmpty(scheduleRequest.getJobName())) {
    scheduleRequest.setJobName("String_Node_Str" + System.currentTimeMillis());
  }
  if (hasInputFile) {
    Map<String,Serializable> metadata=getRepository().getFileMetadata(file.getId());
    if (metadata.containsKey("String_Node_Str")) {
      boolean schedulable=Boolean.parseBoolean((String)metadata.get("String_Node_Str"));
      if (!schedulable) {
        throw new IllegalAccessException();
      }
    }
  }
  Job job=null;
  IJobTrigger jobTrigger=SchedulerResourceUtil.convertScheduleRequestToJobTrigger(scheduleRequest);
  HashMap<String,Serializable> parameterMap=new HashMap<String,Serializable>();
  for (  JobScheduleParam param : scheduleRequest.getJobParameters()) {
    parameterMap.put(param.getName(),param.getValue());
  }
  if (isPdiFile(file)) {
    parameterMap=handlePDIScheduling(file,parameterMap);
  }
  parameterMap.put(LocaleHelper.USER_LOCALE_PARAM,LocaleHelper.getLocale());
  if (hasInputFile) {
    SchedulerOutputPathResolver outputPathResolver=getSchedulerOutputPathResolver(scheduleRequest);
    String outputFile=outputPathResolver.resolveOutputFilePath();
    String actionId=getExtension(scheduleRequest.getInputFile()) + "String_Node_Str";
    job=getScheduler().createJob(scheduleRequest.getJobName(),actionId,parameterMap,jobTrigger,new RepositoryFileStreamProvider(scheduleRequest.getInputFile(),outputFile,getAutoCreateUniqueFilename(scheduleRequest)));
  }
 else {
    String actionClass=scheduleRequest.getActionClass();
    try {
      @SuppressWarnings("String_Node_Str") Class<IAction> iaction=getAction(actionClass);
      job=getScheduler().createJob(scheduleRequest.getJobName(),iaction,parameterMap,jobTrigger);
    }
 catch (    ClassNotFoundException e) {
      throw new RuntimeException(e);
    }
  }
  return job;
}