anchor.diff:  %% 
   %% @end
   %% =====================================================================
  -create_apply(Args, AnnAST, RecName, FieldList, List, Operator, Node)->
  -  case Args of
  -    {not_tuple, First, Last, Tuple}->
  -      case analyze_tuple(AnnAST, Tuple, length(FieldList)) of
  -        false -> 
  -          Args3 = List ++ [refac_syntax:list(First ++ [Tuple] ++ Last)],
  -          {refac_syntax:copy_attrs(Node, 
  -              refac_syntax:application(Operator, Args3)), false};
  -        true -> 
  -          TupleElements = get_tuple_elements(Tuple, 1, [],length(FieldList)),
  -          NewRecFields = lists:map(fun({FName, Value})->
  -                                 refac_syntax:record_field(
  -                                           refac_syntax:atom(FName),Value)
  -                               end, lists:zip(FieldList, TupleElements)),
  -          NewRecName = refac_syntax:atom(RecName),
  -          NewRec = [refac_syntax:record_expr(none, NewRecName, NewRecFields)],
  -          NewAppArg = First ++ NewRec ++ Last,
  -          Args3 = refac_syntax:list(NewAppArg),
  -          {refac_syntax:copy_attrs(Node, 
  -              refac_syntax:application(Operator, List ++ [Args3])), false};
  -        unknown ->
  -          create_case_apply(Node,First,Last,Tuple,RecName,
  -                           FieldList,Operator,List)
  -      end;
  -    _ -> 
  -      Args3 = refac_syntax:list(Args),
  -      {refac_syntax:copy_attrs(Node, 
  -              refac_syntax:application(Operator, List ++ [Args3])), false}
  -  end.
  +create_apply(Args, AnnAST, RecName, FieldList, List, Operator, Node) ->
  +    case Args of
  +      {not_tuple, First, Last, Tuple} ->
  +	  case analyze_tuple(AnnAST, Tuple, length(FieldList)) of
  +	    false ->
  +		Args3 = List ++ [refac_syntax:list(First ++ [Tuple] ++ Last)],
  +		{refac_syntax:copy_attrs(Node,
  +					 refac_syntax:application(Operator, Args3)), false};
  +	    true ->
  +		TupleElements = get_tuple_elements(Tuple, 1, [], length(FieldList)),
  +		
  +		NewRec =  mk_record_expr(RecName, FieldList, TupleElements),
  +		NewAppArg = First ++ NewRec ++ Last,
  +		Args3 = refac_syntax:list(NewAppArg),
  +		{refac_syntax:copy_attrs(Node,
  +					 refac_syntax:application(Operator, List ++ [Args3])), false};
  +	    unknown ->
  +		create_case_apply(Node, First, Last, Tuple, RecName,
  +				  FieldList, Operator, List)
  +	  end;
  +      _ ->
  +	  Args3 = refac_syntax:list(Args),
  +	  {refac_syntax:copy_attrs(Node,
  +				   refac_syntax:application(Operator, List ++ [Args3])), false}
  +    end.
   
   
   %% =====================================================================
  
positive.code: %% 
  %% @end
  %% =====================================================================
  create_new_patterns(Patterns, N, RecName, FieldList)->
    Last = lists:nthtail(N, Patterns),
    First = Patterns -- lists:nthtail(N-1,Patterns),
    [Tuple] = (Patterns -- Last) -- First,
    case refac_syntax:type(Tuple)== tuple andalso 
         length(refac_syntax:tuple_elements(Tuple)) == length(FieldList) of 
      true ->
        TupleElements = refac_syntax:tuple_elements(Tuple),
        NewRecFields = lists:map(fun({FName, Value})->
                                   refac_syntax:record_field(
                                             refac_syntax:atom(FName),Value)
                                 end, lists:zip(FieldList,TupleElements)),
        NewRecName = refac_syntax:atom(RecName),
        NewRec = [refac_syntax:record_expr(none, NewRecName, NewRecFields)],
        First ++ NewRec ++ Last;
      false -> {not_tuple, First, Last, Tuple}
    end.
  
  
  %% =====================================================================
  
negative.code:     _ -> {Node, false}
    end.
  
  mk_record_expr(RecName, FieldList, TupleElements) ->
      NewRecFields = lists:map(fun ({FName, Value}) ->
  				     refac_syntax:record_field(
  				       refac_syntax:atom(FName), Value)
  			     end, lists:zip(FieldList, TupleElements)),
      NewRecName = refac_syntax:atom(RecName),
      [refac_syntax:record_expr(none, NewRecName, NewRecFields)].
      
  