anchor.diff:      handle_call({set_desired_replications, CleanedReps}, From, State);
   handle_call({set_desired_replications, DesiredReps}, _From,
               #state{bucket_name = Bucket,
  -                   repl_type = Type,
  +                   repl_type = ReplType,
                      tap_replication_manager = TapReplManager} = State) ->
  -    NewTapReplManager = manage_tap_replication_manager(Bucket, Type, TapReplManager),
  +    NewTapReplManager = manage_tap_replication_manager(Bucket, ReplType, TapReplManager),
       State1 = State#state{tap_replication_manager = NewTapReplManager},
   
       {Tap, Upr} = split_replications(DesiredReps, State1),
       call_replicators(
         set_desired_replications, [Bucket, Tap],
         set_desired_replications, [Bucket, Upr],
  -      State1),
  +      ReplType),
   
       {reply, ok, State1#state{desired_replications = DesiredReps}};
   handle_call({change_vbucket_replication, VBucket, NewSrc}, _From, State) ->
  
positive.code: -include("ns_common.hrl").
  
  -record(state, {bucket_name :: bucket_name(),
                  repl_type :: tap | upr | both,
                  remaining_tap_partitions = undefined :: [vbucket_id()] | undefined,
                  desired_replications :: [{node(), [vbucket_id()]}],
                  tap_replication_manager :: pid()
                 }).
  
negative.code:                             end, CurrentReps),
      {reply, upr_replicator:takeover(OldMasterNode, Bucket, VBucket),
       State#state{desired_replications = DesiredReps}}.
  
  manage_tap_replication_manager(Bucket, Type, TapReplManager) ->
      case {Type, TapReplManager} of
  