anchor.diff:  %% {generator, modulename, functionname}
   %% {call, modulename, functionname, arglist}
   do_rename_fun_in_tuples(Node, {FileName, SearchPaths, ModName, OldName, NewName, Arity, Pid, TabWidth}) ->
  -    case refac_syntax:tuple_elements(Node) of 
  -	[E1, E2] ->
  -	    case refac_syntax:type(E2) of 
  -		atom -> case refac_syntax:atom_value(E2) of 
  -			    OldName ->
  -				case try_eval(FileName, E1, SearchPaths, TabWidth) of 
  -				    {value, ModName} ->
  -					Pid ! {add_renamed, {FileName, Node}},
  -					{copy_pos_attrs(Node, refac_syntax:tuple([E1, copy_pos_attrs(E2, refac_syntax:atom(NewName))])),
  -					 true};
  -				    _ -> {Node, false}
  +    case refac_syntax:tuple_elements(Node) of
  +      [E1, E2] ->
  +	  case refac_syntax:type(E2) of
  +	      atom -> case refac_syntax:atom_value(E2) of
  +			  OldName ->
  +			      case try_eval(FileName, E1, SearchPaths, TabWidth) of
  +				  {value, ModName} ->
  +				      Pid ! {add_renamed, {FileName, Node}},
  +				      {rewrite(Node, refac_syntax:tuple([E1, rewrite(E2, refac_syntax:atom(NewName))])),
  +				       true};
  +				  _ -> {Node, false}
  +			      end;
  +			  _ -> {Node, false}
  +		      end;
  +	      _ -> {Node, false}
  +	  end;
  +      [E1, E2, E3] ->
  +	  case refac_syntax:type(E3) of
  +	    atom -> case refac_syntax:atom_value(E3) of
  +		      OldName ->
  +			  case try_eval(FileName, E2, SearchPaths, TabWidth) of
  +			    {value, ModName} ->
  +				Pid ! {add_renamed, {FileName, Node}},
  +				{rewrite(Node, refac_syntax:tuple([E1, E2, rewrite(E3, refac_syntax:atom(NewName))])),
  +				 true};
  +			    _ -> {Node, false}
  +			  end;
  +		      _ -> {Node, false}
  +		    end;
  +	    _ -> case refac_syntax:type(E3) == integer andalso refac_syntax:integer_value(E3) == Arity orelse
  +			refac_syntax:type(E3) == list andalso refac_syntax:list_length(E3) == Arity orelse
  +			  refac_syntax:type(E3) == nil andalso Arity == 0
  +		     of
  +		   true ->
  +		       case refac_syntax:type(E2) of
  +			 atom -> case refac_syntax:atom_value(E2) of
  +				   OldName ->
  +				       case try_eval(FileName, E1, SearchPaths, TabWidth) of
  +					 {value, ModName} ->
  +					     Pid ! {add_renamed, {FileName, Node}},
  +					     {rewrite(Node, refac_syntax:tuple([E1, rewrite(E2, refac_syntax:atom(NewName)), E3])), true};
  +					 _ -> {Node, false}
  +				       end;
  +				   _ -> {Node, false}
  +				 end;
  +			 _ -> {Node, false}
  +		       end;
  +		   _ -> {Node, false}
  +		 end
  +	  end;
  +      [E1, E2, E3, E4] ->
  +	  case refac_syntax:type(E3) of
  +	    atom -> case refac_syntax:atom_value(E3) of
  +		      OldName ->
  +			  case try_eval(FileName, E2, SearchPaths, TabWidth) of
  +			    {value, ModName} ->
  +				case refac_syntax:type(E4) == list andalso refac_syntax:list_length(E4) == Arity orelse
  +				       refac_syntax:type(E4) == nil andalso Arity == 0
  +				    of
  +				  true ->
  +				      Pid ! {add_renamed, {FileName, Node}},
  +				      {rewrite(Node, refac_syntax:tuple([E1, E2, rewrite(E3, refac_syntax:atom(NewName)), E4])),
  +				       true};
  +				  _ ->
  +				      {Node, false}
   				end;
   			    _ -> {Node, false}
  -			end;
  -		_ -> {Node, false}
  -	    end;
  -	[E1, E2, E3] -> 
  -	    case refac_syntax:type(E3) of 
  -		atom -> case refac_syntax:atom_value(E3) of 
  -			    OldName ->
  -				case try_eval(FileName, E2, SearchPaths, TabWidth) of
  -				    {value, ModName} ->
  -					Pid ! {add_renamed, {FileName, Node}},
  -					{copy_pos_attrs(Node, refac_syntax:tuple([E1, E2, copy_pos_attrs(E3, refac_syntax:atom(NewName))])),
  -					 true};
  -				    _  -> {Node, false}
  -				end;
  -				    _ -> {Node, false}
  -			end;
  -		_ -> case (refac_syntax:type(E3)==integer andalso refac_syntax:integer_value(E3)==Arity) orelse
  -			 (refac_syntax:type(E3)==list andalso refac_syntax:list_length(E3) ==Arity) orelse
  -			 (refac_syntax:type(E3)==nil andalso Arity==0) of 
  -			 true ->
  -			     case refac_syntax:type(E2) of 
  -				 atom -> case refac_syntax:atom_value(E2) of 
  -					     OldName -> 
  -						 case try_eval(FileName, E1, SearchPaths, TabWidth) of
  -						     {value, ModName} ->
  -							 Pid ! {add_renamed, {FileName, Node}},
  -							 {copy_pos_attrs(Node, refac_syntax:tuple([E1, copy_pos_attrs(E2, refac_syntax:atom(NewName)), E3])),true};
  -						     _ -> {Node, false}
  -						     end;
  -					     _ -> {Node, false}
  -					     end;
  -				 _->{Node, false}
  -			     end;
  -			 _ -> {Node, false}
  -		     end
  -	    end;
  -	[E1, E2, E3, E4] ->
  -	    case refac_syntax:type(E3) of 
  -		atom -> case refac_syntax:atom_value(E3) of 
  -			    OldName ->
  -				case try_eval(FileName, E2, SearchPaths, TabWidth) of
  -				    {value, ModName} ->
  -					case ((refac_syntax:type(E4)==list) andalso (refac_syntax:list_length(E4)==Arity)) orelse
  -					    ((refac_syntax:type(E4)==nil) andalso Arity==0) of
  -					    true ->
  -						Pid ! {add_renamed, {FileName, Node}},
  -						{copy_pos_attrs(Node, refac_syntax:tuple([E1, E2, copy_pos_attrs(E3, refac_syntax:atom(NewName)), E4])),
  -						 true};
  -					    _ ->
  -						{Node, false}
  -					end;
  -				    _ -> {Node, false}
  -				end;
  -			    _ -> {Node, false}
  -			end;
  -		_ -> {Node, false}
  -	    end;
  -	_ -> {Node, false}
  +			  end;
  +		      _ -> {Node, false}
  +		    end;
  +	    _ -> {Node, false}
  +	  end;
  +      _ -> {Node, false}
       end.
   
   
  
