anchor.diff: -%% Copyright (c) 2009, Huiqing Li, Simon Thompson
  +%% Copyright (c) 2010, Huiqing Li, Simon Thompson
   %% All rights reserved.
   %%
   %% Redistribution and use in source and binary forms, with or without
  
positive.code: 		  end
  	  end,
      Acc = lists:append([refac_syntax_lib:fold(Fun, [], F) || F <- Forms]),
      case lists:member({RecordToTupleFunName, 1}, Acc) of
        true ->
  	  F1 = mk_record_to_tuple_fun(RecordName, RecordFields,RecordToTupleFunName),
  	  case lists:member({TupleToRecordFunName, 1}, Acc) of
  	    true ->
  		F2 = mk_tuple_to_record_fun(RecordName, RecordFields,TupleToRecordFunName),
  		Forms ++ [F1, F2];
  	    false ->
  		Forms ++ [F1]
  	  end;
        false ->
  	  case lists:member({TupleToRecordFunName, 1}, Acc) of
  	    true ->
  		F2 = mk_tuple_to_record_fun(RecordName, RecordFields, TupleToRecordFunName),
  		Forms ++ [F2];
  	    false ->
  		Forms
  	  end
      end.
  %% ======================================================================
  
  is_statemachine_used(ModuleInfo, gen_fsm) ->
      CallBacks = [{init, 1}],
      case lists:keysearch(attributes, 1, ModuleInfo) of 
  	{value, {attributes, Attrs}} ->
  	    lists:member({behaviour, gen_fsm}, Attrs);
  	false ->
  	    case lists:keysearch(functions, 1, ModuleInfo) of
  		{value, {functions, Funs}} ->
  		    CallBacks -- Funs == [];
  		false ->
  		    {error, "gen_fsm callback function init/1 is not defined."}
  	    end
      end;
  
  is_statemachine_used(ModuleInfo, eqc_statem) ->
      CallBacks = [{initial_state, 0}, {precondition, 2}, {command, 1},
  		 {postcondition, 3}, {next_state, 3}],
  
negative.code: 					   refac_syntax:atom(RecordToTupleFunName), [Expr])),
  	    case is_app(Expr, {TupleToRecordFunName, 1}) of
  		true ->
  		    hd(refac_syntax:application_arguments(Expr));
  		false ->
  		    NewExpr
  	    
  