anchor.diff:  submit_tasks(JobCoord, Mode, Tasks) ->
       gen_server:cast(JobCoord, {submit_tasks, Mode, Tasks}).
   
  +submit_tasks(_, _, _, 0) ->
  +    {stop, "Too many failures"};
  +submit_tasks(JobCoord, Mode, Tasks, N) ->
  +    gen_server:cast(JobCoord, {submit_tasks, Mode, Tasks, N-1}).
  +
   -spec kill_job(term()) -> ok.
   kill_job(Reason) ->
       gen_server:cast(self(), {kill_job, Reason}).
  
positive.code:     end,
      S1 = S#state{stage_info = jc_utils:update_stage_tasks(Stage, TaskId, done, SI),
                   tasks = jc_utils:update_task_info(TaskId, TInfo1, Tasks1)},
      do_submit_tasks(re_run, Awake, S1).
  
  -spec do_stage_done(stage_name(), state()) -> state().
  do_stage_done(Stage, #state{jobinfo    = #jobinfo{jobname      = JobName,
  
negative.code:     % Backtrack through the task dependency graph and get the runnable
      % tasks from all the tasks that need to be re-run.
      {TaskIdsToRun, S1} = collect_runnable_deps(GenTaskId, FailingHosts, S),
      do_submit_tasks(re_run, TaskIdsToRun, S1, ?FAILURES_ALLOWED).
  
  -spec task_complete(task_id(), host(), [task_output()], state()) -> state().
  task_complete(TaskId, Host, Outputs, #state{tasks      = Tasks,
  