Program: 54177
Project: 54177
Buggy source:
public static void addRepeatJobForInterval(ExecutableJobQueue executableJobQueue,RepeatJobQueue repeatJobQueue,int scheduleIntervalMinute,final JobPo finalJobPo,Date lastGenerateTime){
  JobPo jobPo=JobUtils.copy(finalJobPo);
  long firstTriggerTime=Long.valueOf(jobPo.getInternalExtParam(Constants.FIRST_FIRE_TIME));
  Long repeatInterval=jobPo.getRepeatInterval();
  Integer repeatCount=jobPo.getRepeatCount();
  long endTime=DateUtils.addMinute(lastGenerateTime,scheduleIntervalMinute).getTime();
  if (endTime <= firstTriggerTime) {
    return;
  }
  int repeatedCount=Long.valueOf((lastGenerateTime.getTime() - firstTriggerTime) / jobPo.getRepeatInterval()).intValue();
  boolean stop=false;
  while (!stop) {
    Long nextTriggerTime=firstTriggerTime + repeatedCount * repeatInterval;
    if (nextTriggerTime <= endTime && (repeatCount == -1 || repeatedCount <= repeatCount)) {
      jobPo.setTriggerTime(nextTriggerTime);
      jobPo.setJobId(JobUtils.generateJobId());
      jobPo.setTaskId(finalJobPo.getTaskId() + "String_Node_Str" + DateUtils.format(new Date(nextTriggerTime),"String_Node_Str"));
      jobPo.setRepeatedCount(repeatedCount);
      jobPo.setInternalExtParam(Constants.ONCE,Boolean.TRUE.toString());
      try {
        jobPo.setInternalExtParam(Constants.EXE_SEQ_ID,JobUtils.generateExeSeqId(jobPo));
        executableJobQueue.add(jobPo);
      }
 catch (      DupEntryException e) {
        LOGGER.warn("String_Node_Str",jobPo.getTaskId(),jobPo.getTaskTrackerNodeGroup());
      }
      repeatedCount++;
    }
 else {
      stop=true;
    }
  }
  repeatJobQueue.updateLastGenerateTriggerTime(finalJobPo.getJobId(),endTime);
  if (LOGGER.isDebugEnabled()) {
    LOGGER.debug("String_Node_Str",jobPo,DateUtils.formatYMD_HMS(new Date(endTime)));
  }
}

Fixed version (ground truth):
public static void addRepeatJobForInterval(ExecutableJobQueue executableJobQueue,RepeatJobQueue repeatJobQueue,int scheduleIntervalMinute,final JobPo finalJobPo,Date lastGenerateTime){
  JobPo jobPo=JobUtils.copy(finalJobPo);
  long firstTriggerTime=Long.valueOf(jobPo.getInternalExtParam(Constants.FIRST_FIRE_TIME));
  Long repeatInterval=jobPo.getRepeatInterval();
  Integer repeatCount=jobPo.getRepeatCount();
  long endTime=DateUtils.addMinute(lastGenerateTime,scheduleIntervalMinute).getTime();
  if (endTime <= firstTriggerTime) {
    return;
  }
  int repeatedCount=Long.valueOf((lastGenerateTime.getTime() - firstTriggerTime) / jobPo.getRepeatInterval()).intValue();
  if (repeatedCount < 0) {
    repeatedCount=0;
  }
  boolean stop=false;
  while (!stop) {
    Long nextTriggerTime=firstTriggerTime + repeatedCount * repeatInterval;
    if (nextTriggerTime <= endTime && (repeatCount == -1 || repeatedCount <= repeatCount)) {
      jobPo.setTriggerTime(nextTriggerTime);
      jobPo.setJobId(JobUtils.generateJobId());
      jobPo.setTaskId(finalJobPo.getTaskId() + "String_Node_Str" + DateUtils.format(new Date(nextTriggerTime),"String_Node_Str"));
      jobPo.setRepeatedCount(repeatedCount);
      jobPo.setInternalExtParam(Constants.ONCE,Boolean.TRUE.toString());
      try {
        jobPo.setInternalExtParam(Constants.EXE_SEQ_ID,JobUtils.generateExeSeqId(jobPo));
        executableJobQueue.add(jobPo);
      }
 catch (      DupEntryException e) {
        LOGGER.warn("String_Node_Str",jobPo.getTaskId(),jobPo.getTaskTrackerNodeGroup());
      }
      repeatedCount++;
    }
 else {
      stop=true;
    }
  }
  repeatJobQueue.updateLastGenerateTriggerTime(finalJobPo.getJobId(),endTime);
  if (LOGGER.isDebugEnabled()) {
    LOGGER.debug("String_Node_Str",jobPo,DateUtils.formatYMD_HMS(new Date(endTime)));
  }
}