anchor.diff:  -include("../include/wrangler.hrl").
   
   %% minimal number of tokens.
  --define(DEFAULT_CLONE_LEN, 20).
  +-define(DEFAULT_CLONE_LEN, 40).
   
   %% Minimal number of class members.
   -define(DEFAULT_CLONE_MEMBER, 2).
  
positive.code:     throw({error, anti_unification_failed});
  get_anti_unifier_1([{Expr, EVs}]) -> generalise_expr({Expr, EVs}, []);
  get_anti_unifier_1([{Expr, EVs}| Exprs]) ->
      Res = [expr_anti_unification(Expr, E, ExportedVars)
  	   || {E, ExportedVars} <- Exprs],
      {Nodes1, EVs1} = lists:unzip(Res),
      GroupedNodes = group_subst_nodes(Nodes1),
      Pid = refac_code_search_utils:start_counter_process(),
      NodeVarPairs = lists:append([lists:zip(Ns, lists:duplicate(length(Ns),
  							       refac_code_search_utils:gen_new_var_name(Pid)))
  				 || Ns <- GroupedNodes]),
      refac_code_search_utils:stop_counter_process(Pid),
      generalise_expr({Expr, EVs}, {NodeVarPairs, lists:usort(lists:append(EVs1))}).
  
  
  expr_anti_unification(Exp1, Exp2, Expr2ExportedVars) ->
      try
        do_expr_anti_unification(Exp1, Exp2)
      of
        SubSt ->
  	  EVs1 = [{refac_syntax:variable_name(E1), get_var_define_pos(E1)}
  		  || {E1, E2} <- SubSt, refac_syntax:type(E2) == variable,
  		     lists:member({refac_syntax:variable_name(E2), get_var_define_pos(E2)}, Expr2ExportedVars)],
  	  SubSt1 = [{E1, E2} || {E1, E2} <- SubSt, refac_syntax:type(E1) /= variable orelse is_macro_name(E1)],
  	  Nodes = group_substs(SubSt1),
  	  {Nodes, EVs1}
      catch
        _ ->
  	  {[], []}
      end.
  
  group_substs(Subst) ->
  
negative.code:     case lists:keysearch(category, 1, refac_syntax:get_ann(Exp)) of
  	{value, {category, {macro_name, _, _}}} ->
  	    true;
  	_ ->
  	    false
      end.
   
  
  