anchor.diff:  			       case lists:keysearch(pid,1,Ann) of 
   				   {value, PidInfo} ->
   				       Node1 = refac_syntax:application(Operator, [refac_syntax:atom(RegName), Msg]),
  -				       refac_syntax:copy_attrs(Node, Node1);
  -				   _ -> Node
  +				       {refac_syntax:copy_attrs(Node, Node1), true};
  +				   _ -> {Node,false}
   			       end;
  -			   _ -> Node
  +			   _ -> {Node,false}
   		       end;
  -	_  -> Node
  +	_  -> {Node, false}
       end.
   			  
   	    
  
positive.code:    
  
  
  do_register(AnnAST, MatchExpr, Pid, RegName) ->
      Ann = refac_syntax:get_ann(Pid),
     {value, PidInfo} = lists:keysearch(pid, 1, Ann),
     {AnnAST1, Modified} = add_register_expr(AnnAST, MatchExpr, RegName),
     case Modified of 
         true ->  Res = refactor_send_exprs(AnnAST1, PidInfo, RegName),
  	       {ok, Res};	    
         _ -> {error, "Wrangler failed to add the registration expression."}
     end.
   
  
  
  refactor_send_exprs(AnnAST, PidInfo, RegName) ->
      refac_util:full_buTP(fun do_refactor_send_exprs/2, AnnAST, {PidInfo, RegName}).
  
  do_refactor_send_exprs(Node, {PidInfo, RegName}) ->
      case refac_syntax:type(Node) of 
  	infix_expr -> Dest = refac_syntax:infix_expr_left(Node),
  		      Op = refac_syntax:infix_expr_operator(Node),
  		      Msg = refac_syntax:infix_expr_right(Node),
  
negative.code: 
  
  evaluate_expr(Files, ModName, AnnAST, FunDef, Expr) ->
      F = fun(E) ->
  		Es = [refac_syntax:revert(E)],
  		case catch erl_eval:exprs(Es, []) of 
  		    {value, V, _} -> {value, V};
  		    _ ->
  			FunName = refac_syntax:data(refac_syntax:function_name(FunDef)),
  			Arity = refac_syntax:function_arity(FunDef),
  			{StartPos, _} = refac_util:get_range(Expr),
  			{unknown, {ModName, FunName, Arity, StartPos}}
  		end
  	end,
      Exprs = case refac_util:get_free_vars(Expr) of 
  		[] -> [Expr];
  		_ ->  refac_slice:backward_slice(Files, AnnAST, ModName, FunDef, Expr)
  	    end,
      Values = lists:map(F, Exprs),
      Values.
  
  
  funs_called(Node) ->
      HandleSpecialFuns = fun (Arguments, S) ->
  				case Arguments of
  				    [M, F, A] ->
  					case {refac_syntax:type(M), refac_syntax:type(F), refac_syntax:type(A)} of
  					    {atom, atom, list} ->
  						ModName = refac_syntax:atom_value(M),
  						FunName = refac_syntax:atom_value(F),
  						Arity = refac_syntax:list_length(A),
  						ordsets:add_element({ModName, FunName, Arity}, S);
  					    _ -> S
  					end;
  				    [M, F, A, _O] ->
  					case {refac_syntax:type(M), refac_syntax:type(F), refac_syntax:type(A)} of
  					    {atom, atom, list} ->
  						ModName = refac_syntax:atom_value(M),
  						FunName = refac_syntax:atom_value(F),
  						Arity = refac_syntax:list_length(A),
  						ordsets:add_element({ModName, FunName, Arity}, S);
  					    _ -> S
  					end
  				end
  			end,
      F2 = fun (T, S) ->
  		 case refac_syntax:type(T) of
  		     application ->
  			 Op = refac_syntax:application_operator(T),
  			 Args= refac_syntax:application_arguments(T),
  			 case lists:keysearch(fun_def,1, refac_syntax:get_ann(Op)) of 
  			     {value, {fun_def, {M, F, A, _, _}}} ->
  				 S1 = ordsets:add_element({M, F, A}, S),
  				 case {M, F, A} of
  					{erlang, apply, 3} -> HandleSpecialFuns(Args, S1);
  					{erlang, spawn, 3} -> HandleSpecialFuns(Args, S1);
  					{erlang, spawn, 4} -> HandleSpecialFuns(Args, S1);
  					{erlang, spawn_link, 3} -> HandleSpecialFuns(Args, S1);
  					{eralng, spawn_link, 4} -> HandleSpecialFuns(Args, S1);
  				     _ -> S1
  				 end;
  			     _ -> S
  			 end;
  		     _ -> S
  		 end
  	 end,
      lists:usort(refac_syntax_lib:fold(F2, [], Node)).
  
  
  
  pos_to_spawn_match_expr(AnnAST, Start, End) ->
      Message = "You have not selected a match expression whose left-hand side is a PID, and right-hand side is a spawn expression!",
      case refac_util:pos_to_expr(AnnAST, Start, End) of 
  	{ok, Expr} ->
  	    case refac_syntax:type(Expr) of 
  		match_expr -> 
  		    P = refac_syntax:match_expr_pattern(Expr),
  		    B = refac_syntax:match_expr_body(Expr),
  		    case {is_spawn_app(B), refac_syntax:type(P) == variable} of 
  			{true, true} ->
  			    {ok, Expr};
  			_ -> {error, Message}
  		    end;
  		_ -> {error, Message}
  	    end;
  	_ -> {error, Message}    
      end.
  
  
  %% TODO: REFACTOR THE FOLLOWING TWO FUNCTIONS.
  pos_to_receive_expr(FunDef, Start) ->
      F = fun(T, Acc) ->
  		case refac_syntax:type(T)==receive_expr of 
  		    true -> [T|Acc];
  		    _ -> Acc
  		end
  	end,
      ReceiveExprs = refac_syntax_lib:fold(F, [], FunDef),
      lists:any(fun(E) ->
  		      {Start1, End1} = refac_util:get_range(E),
  		      (Start1 =< Start) andalso (Start =< End1)
  	      end, ReceiveExprs).
      
  
  pos_to_list_comp_expr(FunDef, Start) ->
      F = fun(T, Acc) ->
  		case refac_syntax:type(T) of 
  		    list_comp -> [T|Acc];
  		    _ -> Acc
  		end
  	end,
      ReceiveExprs = refac_syntax_lib:fold(F, [], FunDef),
      lists:any(fun(E) ->
  		      {Start1, End1} = refac_util:get_range(E),
  		      (Start1 =< Start) andalso (Start =< End1)
  	      end, ReceiveExprs).
  
  
  
  