Program: 13300
Project: 13300
Buggy source:
@Override public void storeCalendar(SchedulingContext context,String name,Calendar calendar,boolean replaceExisting,boolean updateTriggers) throws ObjectAlreadyExistsException, JobPersistenceException {
synchronized (lock) {
    if (!setAccessor()) {
      throw new JobPersistenceException("String_Node_Str");
    }
    try {
      CalendarWrapper cw=new CalendarWrapper(calendar,name);
      if (retrieveCalendar(context,name) == null) {
        logger.debug("String_Node_Str",name);
        accessor.getConnection().create(accessor,Requests.newCreateRequest(getCalendarsRepoId(name),cw.getValue()));
      }
 else {
        if (!replaceExisting) {
          throw new ObjectAlreadyExistsException(name);
        }
        CalendarWrapper oldCw=getCalendarWrapper(name);
        logger.debug("String_Node_Str",name);
        UpdateRequest r=Requests.newUpdateRequest(getCalendarsRepoId(name),cw.getValue());
        r.setRevision(oldCw.getRevision());
        accessor.getConnection().update(accessor,r);
      }
      if (updateTriggers) {
        List<TriggerWrapper> twList=getTriggerWrappersForCalendar(name);
        for (        TriggerWrapper tw : twList) {
          Trigger t=tw.getTrigger();
          boolean removed=removeWaitingTrigger(t);
          t.updateWithNewCalendar(calendar,getMisfireThreshold());
          tw.updateTrigger(t);
          logger.debug("String_Node_Str",new Object[]{tw.getName(),tw.getGroup()});
          updateTriggerInRepo(tw.getGroup(),tw.getName(),tw,tw.getRevision());
          if (removed) {
            addWaitingTrigger(t);
          }
        }
      }
    }
 catch (    Exception e) {
      logger.warn("String_Node_Str",name,e);
      throw new JobPersistenceException("String_Node_Str",e);
    }
  }
}

Fixed version (ground truth):
@Override public void storeCalendar(SchedulingContext context,String name,Calendar calendar,boolean replaceExisting,boolean updateTriggers) throws ObjectAlreadyExistsException, JobPersistenceException {
synchronized (lock) {
    if (!setAccessor()) {
      throw new JobPersistenceException("String_Node_Str");
    }
    try {
      CalendarWrapper cw=new CalendarWrapper(calendar,name);
      if (retrieveCalendar(context,name) == null) {
        logger.debug("String_Node_Str",name);
        accessor.getConnection().create(accessor,getCreateRequest(getCalendarsRepoId(name),cw.getValue().asMap()));
      }
 else {
        if (!replaceExisting) {
          throw new ObjectAlreadyExistsException(name);
        }
        CalendarWrapper oldCw=getCalendarWrapper(name);
        logger.debug("String_Node_Str",name);
        UpdateRequest r=Requests.newUpdateRequest(getCalendarsRepoId(name),cw.getValue());
        r.setRevision(oldCw.getRevision());
        accessor.getConnection().update(accessor,r);
      }
      if (updateTriggers) {
        List<TriggerWrapper> twList=getTriggerWrappersForCalendar(name);
        for (        TriggerWrapper tw : twList) {
          Trigger t=tw.getTrigger();
          boolean removed=removeWaitingTrigger(t);
          t.updateWithNewCalendar(calendar,getMisfireThreshold());
          tw.updateTrigger(t);
          logger.debug("String_Node_Str",new Object[]{tw.getName(),tw.getGroup()});
          updateTriggerInRepo(tw.getGroup(),tw.getName(),tw,tw.getRevision());
          if (removed) {
            addWaitingTrigger(t);
          }
        }
      }
    }
 catch (    Exception e) {
      logger.warn("String_Node_Str",name,e);
      throw new JobPersistenceException("String_Node_Str",e);
    }
  }
}