positive.code:     output_renamed_atom_info(Renamed).
  
  output_not_renamed_atom_info(FileAndPositions) ->
      Msg = lists:flatmap(fun({FileName, Positions}) ->
  				lists:flatmap(fun(P) ->
  						      {Line, _Col} = P,
  						      FileName++io_lib:format(":~p: \n",[Line])
  					      end, Positions)
  			end, FileAndPositions),
      ?wrangler_io(Msg, []).
  
  output_renamed_atom_info(FileAndExprs) ->
      Msg = lists:flatmap(fun({FileName, Exprs}) ->
  				lists:flatmap(fun(Expr) ->
  						      {Line, _Col} = refac_syntax:get_pos(Expr),
  						      FileName++io_lib:format(":~p: ", [Line])++ refac_prettypr:format(Expr)++"\n"
  					      end, Exprs)
  			end, FileAndExprs),
      ?wrangler_io(Msg, []).
      
  copy_pos_attrs(E1, E2) ->
      refac_syntax:copy_pos(E1, refac_syntax:copy_attrs(E1, E2)).    
      
  
      
      
      
  		       
  
       
  
  
      
       
       
  
negative.code:     Toks = refac_util:tokenize(FileName, false, TabWidth),
      {StartPos, EndPos} = refac_util:get_range(Node),
      Toks1 = lists:dropwhile(fun(T) ->
  				    token_loc(T) < StartPos 
  			    end, Toks),
      lists:takewhile(fun(T) ->
  			    token_loc(T) =< EndPos 
  		    end, Toks1).
      
  
  token_loc(T) ->
      case T of
  