anchor.diff:  register_pid(FName, Start = {Line1, Col1}, End = {Line2, Col2}, RegName, SearchPaths, Editor, TabWidth) ->
        ?wrangler_io("\nCMD: ~p:register_pid(~p, {~p,~p}, {~p,~p}, ~p,~p,~p, ~p).\n",
   		  [?MODULE, FName, Line1, Col1, Line2, Col2, RegName, SearchPaths, Editor, TabWidth]),
  -     Cmd = "CMD: " ++ atom_to_list(?MODULE) ++ ":register_pid(" ++ "\"" ++
  -	     FName ++ "\", {" ++ integer_to_list(Line1) ++ ", " ++ integer_to_list(Col1) ++ "}," ++
  -	       "{" ++ integer_to_list(Line2) ++ ", " ++ integer_to_list(Col2) ++ "}," ++ "\"" ++ RegName ++ "\","
  +    Cmd = "CMD: " ++ atom_to_list(?MODULE) ++ ":register_pid(" ++ "\"" ++
  +        FName ++ "\", {" ++ integer_to_list(Line1) ++ ", " ++ integer_to_list(Col1) ++ "}," ++
  +        "{" ++ integer_to_list(Line2) ++ ", " ++ integer_to_list(Col2) ++ "}," ++ "\"" ++ RegName ++ "\","
           ++ "[" ++ wrangler_misc:format_search_paths(SearchPaths) ++ "]," ++ integer_to_list(TabWidth) ++ ").",
       case is_process_name(RegName) of
  -	true -> {ok, {AnnAST, Info}} = wrangler_ast_server:parse_annotate_file(FName, true, SearchPaths, TabWidth),
  -		case pos_to_spawn_match_expr(AnnAST, Start, End) of
  -		    {ok, _MatchExpr1} ->
  -			{value, {module, ModName}} = lists:keysearch(module, 1, Info),
  -			RegName1 = list_to_atom(RegName),
  -			_Res = wrangler_annotate_pid:ann_pid_info(SearchPaths, TabWidth),
  -			%% get the AST with pid information.
  -                        {ok, {AnnAST1, _Info}} = wrangler_ast_server:parse_annotate_file(FName, true, SearchPaths, TabWidth),
  -                        case pos_to_spawn_match_expr(AnnAST1, Start, End) of
  -			    {ok, MatchExpr} ->
  -				case pre_cond_check(ModName, AnnAST1, Start, MatchExpr, RegName1, Info, SearchPaths, TabWidth) of
  -				    ok -> 
  -					Pid = wrangler_syntax:match_expr_pattern(MatchExpr),
  -					case do_register(FName, AnnAST1, MatchExpr, Pid, RegName1, SearchPaths, TabWidth) of
  -					    {ok, Results} ->
  -						case Editor of
  -						    emacs ->
  -							wrangler_write_file:write_refactored_files_for_preview(Results, TabWidth, Cmd),
  -							ChangedFiles = lists:map(fun ({{F, _F}, _AST}) -> F end, Results),
  -							?wrangler_io("The following files are to be changed by this refactoring:\n~p\n",
  -								     [ChangedFiles]),
  -							{ok, ChangedFiles};
  -						    eclipse ->
  -							Res = lists:map(fun ({{OldFName, NewFName}, AST}) ->
  -										{OldFName, NewFName,
  -										 wrangler_prettypr:print_ast(wrangler_misc:file_format(OldFName), AST, TabWidth)}
  -									end, Results),
  -							{ok, Res}
  -						end;
  -					    {error, Reason} -> {error, Reason}
  -					end;
  -				    {unknown_pnames, _UnKnownPNames, RegPids} ->
  -					{unknown_pnames, RegPids, Cmd};
  -				    {unknown_pids, UnKnownPids} ->
  -					{unknown_pids, UnKnownPids, Cmd};
  -				    {error, Reason} -> {error, Reason}
  -				end;
  -			    {error, Reason} -> {error, Reason}
  -			end;
  -		    {error, Reason} -> {error, Reason}
  -		end;
  -	false -> {error, "Invalid process name."}
  +	true -> 
  +            {ok, {AnnAST, Info}} = wrangler_ast_server:parse_annotate_file(FName, true, SearchPaths, TabWidth),
  +            case pos_to_spawn_match_expr(AnnAST, Start, End) of
  +                {ok, _MatchExpr1} ->
  +                    {value, {module, ModName}} = lists:keysearch(module, 1, Info),
  +                    RegName1 = list_to_atom(RegName),
  +                    _Res = wrangler_annotate_pid:ann_pid_info(SearchPaths, TabWidth),
  +                    %% get the AST with pid information.
  +                    {ok, {AnnAST1, _Info}} = wrangler_ast_server:parse_annotate_file(FName, true, SearchPaths, TabWidth),
  +                    case pos_to_spawn_match_expr(AnnAST1, Start, End) of
  +                        {ok, MatchExpr} ->
  +                            case pre_cond_check(ModName, AnnAST1, Start, MatchExpr, RegName1, Info, SearchPaths, TabWidth) of
  +                                ok -> 
  +                                    Pid = wrangler_syntax:match_expr_pattern(MatchExpr),
  +                                    case do_register(FName, AnnAST1, MatchExpr, Pid, RegName1, SearchPaths, TabWidth) of
  +                                        {ok, Results} ->
  +                                            write_refactored_files(Editor,TabWidth,Cmd,Results);
  +                                        {error, Reason} -> {error, Reason}
  +                                     end;
  +                                {unknown_pnames, _UnKnownPNames, RegPids} ->
  +                                    {unknown_pnames, RegPids, Cmd};
  +                                {unknown_pids, UnKnownPids} ->
  +                                    {unknown_pids, UnKnownPids, Cmd};
  +                                {error, Reason} -> {error, Reason}
  +                            end;
  +                        {error, Reason} -> {error, Reason}
  +                    end;
  +                {error, Reason} -> {error, Reason}
  +            end;
  +         false -> {error, "Invalid process name."}
  +     end.
  +
  +write_refactored_files(Editor, TabWidth, Cmd, Results) ->
  +    case Editor of
  +        emacs ->
  +            wrangler_write_file:write_refactored_files_for_preview(Results, TabWidth, Cmd),
  +            ChangedFiles = lists:map(fun ({{F, _F}, _AST}) -> F end, Results),
  +            ?wrangler_io("The following files are to be changed by this refactoring:\n~p\n",
  +                         [ChangedFiles]),
  +            {ok, ChangedFiles};
  +        eclipse ->
  +            Res = lists:map(fun ({{OldFName, NewFName}, AST}) ->
  +                                    {OldFName, NewFName,
  +                                     wrangler_prettypr:print_ast(wrangler_misc:file_format(OldFName), AST, TabWidth)}
  +                            end, Results),
  +            {ok, Res}
       end.
   
   %%-spec (register_pid_1(FName::filename(), StartLine::integer(), StartCol::integer(),EndLine::integer(), EndCol::integer(),
  
positive.code:     lists:map(F, Exprs).
  
  funs_called(Node) ->
      HandleSpecialFuns = fun (Arguments, S) ->
  				case Arguments of
  				    [M, F, A] ->
  					case {wrangler_syntax:type(M), wrangler_syntax:type(F), wrangler_syntax:type(A)} of
  					    {atom, atom, list} ->
  						ModName = wrangler_syntax:atom_value(M),
  						FunName = wrangler_syntax:atom_value(F),
  						Arity = wrangler_syntax:list_length(A),
  						ordsets:add_element({ModName, FunName, Arity}, S);
  					    _ -> S
  					end;
  				    [M, F, A, _O] ->
  					case {wrangler_syntax:type(M), wrangler_syntax:type(F), wrangler_syntax:type(A)} of
  					    {atom, atom, list} ->
  						ModName = wrangler_syntax:atom_value(M),
  						FunName = wrangler_syntax:atom_value(F),
  						Arity = wrangler_syntax:list_length(A),
  						ordsets:add_element({ModName, FunName, Arity}, S);
  					    _ -> S
  					end
  				end
  			end,
      F2 = fun (T, S) ->
  		 case wrangler_syntax:type(T) of
  		     application ->
  
negative.code: %% The only way to register a process is to use register/2.
  %% This function checks all the applications of 'register/2'.
  %% -spec(collect_registered_names_and_pids/1::([dir()])->
  %%               {[{{modulename(), functionname(), functionarity()},syntaxTree()}], [atom()],
  %%                 [{unknown, {modulename(), functionname(), functionarity(), pos()}}]}).
  collect_registered_names_and_pids(DirList, TabWidth) ->
      Files = wrangler_misc:expand_files(DirList, ".erl"),
      F = fun (File, FileAcc) ->
  