Program: 89589
Project: 89589
Buggy source:
@Override public int generateJobs(HarvestDefinition harvest){
  log.info("String_Node_Str" + harvest.getOid());
  int jobsMade=0;
  final Iterator<DomainConfiguration> domainConfigurations=harvest.getDomainConfigurations();
  while (domainConfigurations.hasNext()) {
    List<DomainConfiguration> subset=new ArrayList<DomainConfiguration>();
    while (domainConfigurations.hasNext() && subset.size() < DOMAIN_CONFIG_SUBSET_SIZE) {
      subset.add(domainConfigurations.next());
    }
    Collections.sort(subset,getDomainConfigurationSubsetComparator(harvest));
    jobsMade+=processDomainConfigurationSubset(harvest,subset.iterator());
  }
  harvest.setNumEvents(harvest.getNumEvents() + 1);
  if (!harvest.isSnapShot()) {
    PartialHarvest focused=(PartialHarvest)harvest;
    Schedule schedule=focused.getSchedule();
    int numEvents=harvest.getNumEvents();
    Date now=new Date();
    Date nextEvent=schedule.getNextEvent(focused.getNextDate(),numEvents);
    if (nextEvent != null && nextEvent.before(now)) {
      int eventsSkipped=0;
      while (nextEvent != null && nextEvent.before(now)) {
        nextEvent=schedule.getNextEvent(nextEvent,numEvents);
        eventsSkipped++;
      }
      if (log.isWarnEnabled()) {
        log.warn("String_Node_Str" + harvest.getName() + "String_Node_Str"+ eventsSkipped+ "String_Node_Str"+ focused.getNextDate()+ "String_Node_Str"+ nextEvent);
      }
    }
    focused.setNextDate(nextEvent);
    if (log.isTraceEnabled()) {
      log.trace("String_Node_Str" + harvest.getName() + "String_Node_Str"+ (nextEvent == null ? "String_Node_Str" : nextEvent.toString()));
    }
  }
  return jobsMade;
}

Fixed version (ground truth):
@Override public int generateJobs(HarvestDefinition harvest){
  log.info("String_Node_Str" + harvest.getOid());
  int jobsMade=0;
  final Iterator<DomainConfiguration> domainConfigurations=harvest.getDomainConfigurations();
  while (domainConfigurations.hasNext()) {
    List<DomainConfiguration> subset=new ArrayList<DomainConfiguration>();
    while (domainConfigurations.hasNext() && subset.size() < DOMAIN_CONFIG_SUBSET_SIZE) {
      subset.add(domainConfigurations.next());
    }
    Collections.sort(subset,getDomainConfigurationSubsetComparator(harvest));
    jobsMade+=processDomainConfigurationSubset(harvest,subset.iterator());
  }
  harvest.setNumEvents(harvest.getNumEvents() + 1);
  if (!harvest.isSnapShot()) {
    PartialHarvest focused=(PartialHarvest)harvest;
    Schedule schedule=focused.getSchedule();
    int numEvents=harvest.getNumEvents();
    Date now=new Date();
    Date nextEvent=schedule.getNextEvent(focused.getNextDate(),numEvents);
    if (nextEvent != null && nextEvent.before(now)) {
      int eventsSkipped=0;
      while (nextEvent != null && nextEvent.before(now)) {
        nextEvent=schedule.getNextEvent(nextEvent,numEvents);
        eventsSkipped++;
      }
      if (log.isWarnEnabled()) {
        log.warn("String_Node_Str" + harvest.getName() + "String_Node_Str"+ eventsSkipped+ "String_Node_Str"+ focused.getNextDate()+ "String_Node_Str"+ nextEvent);
      }
    }
    focused.setNextDate(nextEvent);
    if (log.isTraceEnabled()) {
      log.trace("String_Node_Str" + harvest.getName() + "String_Node_Str"+ (nextEvent == null ? "String_Node_Str" : nextEvent.toString()));
    }
  }
  log.info("String_Node_Str" + jobsMade + "String_Node_Str"+ harvest.getOid());
  return jobsMade;
}