Program: 54196
Project: 54196
Buggy source:
@RequestMapping("String_Node_Str") public RestfulResponse suspendJobRecovery(JobQueueReq request){
  if (StringUtils.isEmpty(request.getJobId())) {
    return Builder.build(false,"String_Node_Str");
  }
  JobPo jobPo=appContext.getSuspendJobQueue().getJob(request.getJobId());
  if (jobPo == null) {
    return Builder.build(false,"String_Node_Str");
  }
  if (jobPo.isCron()) {
    Date nextTriggerTime=CronExpressionUtils.getNextTriggerTime(jobPo.getCronExpression());
    if (nextTriggerTime != null) {
      jobPo.setGmtModified(SystemClock.now());
      try {
        appContext.getCronJobQueue().add(jobPo);
      }
 catch (      DupEntryException e) {
        return Builder.build(false,"String_Node_Str");
      }
catch (      Exception e) {
        return Builder.build(false,"String_Node_Str" + e.getMessage());
      }
      if (jobPo.getRelyOnPrevCycle()) {
        try {
          jobPo.setTriggerTime(nextTriggerTime.getTime());
          appContext.getExecutableJobQueue().add(jobPo);
        }
 catch (        DupEntryException e) {
          return Builder.build(false,"String_Node_Str");
        }
catch (        Exception e) {
          return Builder.build(false,"String_Node_Str" + e.getMessage());
        }
      }
 else {
        Long lastGenerateTriggerTime=jobPo.getLastGenerateTriggerTime();
        if (lastGenerateTriggerTime == null || lastGenerateTriggerTime == 0) {
          lastGenerateTriggerTime=SystemClock.now();
        }
        appContext.getNoRelyJobGenerator().generateCronJobForInterval(jobPo,new Date(lastGenerateTriggerTime));
      }
    }
 else {
      return Builder.build(false,"String_Node_Str");
    }
  }
 else   if (jobPo.isRepeatable()) {
    if (jobPo.getRepeatCount() == -1 || jobPo.getRepeatedCount() < jobPo.getRepeatCount()) {
      jobPo.setGmtModified(SystemClock.now());
      try {
        appContext.getRepeatJobQueue().add(jobPo);
      }
 catch (      DupEntryException e) {
        return Builder.build(false,"String_Node_Str");
      }
catch (      Exception e) {
        return Builder.build(false,"String_Node_Str" + e.getMessage());
      }
      if (jobPo.getRelyOnPrevCycle()) {
        try {
          JobPo repeatJob=appContext.getRepeatJobQueue().getJob(request.getJobId());
          long nextTriggerTime=JobUtils.getRepeatNextTriggerTime(repeatJob);
          jobPo.setTriggerTime(nextTriggerTime);
          appContext.getExecutableJobQueue().add(jobPo);
        }
 catch (        DupEntryException e) {
          return Builder.build(false,"String_Node_Str");
        }
catch (        Exception e) {
          return Builder.build(false,"String_Node_Str" + e.getMessage());
        }
      }
 else {
        Long lastGenerateTriggerTime=jobPo.getLastGenerateTriggerTime();
        if (lastGenerateTriggerTime == null) {
          lastGenerateTriggerTime=SystemClock.now();
        }
        appContext.getNoRelyJobGenerator().generateRepeatJobForInterval(jobPo,new Date(lastGenerateTriggerTime));
      }
    }
 else {
      return Builder.build(false,"String_Node_Str");
    }
  }
  if (!appContext.getSuspendJobQueue().remove(request.getJobId())) {
    return Builder.build(false,"String_Node_Str");
  }
  JobLogUtils.log(LogType.RESUME,jobPo,appContext.getJobLogger());
  return Builder.build(true);
}

Fixed version (ground truth):
@RequestMapping("String_Node_Str") public RestfulResponse suspendJobRecovery(JobQueueReq request){
  if (StringUtils.isEmpty(request.getJobId())) {
    return Builder.build(false,"String_Node_Str");
  }
  JobPo jobPo=appContext.getSuspendJobQueue().getJob(request.getJobId());
  if (jobPo == null) {
    return Builder.build(false,"String_Node_Str");
  }
  if (jobPo.isCron()) {
    Date nextTriggerTime=CronExpressionUtils.getNextTriggerTime(jobPo.getCronExpression());
    if (nextTriggerTime != null) {
      jobPo.setGmtModified(SystemClock.now());
      try {
        appContext.getCronJobQueue().add(jobPo);
      }
 catch (      DupEntryException e) {
        return Builder.build(false,"String_Node_Str");
      }
catch (      Exception e) {
        return Builder.build(false,"String_Node_Str" + e.getMessage());
      }
      if (jobPo.getRelyOnPrevCycle()) {
        try {
          jobPo.setTriggerTime(nextTriggerTime.getTime());
          appContext.getExecutableJobQueue().add(jobPo);
        }
 catch (        DupEntryException e) {
          return Builder.build(false,"String_Node_Str");
        }
catch (        Exception e) {
          return Builder.build(false,"String_Node_Str" + e.getMessage());
        }
      }
 else {
        Long lastGenerateTriggerTime=jobPo.getLastGenerateTriggerTime();
        if (lastGenerateTriggerTime == null || lastGenerateTriggerTime == 0) {
          lastGenerateTriggerTime=SystemClock.now();
        }
        appContext.getNoRelyJobGenerator().generateCronJobForInterval(jobPo,new Date(lastGenerateTriggerTime));
      }
    }
 else {
      return Builder.build(false,"String_Node_Str");
    }
  }
 else   if (jobPo.isRepeatable()) {
    if (jobPo.getRepeatCount() == -1 || jobPo.getRepeatedCount() < jobPo.getRepeatCount()) {
      jobPo.setGmtModified(SystemClock.now());
      try {
        appContext.getRepeatJobQueue().add(jobPo);
      }
 catch (      DupEntryException e) {
        return Builder.build(false,"String_Node_Str");
      }
catch (      Exception e) {
        return Builder.build(false,"String_Node_Str" + e.getMessage());
      }
      if (jobPo.getRelyOnPrevCycle()) {
        try {
          JobPo repeatJob=appContext.getRepeatJobQueue().getJob(request.getJobId());
          long nextTriggerTime=JobUtils.getRepeatNextTriggerTime(repeatJob);
          jobPo.setTriggerTime(nextTriggerTime);
          appContext.getExecutableJobQueue().add(jobPo);
        }
 catch (        DupEntryException e) {
          return Builder.build(false,"String_Node_Str");
        }
catch (        Exception e) {
          return Builder.build(false,"String_Node_Str" + e.getMessage());
        }
      }
 else {
        Long lastGenerateTriggerTime=jobPo.getLastGenerateTriggerTime();
        if (lastGenerateTriggerTime == null || lastGenerateTriggerTime == 0) {
          lastGenerateTriggerTime=SystemClock.now();
        }
        appContext.getNoRelyJobGenerator().generateRepeatJobForInterval(jobPo,new Date(lastGenerateTriggerTime));
      }
    }
 else {
      return Builder.build(false,"String_Node_Str");
    }
  }
  if (!appContext.getSuspendJobQueue().remove(request.getJobId())) {
    return Builder.build(false,"String_Node_Str");
  }
  JobLogUtils.log(LogType.RESUME,jobPo,appContext.getJobLogger());
  return Builder.build(true);
}