Program: 13299
Project: 13299
Buggy source:
@Override public void storeJob(SchedulingContext context,JobDetail newJob,boolean replaceExisting) throws ObjectAlreadyExistsException, JobPersistenceException {
synchronized (lock) {
    logger.debug("String_Node_Str",newJob.getFullName());
    if (!setAccessor()) {
      throw new JobPersistenceException("String_Node_Str");
    }
    String jobName=newJob.getName();
    String jobGroup=newJob.getGroup();
    String jobId=getJobsRepoId(jobGroup,jobName);
    JobGroupWrapper jgw=null;
    try {
      jgw=getOrCreateJobGroupWrapper(jobGroup);
    }
 catch (    ResourceException e) {
      logger.warn("String_Node_Str",e);
      throw new JobPersistenceException("String_Node_Str" + "String_Node_Str",e);
    }
    List<String> jobNames=jgw.getJobNames();
    JobWrapper jw=new JobWrapper(newJob,jgw.isPaused());
    if (jobNames.contains(jobName) && !replaceExisting) {
      throw new ObjectAlreadyExistsException(newJob);
    }
    try {
      if (jobNames.contains(jobName)) {
        JobWrapper oldJw=getJobWrapper(jobGroup,jobName);
        logger.debug("String_Node_Str",new Object[]{jobName,jobGroup});
        UpdateRequest r=Requests.newUpdateRequest(jobId,jw.getValue());
        r.setRevision(oldJw.getRevision());
        accessor.getConnection().update(accessor,r);
      }
 else {
        jgw.addJob(jobName);
        UpdateRequest r=Requests.newUpdateRequest(getJobGroupsRepoId(jobGroup),jgw.getValue());
        r.setRevision(jgw.getRevision());
        accessor.getConnection().update(accessor,r);
        logger.debug("String_Node_Str",new Object[]{jobName,jobGroup});
        accessor.getConnection().create(accessor,Requests.newCreateRequest(jobId,jw.getValue()));
      }
    }
 catch (    ResourceException e) {
      logger.warn("String_Node_Str",e);
      throw new JobPersistenceException("String_Node_Str" + "String_Node_Str",e);
    }
  }
}

Fixed version (ground truth):
@Override public void storeJob(SchedulingContext context,JobDetail newJob,boolean replaceExisting) throws ObjectAlreadyExistsException, JobPersistenceException {
synchronized (lock) {
    logger.debug("String_Node_Str",newJob.getFullName());
    if (!setAccessor()) {
      throw new JobPersistenceException("String_Node_Str");
    }
    String jobName=newJob.getName();
    String jobGroup=newJob.getGroup();
    String jobId=getJobsRepoId(jobGroup,jobName);
    JobGroupWrapper jgw=null;
    try {
      jgw=getOrCreateJobGroupWrapper(jobGroup);
    }
 catch (    ResourceException e) {
      logger.warn("String_Node_Str",e);
      throw new JobPersistenceException("String_Node_Str" + "String_Node_Str",e);
    }
    List<String> jobNames=jgw.getJobNames();
    JobWrapper jw=new JobWrapper(newJob,jgw.isPaused());
    if (jobNames.contains(jobName) && !replaceExisting) {
      throw new ObjectAlreadyExistsException(newJob);
    }
    try {
      if (jobNames.contains(jobName)) {
        JobWrapper oldJw=getJobWrapper(jobGroup,jobName);
        logger.debug("String_Node_Str",new Object[]{jobName,jobGroup});
        UpdateRequest r=Requests.newUpdateRequest(jobId,jw.getValue());
        r.setRevision(oldJw.getRevision());
        accessor.getConnection().update(accessor,r);
      }
 else {
        jgw.addJob(jobName);
        UpdateRequest r=Requests.newUpdateRequest(getJobGroupsRepoId(jobGroup),jgw.getValue());
        r.setRevision(jgw.getRevision());
        accessor.getConnection().update(accessor,r);
        logger.debug("String_Node_Str",new Object[]{jobName,jobGroup});
        accessor.getConnection().create(accessor,getCreateRequest(jobId,jw.getValue().asMap()));
      }
    }
 catch (    ResourceException e) {
      logger.warn("String_Node_Str",e);
      throw new JobPersistenceException("String_Node_Str" + "String_Node_Str",e);
    }
  }
}