anchor.diff:  %% Support the original function is f/n, then the new function name would be f/0 and the rpc function name would be f_rpc/2; if 
   %% any conflicts occur, '_i' will be attached to the end of the function name where i is a smallest number that make the name fresh.
   %% 
  -pre_cond_check(AnnAST, Pos, ModName,FunName,Arity, ProcessName, SearchPaths)->
  +pre_cond_check(AnnAST, Pos, ModName,FunName,Arity, ProcessName, SearchPaths, TabWidth)->
       {ok, FunDef} = refac_util:pos_to_fun_def(AnnAST, Pos),    
       case is_recursive_fun({ModName, FunName, Arity, FunDef}, SearchPaths) of  
   	true ->
  -	    {error, "The function is a recursive (direct or indirect) function.\n"};
  -	false -> {SelfApps, _Pids, {PNames, UnKnowns}} = collect_registration_and_self_apps(SearchPaths), 
  -		 case lists:member(ProcessName, PNames) of 
  -		     true -> {error, "The process name provided is already in use, please choose another name."};
  -		     _ ->
  -			 SelfRes = check_self_exprs(SelfApps, {ModName,FunName, Arity}, SearchPaths),
  -			 case UnKnowns of 
  -			     [] -> case SelfRes of 
  -				       ok -> ok;
  -				       _ -> ?wrangler_io("\n*************************************Warning****************************************\n",[]),
  -					    ?wrangler_io("The value returned by 'self()', which is used at the location(s) listed below, will be changed "
  -						      " by this refactoring, and this could possibly change the behaviour of the program!\n",[]),
  -					    lists:foreach(fun({{Mod, Fun, Ari}, SelfExpr, _}) ->
  -								  {{Line,_}, _} = refac_util:get_range(SelfExpr),
  -								  ?wrangler_io("Location: moldule: ~p, function: ~p/~p, line: ~p\n", [Mod, Fun, Ari, Line])
  -							  end, SelfRes),
  -					   undecidables
  -				   end;
  -			     _ -> ?wrangler_io("\n*************************************Warning****************************************\n",[]),
  -				 ?wrangler_io("Wrangler could not decide whether the process name provided conflicts with the process name(s) "
  -					    "used by the following registeration expression(s):\n",[]),
  -				  UnKnowns1 = lists:map(fun({_, V}) -> V end, UnKnowns),
  -				  lists:foreach(fun({M, F,A, {L,_}}) -> ?wrangler_io("Location: module: ~p, function:~p/~p, line:~p\n", [M, F, A, L])
  -						end, UnKnowns1),
  -				  case SelfRes of 
  -				      ok -> ok;
  -				      _ -> ?wrangler_io("\n*************************************Warning****************************************\n",[]),
  -					   ?wrangler_io("The value returned by 'self()', which is used at the location(s) listed below, will be changed "
  -						     " by this refactoring, and this could possibly change the behaviour of the program!\n",[]),
  -					   lists:foreach(fun({{Mod, Fun, Ari}, SelfExpr, _}) ->
  -								 {{Line,_}, _} = refac_util:get_range(SelfExpr),
  -								 ?wrangler_io("Location: moldule: ~p, function: ~p/~p, line: ~p\n", [Mod, Fun, Ari, Line])
  -							 end, SelfRes)
  -				  end,
  -				  undecidables
  -			 end
  -		 end
  -    end.
  +	    throw({error, "The function is a recursive (direct or indirect) function.\n"});
  +	false -> ok
  +    end,
  +    {SelfApps, _Pids, PNames, UnKnowns} = collect_registration_and_self_apps(SearchPaths, TabWidth), 
  +    case lists:member(ProcessName, PNames) of 
  +	true -> throw({error, "The process name provided is already in use, please choose another name."});
  +	_ -> ok
  +    end,
  +    SelfRes = check_self_exprs(SelfApps, {ModName,FunName, Arity}, SearchPaths),
  +    case {UnKnowns, SelfRes} of
  +	{[], []} -> ok;
  +	{[], _} ->
  +	    ?wrangler_io("\n*************************************Warning****************************************\n",[]),
  +	    ?wrangler_io("The value returned by 'self()', which is used at the location(s) listed below, will be changed "
  +			 " by this refactoring, and this could possibly change the behaviour of the program!\n",[]),
  +	    lists:foreach(fun({{File, _Fun, _Ari}, SelfExpr, _}) ->
  +				  {{Line,_}, _} = refac_util:get_range(SelfExpr),
  +				  Msg = File ++ io_lib:format(":~p: \n",[Line]),
  +				  ?wrangler_io(Msg, [])
  +			  end, SelfRes),
  +	    throw({undecidables, "there are undecidable cases."});
  +	{_, []} -> 
  +	    ?wrangler_io("\n*************************************Warning****************************************\n",[]),
  +	    ?wrangler_io("Wrangler could not decide whether the process name provided conflicts with the process name(s) "
  +			 "used by the following registeration expression(s):\n",[]),
  +	    lists:foreach(fun({File,L}) ->
  +				  Msg = File ++ io_lib:format(":~p: \n",[L]),
  +				  ?wrangler_io(Msg, [])
  +			  end, UnKnowns),
  +	    throw({undecidables, "there are undecidable cases."});
  +	_ ->
  +	    ?wrangler_io("\n*************************************Warning****************************************\n",[]),
  +	    ?wrangler_io("Wrangler could not decide whether the process name provided conflicts with the process name(s) "
  +			 "used by the following registeration expression(s):\n",[]),
  +	    lists:foreach(fun({File,L}) ->
  +				  Msg = File ++ io_lib:format(":~p: \n",[L]),
  +				  ?wrangler_io(Msg, [])
  +			  end, UnKnowns),
  +	    ?wrangler_io("\n*************************************Warning****************************************\n",[]),
  +	    ?wrangler_io("The value returned by 'self()', which is used at the location(s) listed below, will be changed "
  +			 " by this refactoring, and this could possibly change the behaviour of the program!\n",[]),
  +	    lists:foreach(fun({{File, _Fun, _Ari}, SelfExpr, _}) ->
  +				  {{Line,_}, _} = refac_util:get_range(SelfExpr),
  +				  Msg = File ++ io_lib:format(":~p: \n",[Line]),
  +				  ?wrangler_io(Msg, [])
  +			  end, SelfRes),
  +	    throw({undecidables, "there are undecidable cases."})
  +    end.
  +  
   		 
   	    
   
  
