Program: 169150
Project: 169150
Buggy source:
/** 
 * Inform the <code>JobStore</code> that the scheduler is now firing the given <code>Trigger</code> (executing its associated <code>Job</code>), that it had previously acquired (reserved).
 * @param triggers a list of triggers
 * @param jedis a thread-safe Redis connection
 * @return may return null if all the triggers or their calendars no longer exist, orif the trigger was not successfully put into the 'executing' state.  Preference is to return an empty list if none of the triggers could be fired.
 */
@Override public List<TriggerFiredResult> triggersFired(List<OperableTrigger> triggers,Jedis jedis) throws JobPersistenceException, ClassNotFoundException {
  List<TriggerFiredResult> results=new ArrayList<>();
  for (  OperableTrigger trigger : triggers) {
    final String triggerHashKey=redisSchema.triggerHashKey(trigger.getKey());
    logger.debug(String.format("String_Node_Str",triggerHashKey));
    Pipeline pipe=jedis.pipelined();
    Response<Boolean> triggerExistsResponse=pipe.exists(triggerHashKey);
    Response<Double> triggerAcquiredResponse=pipe.zscore(redisSchema.triggerStateKey(RedisTriggerState.ACQUIRED),triggerHashKey);
    pipe.sync();
    if (!triggerExistsResponse.get() || triggerAcquiredResponse.get() == null) {
      if (!triggerExistsResponse.get()) {
        logger.debug(String.format("String_Node_Str",triggerHashKey));
      }
 else {
        logger.debug(String.format("String_Node_Str",triggerHashKey));
      }
      continue;
    }
    Calendar calendar=null;
    final String calendarName=trigger.getCalendarName();
    if (calendarName != null) {
      calendar=retrieveCalendar(calendarName,jedis);
      if (calendar == null) {
        continue;
      }
    }
    final Date previousFireTime=trigger.getPreviousFireTime();
    trigger.triggered(calendar);
    final long nextFireTime=trigger.getNextFireTime().getTime();
    jedis.hset(triggerHashKey,TRIGGER_NEXT_FIRE_TIME,Long.toString(nextFireTime));
    setTriggerState(RedisTriggerState.WAITING,(double)nextFireTime,triggerHashKey,jedis);
    JobDetail job=retrieveJob(trigger.getJobKey(),jedis);
    TriggerFiredBundle triggerFiredBundle=new TriggerFiredBundle(job,trigger,calendar,false,new Date(),previousFireTime,previousFireTime,trigger.getNextFireTime());
    if (isJobConcurrentExecutionDisallowed(job.getJobClass())) {
      if (logger.isTraceEnabled()) {
        logger.trace("String_Node_Str" + trigger.getKey() + "String_Node_Str"+ job.getKey()+ "String_Node_Str");
      }
      final String jobHashKey=redisSchema.jobHashKey(trigger.getJobKey());
      final String jobTriggerSetKey=redisSchema.jobTriggersSetKey(job.getKey());
      for (      String nonConcurrentTriggerHashKey : jedis.smembers(jobTriggerSetKey)) {
        Double score=jedis.zscore(redisSchema.triggerStateKey(RedisTriggerState.WAITING),nonConcurrentTriggerHashKey);
        if (score != null) {
          if (logger.isTraceEnabled()) {
            logger.trace("String_Node_Str" + trigger.getKey() + "String_Node_Str"+ job.getKey()+ "String_Node_Str");
          }
          setTriggerState(RedisTriggerState.BLOCKED,score,nonConcurrentTriggerHashKey,jedis);
        }
 else {
          score=jedis.zscore(redisSchema.triggerStateKey(RedisTriggerState.PAUSED),nonConcurrentTriggerHashKey);
          if (score != null) {
            if (logger.isTraceEnabled()) {
              logger.trace("String_Node_Str" + trigger.getKey() + "String_Node_Str"+ job.getKey()+ "String_Node_Str");
            }
            setTriggerState(RedisTriggerState.PAUSED_BLOCKED,score,nonConcurrentTriggerHashKey,jedis);
          }
        }
      }
      pipe=jedis.pipelined();
      pipe.set(redisSchema.jobBlockedKey(job.getKey()),schedulerInstanceId);
      pipe.sadd(redisSchema.blockedJobsSet(),jobHashKey);
      pipe.sync();
    }
 else     if (trigger.getNextFireTime() != null) {
      jedis.hset(triggerHashKey,TRIGGER_NEXT_FIRE_TIME,Long.toString(nextFireTime));
      logger.debug(String.format("String_Node_Str",triggerHashKey,nextFireTime));
      setTriggerState(RedisTriggerState.WAITING,(double)nextFireTime,triggerHashKey,jedis);
    }
 else {
      jedis.hset(triggerHashKey,TRIGGER_NEXT_FIRE_TIME,"String_Node_Str");
      unsetTriggerState(triggerHashKey,jedis);
    }
    results.add(new TriggerFiredResult(triggerFiredBundle));
  }
  return results;
}

