anchor.diff:      S1 = S#state{next_taskid = NextTaskId + 1,
                    data_map    = DataMap,
                    tasks = jc_utils:add_task_spec(NextTaskId, TaskSpec, Tasks)},
  -    make_stage_tasks(Stage, Grouping, SaveOutputs, SaveInfo, Rest, S1,
  +    make_stage_tasks(Stage, Grouping, Rest, S1,
                        {TaskNum + 1, [NextTaskId | Acc]}).
   
   
  
positive.code:     do_submit_tasks(re_run, Awake, S1, ?FAILURES_ALLOWED).
  
  -spec do_stage_done(stage_name(), state()) -> state().
  do_stage_done(Stage, #state{jobinfo    = #jobinfo{jobname      = JobName,
                                                    save_results = Save,
                                                    save_info = SaveInfo},
                              pipeline   = P,
                              tasks      = Tasks,
                              stage_info = SI} = S) ->
  
negative.code:             % we need to start the tasks in the next stage.
              case jc_utils:stage_info_opt(Next, SI) of
                  none ->
                      PrevStageOutputs = stage_outputs(Stage, S),
                      start_next_stage(PrevStageOutputs, Next, Grouping, S);
                  _ ->
                      S
              end
      end.
  start_next_stage(PrevStageOutputs, Stage, Grouping,
                   #state{jobinfo = #jobinfo{jobname = JobName}} = S) ->
      {Tasks, S1} = setup_stage_tasks(PrevStageOutputs, Stage, Grouping, S),
      case Tasks of
          [] ->
              do_stage_done(Stage, S1);
  