positive.code:  	  Operator = refac_syntax:application_operator(T),
   	  Ann = refac_syntax:get_ann(Operator),
   	  case lists:keysearch(fun_def, 1, Ann) of
   	    {value, {fun_def, {erlang, register, 2, _, _}}} -> true;
   	    _ -> false
   	  end;
         _ -> false
       end.
     
  is_self_app(T) ->
       case refac_syntax:type(T) of
         application ->
   	  Operator = refac_syntax:application_operator(T),
   	  Ann = refac_syntax:get_ann(Operator),
   	  case lists:keysearch(fun_def, 1, Ann) of
   	    {value, {fun_def, {erlang, self, 0, _, _}}} -> true;
   	    _ -> false
   	  end;
         _ -> false
       end.
  
  is_process_name(Name) ->
      refac_util:is_fun_name(Name) and (list_to_atom(Name) =/= undefined).
  
negative.code: 							 case is_register_app(Node1) of 
  							     true -> 
  								 [RegName, Pid] = refac_syntax:application_arguments(Node1),
  								 RegNameValues = evaluate_expr(File, RegName, DirList, TabWidth),
  								 RegNameValues1 = [{pname, R} || R<- RegNameValues],
  								 [{pid, {{ModName, FunName, Arity}, Pid}}|RegNameValues1++FunAcc];
  							    false ->
  								 case is_self_app(Node1) of 
  								     true -> 
  									 [{self, {{File, FunName, Arity},
  										  {File, Node, Node1}}}|FunAcc];
  								     false ->
  									 FunAcc
  								 end
  							 end; 
  						     _ ->  FunAcc
  						 end
  