Fixed version (ground truth):
/** 
 * Inform the <code>JobStore</code> that the scheduler is now firing the given <code>Trigger</code> (executing its associated <code>Job</code>), that it had previously acquired (reserved).
 * @param triggers a list of triggers
 * @param jedis a thread-safe Redis connection
 * @return may return null if all the triggers or their calendars no longer exist, orif the trigger was not successfully put into the 'executing' state.  Preference is to return an empty list if none of the triggers could be fired.
 */
@Override public List<TriggerFiredResult> triggersFired(List<OperableTrigger> triggers,Jedis jedis) throws JobPersistenceException, ClassNotFoundException {
  List<TriggerFiredResult> results=new ArrayList<>();
  for (  OperableTrigger trigger : triggers) {
    final String triggerHashKey=redisSchema.triggerHashKey(trigger.getKey());
    logger.debug(String.format("String_Node_Str",triggerHashKey));
    Pipeline pipe=jedis.pipelined();
    Response<Boolean> triggerExistsResponse=pipe.exists(triggerHashKey);
    Response<Double> triggerAcquiredResponse=pipe.zscore(redisSchema.triggerStateKey(RedisTriggerState.ACQUIRED),triggerHashKey);
    pipe.sync();
    if (!triggerExistsResponse.get() || triggerAcquiredResponse.get() == null) {
      if (!triggerExistsResponse.get()) {
        logger.debug(String.format("String_Node_Str",triggerHashKey));
      }
 else {
        logger.debug(String.format("String_Node_Str",triggerHashKey));
      }
      continue;
    }
    Calendar calendar=null;
    final String calendarName=trigger.getCalendarName();
    if (calendarName != null) {
      calendar=retrieveCalendar(calendarName,jedis);
      if (calendar == null) {
        continue;
      }
    }
    final Date previousFireTime=trigger.getPreviousFireTime();
    trigger.triggered(calendar);
    final Date nextFireDate=trigger.getNextFireTime();
    long nextFireTime=0;
    if (nextFireDate != null) {
      nextFireTime=nextFireDate.getTime();
      jedis.hset(triggerHashKey,TRIGGER_NEXT_FIRE_TIME,Long.toString(nextFireTime));
      setTriggerState(RedisTriggerState.WAITING,(double)nextFireTime,triggerHashKey,jedis);
    }
    JobDetail job=retrieveJob(trigger.getJobKey(),jedis);
    TriggerFiredBundle triggerFiredBundle=new TriggerFiredBundle(job,trigger,calendar,false,new Date(),previousFireTime,previousFireTime,nextFireDate);
    if (isJobConcurrentExecutionDisallowed(job.getJobClass())) {
      if (logger.isTraceEnabled()) {
        logger.trace("String_Node_Str" + trigger.getKey() + "String_Node_Str"+ job.getKey()+ "String_Node_Str");
      }
      final String jobHashKey=redisSchema.jobHashKey(trigger.getJobKey());
      final String jobTriggerSetKey=redisSchema.jobTriggersSetKey(job.getKey());
      for (      String nonConcurrentTriggerHashKey : jedis.smembers(jobTriggerSetKey)) {
        Double score=jedis.zscore(redisSchema.triggerStateKey(RedisTriggerState.WAITING),nonConcurrentTriggerHashKey);
        if (score != null) {
          if (logger.isTraceEnabled()) {
            logger.trace("String_Node_Str" + trigger.getKey() + "String_Node_Str"+ job.getKey()+ "String_Node_Str");
          }
          setTriggerState(RedisTriggerState.BLOCKED,score,nonConcurrentTriggerHashKey,jedis);
        }
 else {
          score=jedis.zscore(redisSchema.triggerStateKey(RedisTriggerState.PAUSED),nonConcurrentTriggerHashKey);
          if (score != null) {
            if (logger.isTraceEnabled()) {
              logger.trace("String_Node_Str" + trigger.getKey() + "String_Node_Str"+ job.getKey()+ "String_Node_Str");
            }
            setTriggerState(RedisTriggerState.PAUSED_BLOCKED,score,nonConcurrentTriggerHashKey,jedis);
          }
        }
      }
      pipe=jedis.pipelined();
      pipe.set(redisSchema.jobBlockedKey(job.getKey()),schedulerInstanceId);
      pipe.sadd(redisSchema.blockedJobsSet(),jobHashKey);
      pipe.sync();
    }
 else     if (nextFireDate != null) {
      jedis.hset(triggerHashKey,TRIGGER_NEXT_FIRE_TIME,Long.toString(nextFireTime));
      logger.debug(String.format("String_Node_Str",triggerHashKey,nextFireTime));
      setTriggerState(RedisTriggerState.WAITING,(double)nextFireTime,triggerHashKey,jedis);
    }
 else {
      jedis.hset(triggerHashKey,TRIGGER_NEXT_FIRE_TIME,"String_Node_Str");
      unsetTriggerState(triggerHashKey,jedis);
    }
    results.add(new TriggerFiredResult(triggerFiredBundle));
  }
  return results;
}