Program: 79555
Project: 79555
Buggy source:
@SuppressWarnings("String_Node_Str") protected Task<?> submitNewScheduledTask(final Map<?,?> flags,final ScheduledTask task){
  task.submitTimeUtc=System.currentTimeMillis();
  tasksById.put(task.getId(),task);
  if (!task.isDone()) {
    task.result=delayedRunner.schedule(new Callable<Object>(){
      @SuppressWarnings("String_Node_Str") public Object call(){
        if (task.startTimeUtc == -1)         task.startTimeUtc=System.currentTimeMillis();
        try {
          beforeStart(flags,task);
          final TaskInternal<?> taskScheduled=(TaskInternal<?>)task.newTask();
          taskScheduled.setSubmittedByTask(task);
          final Callable<?> oldJob=taskScheduled.getJob();
          taskScheduled.setJob(new Callable(){
            public Object call(){
              task.recentRun=taskScheduled;
synchronized (task) {
                task.notifyAll();
              }
              Object result;
              try {
                result=oldJob.call();
              }
 catch (              Exception e) {
                log.warn("String_Node_Str" + oldJob + "String_Node_Str"+ task.getDescription()+ "String_Node_Str",e);
                throw Exceptions.propagate(e);
              }
              task.runCount++;
              if (task.period != null && !task.isCancelled()) {
                task.delay=task.period;
                submitNewScheduledTask(flags,task);
              }
              return result;
            }
          }
);
          task.nextRun=taskScheduled;
          BasicExecutionContext ec=BasicExecutionContext.getCurrentExecutionContext();
          if (ec != null)           return ec.submit(taskScheduled);
 else           return submit(taskScheduled);
        }
  finally {
          afterEnd(flags,task);
        }
      }
    }
,task.delay.toNanoseconds(),TimeUnit.NANOSECONDS);
  }
 else {
    task.endTimeUtc=System.currentTimeMillis();
  }
  return task;
}

Fixed version (ground truth):
@SuppressWarnings("String_Node_Str") protected Task<?> submitNewScheduledTask(final Map<?,?> flags,final ScheduledTask task){
  task.submitTimeUtc=System.currentTimeMillis();
  tasksById.put(task.getId(),task);
  if (!task.isDone()) {
    task.result=delayedRunner.schedule(new Callable<Object>(){
      @SuppressWarnings("String_Node_Str") public Object call(){
        if (task.startTimeUtc == -1)         task.startTimeUtc=System.currentTimeMillis();
        try {
          beforeStart(flags,task);
          final TaskInternal<?> taskScheduled=(TaskInternal<?>)task.newTask();
          taskScheduled.setSubmittedByTask(task);
          final Callable<?> oldJob=taskScheduled.getJob();
          taskScheduled.setJob(new Callable(){
            public Object call(){
              task.recentRun=taskScheduled;
synchronized (task) {
                task.notifyAll();
              }
              Object result;
              try {
                result=oldJob.call();
              }
 catch (              Exception e) {
                log.warn("String_Node_Str" + oldJob + "String_Node_Str"+ task+ "String_Node_Str"+ task.getDescription()+ "String_Node_Str",e);
                throw Exceptions.propagate(e);
              }
              task.runCount++;
              if (task.period != null && !task.isCancelled()) {
                task.delay=task.period;
                submitNewScheduledTask(flags,task);
              }
              return result;
            }
          }
);
          task.nextRun=taskScheduled;
          BasicExecutionContext ec=BasicExecutionContext.getCurrentExecutionContext();
          if (ec != null)           return ec.submit(taskScheduled);
 else           return submit(taskScheduled);
        }
  finally {
          afterEnd(flags,task);
        }
      }
    }
,task.delay.toNanoseconds(),TimeUnit.NANOSECONDS);
  }
 else {
    task.endTimeUtc=System.currentTimeMillis();
  }
  return task;
}