anchor.diff:  
   handle_info({mnesia_system_event, _MnesiaEvent}, State) ->
       %% ignore mnesia event
  +    {noreply, State};
  +
  +handle_info({purge_double_processes, DoubleProcessesInfo}, #state{
  +    conflicting_process_callback_module = ConflictingProcessCallbackModule,
  +    conflicting_process_callback_function = ConflictingProcessCallbackFunction
  +} = State) ->
  +    error_logger:warning_msg("About to purge double processes after netsplit"),
  +    purge_double_processes(ConflictingProcessCallbackModule, ConflictingProcessCallbackFunction, DoubleProcessesInfo),
       {noreply, State};
   
   handle_info(Info, State) ->
  
positive.code:         lists:foreach(DelF, NodePids)
      end).
  
  -spec automerge(RemoteNode :: atom(), CallbackModule :: atom(), CallbackFunction :: atom()) -> ok.
  automerge(RemoteNode, CallbackModule, CallbackFunction) ->
      global:trans({{?MODULE, automerge}, self()},
          fun() ->
              error_logger:warning_msg("AUTOMERGE starting for remote node ~s (global lock is set)", [RemoteNode]),
              check_stitch(RemoteNode, CallbackModule, CallbackFunction),
              error_logger:warning_msg("AUTOMERGE done (global lock is about to be unset)")
          end).
  
  -spec check_stitch(RemoteNode :: atom(), CallbackModule :: atom(), CallbackFunction :: atom()) -> ok.
  check_stitch(RemoteNode, CallbackModule, CallbackFunction) ->
      case catch lists:member(RemoteNode, mnesia:system_info(running_db_nodes)) of
          true ->
              ok;
          false ->
              catch stitch(RemoteNode, CallbackModule, CallbackFunction),
              ok;
          Error ->
              error_logger:error_msg("Could not check if node is stiched: ~p", [Error])
      end.
  
  -spec stitch(RemoteNode :: atom(), CallbackModule :: atom(), CallbackFunction :: atom()) ->
      {'ok', any()} | {'error', any()}.
  stitch(RemoteNode, CallbackModule, CallbackFunction) ->
      mnesia_controller:connect_nodes(
          [RemoteNode],
          fun(MergeF) ->
              catch case MergeF([syn_processes_table]) of
                  {merged, _, _} = Res ->
                      stitch_tab(RemoteNode, CallbackModule, CallbackFunction),
                      Res;
                  Other ->
                      Other
              end
          end).
  
  -spec stitch_tab(RemoteNode :: atom(), CallbackModule :: atom(), CallbackFunction :: atom()) -> ok.
  stitch_tab(RemoteNode, CallbackModule, CallbackFunction) ->
      %% get remote processes info
      RemoteProcessesInfo = rpc:call(RemoteNode, ?MODULE, get_processes_info_of_node, [RemoteNode]),
      %% get local processes info
      LocalProcessesInfo = get_processes_info_of_node(node()),
      %% purge doubles (if any)
      {LocalProcessesInfo1, RemoteProcessesInfo1} = purge_double_processes_from_local_node(
          LocalProcessesInfo,
          RemoteProcessesInfo,
          CallbackModule,
          CallbackFunction
      ),
      %% write
      write_remote_processes_to_local(RemoteNode, RemoteProcessesInfo1),
      write_local_processes_to_remote(RemoteNode, LocalProcessesInfo1).
  
  -spec purge_double_processes_from_local_node(
      LocalProcessesInfo :: list(),
      RemoteProcessesInfo :: list(),
      ConflictingMode :: kill | send_message,
      Message :: any()
  ) ->
      {LocalProcessesInfo :: list(), RemoteProcessesInfo :: list()}.
  purge_double_processes_from_local_node(LocalProcessesInfo, RemoteProcessesInfo, CallbackModule, CallbackFunction) ->
      %% create ETS table
      Tab = ets:new(syn_automerge_doubles_table, [set]),
  
  
negative.code:     ets:insert(Tab, LocalProcessesInfo),
  
      %% find doubles
      F = fun({Key, _RemoteProcessPid, _RemoteProcessMeta}, Acc) ->
          case ets:lookup(Tab, Key) of
              [] -> Acc;
              [{Key, LocalProcessPid, LocalProcessMeta}] ->
                  %% found a double process, remove it from local mnesia table
                  mnesia:dirty_delete(syn_processes_table, Key),
                  %% remove it from ETS
                  ets:delete(Tab, Key),
                  %% add it to acc
                  [{Key, LocalProcessPid, LocalProcessMeta} | Acc]
          end
      end,
      DoubleProcessesInfo = lists:foldl(F, [], RemoteProcessesInfo),
  
      %% send to syn_consistency gen_server to handle double processes once merging is done
      ?MODULE ! {purge_double_processes, DoubleProcessesInfo},
  
      %% compute local processes without doubles
      LocalProcessesInfo1 = ets:tab2list(Tab),
  