anchor.diff:      end;
   
   %% @doc Repair command: Appends the Ops to the Log
  -%%      Input:  LogId: Indetifies which log the operations have to be appended to.
  +%%      Input:  LogId: Indetifies which log the operations have
  +%%              to be appended to.
   %%	            Ops: Operations to append
   %%	    Output: ok | {error, Reason}
  -handle_command({append_list, LogId, Ops}, _Sender, #state{logs_map=Map}=State) ->	
  +handle_command({append_list, LogId, Ops}, _Sender,
  +               #state{logs_map=Map}=State) ->
       Result = case get_log_from_map(Map, LogId) of
           {ok, Log} ->
               F = fun(Operation, Acc) ->
  
positive.code:     ?assertEqual({ok, value3}, get_log_from_map(Dict5, [floppy3,c])),
      ?assertEqual({error, no_log_for_preflist}, get_log_from_map(Dict5, [floppy5, c])).
  
  %% @doc Testing that preflist_member returns true when there is a match
  preflist_member_true_test() ->
      Preflist = [{partition1, node},{partition2, node},{partition3, node}],
      ?assertEqual(true, preflist_member(partition1, Preflist)).
  
  %% @doc Testing that preflist_member returns false when there is no match
  preflist_member_false_test() ->
      Preflist = [{partition1, node},{partition2, node},{partition3, node}],
      ?assertEqual(false, preflist_member(partition5, Preflist)).
  
negative.code: 
  -record(state, {partition, logs_map}).
  
  %% API
  -spec start_vnode(integer()) -> any().
  start_vnode(I) ->
      riak_core_vnode_master:get_vnode_pid(I, ?MODULE).
  
  %% @doc Sends a `threshold read' asynchronous command to the Logs in
  %%      `Preflist' From is the operation id form which the caller wants to
  %%      retrieve the operations.  The operations are retrieved in inserted
  %%      order and the From operation is also included.
  -spec threshold_read(preflist(), key(), op_id()) -> term().
  threshold_read(Preflist, Log, From) ->
      riak_core_vnode_master:command(Preflist,
                                     {threshold_read, Log, From},
                                     {fsm, undefined, self()},
                                     ?LOGGINGMASTER).
  
  %% @doc Sends a `read' asynchronous command to the Logs in `Preflist'
  -spec dread(preflist(), key()) -> term().
  dread(Preflist, Log) ->
      riak_core_vnode_master:command(Preflist,
                                     {read, Log},
                                     {fsm, undefined, self()},
                                     ?LOGGINGMASTER).
  
  %% @doc Sends a `read' synchronous command to the Logs in `Node'
  -spec read({partition(), node()}, key()) -> term().
  read(Node, Log) ->
      riak_core_vnode_master:sync_command(Node,
                                          {read, Log},
                                          ?LOGGINGMASTER).
  
  %% @doc Sends an `append' asyncrhonous command to the Logs in `Preflist'
  -spec dappend(preflist(), key(), op(), op_id()) -> term().
  dappend(Preflist, Log, OpId, Payload) ->
      riak_core_vnode_master:command(Preflist,
                                     {append, Log, OpId, Payload},
                                     {fsm, undefined, self()},
                                     ?LOGGINGMASTER).
  
  %% @doc Sends a `append_list' syncrhonous command to the Log in `Node'.
  -spec append_list({partition(), node()}, key(), [op()]) -> term().
  append_list(Node, Log, Ops) ->
      riak_core_vnode_master:sync_command(Node,
                                          {append_list, Log, Ops},
                                          ?LOGGINGMASTER).
  
  %% @doc Opens the persistent copy of the Log.
  %%      The name of the Log in disk is a combination of the the word
  %%      `log' and the partition identifier.
  init([Partition]) ->
      LogFile = string:concat(
              integer_to_list(
                  log_utilities:get_partition(Partition)), "log"),
      {ok, Ring} = riak_core_ring_manager:get_my_ring(),
      GrossPreflists = riak_core_ring:all_preflists(Ring, ?N),
      Preflists = lists:foldl(fun(X, Filtered) ->
                      case preflist_member(Partition, X) of
                          true ->
                              lists:append(Filtered, [X]);
                          false ->
                              Filtered
                      end
                      end, [], GrossPreflists),
      case open_logs(LogFile, Preflists, 1, dict:new()) of
          {error, Reason} ->
              {error, Reason};
  