anchor.diff:  	 var_tab, 
   	 file_hash_tab,
   	 exp_hash_tab,
  -	 clone_tab}).
  +	 clone_tab,
  +	 tmp_ast_tab
  +	}).
   
   %% A record representing a clone class.
    %% -record(clone, 
  
positive.code: 	    remove_sub_clone_pairs(CPs,Acc);
  	_ -> remove_sub_clone_pairs(CPs, [CP|Acc])
      end.
  		
  get_clone_classes(ClonePairs,Thresholds, Tabs, TmpASTTab) ->
      RangeGroups = lists:usort([Rs || {Rs, _, _} <- ClonePairs]),
      %%refac_io:format("ClonePairs:\n~p\n", [ClonePairs]),
      %% refac_io:format("RangeGroups:\n~p\n", [RangeGroups]),
      CloneClasses = lists:append([get_one_clone_class(Range, ClonePairs, Thresholds, Tabs, TmpASTTab) 
  				 || Range <- RangeGroups]),
      %%refac_io:format("CloneClasses:\n~p\n", [CloneClasses]),
      lists:keysort(2, CloneClasses).
   
  get_one_clone_class(Range, ClonePairs, Thresholds, Tabs, TmpASTTab) ->
      Res = lists:append([get_one_clone_class_1(Range, ClonePair, Tabs, TmpASTTab)
  			|| ClonePair <- ClonePairs]),
      Freq = length(Res) + 1,
      case Freq >= Thresholds#threshold.min_freq of
        true ->
  	  Exprs = get_expr_list(Range, TmpASTTab),
  	  [{{FName, FunName, Arity, _}, _, _,_}| _] = Range,
  	  VarTab = Tabs#tabs.var_tab,
  	  VarsToExport = get_vars_to_export(Exprs, {FName, FunName, Arity}, VarTab),
  	  {Ranges, ExportVars, SubSt} = lists:unzip3(Res),
  	  ExportVars1 = {element(1, lists:unzip(VarsToExport)), lists:usort(lists:append(ExportVars))},
  	  [{[Range| Ranges], {length(Range), length(Ranges) + 1}, {Range, SubSt, ExportVars1}}];
        _ ->
  	  []
      end.
  get_one_clone_class_1(Range, _ClonePair = {Range1, Range2, Subst}, Tabs, TmpASTTab) ->
      case Range -- Range1 == [] of
        true ->
  	    Len = length(Range),
  	    R = hd(Range),
  	    StartIndex=length(lists:takewhile(fun (R0) -> R0 /= R end, Range1))+1,
  	   %% refac_io:format("StartIndex:\n~p\n",[StartIndex]),
  	    SubRange2 = lists:sublist(Range2, StartIndex, Len),
  	    SubSubst = lists:append(lists:sublist(Subst, StartIndex, Len)),
  	    Exprs2 = get_expr_list(SubRange2, TmpASTTab),
  	    [{{FName, FunName, Arity, _}, _, _, _}| _] = SubRange2,
  	    VarTab = Tabs#tabs.var_tab,
  	    VarsToExport2 = get_vars_to_export(Exprs2, {FName, FunName, Arity}, VarTab),
  	    EVs = [E1 || {E1, E2} <- SubSubst, refac_syntax:type(E2) == variable,
  			 lists:member({refac_syntax:variable_name(E2), get_var_define_pos(E2)},
  				      VarsToExport2)],
  	    [{SubRange2, EVs, SubSubst}];
        	false ->
  	    []
      end.
  
  					 
      
  
  
  
  do_anti_unification({Range1,Exprs1}, {Range2, Exprs2}) ->
     %% refac_io:format("Data:\n~p\n",[{{Range1,Exprs1}, {Range2, Exprs2}}]),
      ZippedExprs1=lists:zip(Range1, Exprs1),
      ZippedExprs2=lists:zip(Range2, Exprs2),
      ZippedExprs=lists:zip(ZippedExprs1, ZippedExprs2),
      [begin
  	 {Index1, Index2,
  	  do_anti_unification_1(E1,E2)}
       end|| {{Index1,E1}, {Index2, E2}}<-ZippedExprs].
      
  do_anti_unification_1(E1, E2) ->
      SubSt=anti_unification:anti_unification(E1,E2),
      case SubSt of 
  	none -> none;
  	_ -> case subst_sanity_check(E1, SubSt) of
  		 true ->
  		     SubSt;
  		 false ->
  		     none
  	     end
      end.
  
  %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  %%                                                                  %%
  
negative.code:     F = fun ({Elem, I}) ->
  		lists:duplicate(length(F0(I)), {I, Elem})
  	end,
      IndexStr = lists:append([F0(I) || {_, I} <- Data]),
      SuffixTreeExec = filename:join(?WRANGLER_DIR, "bin/suffixtree"),
      Cs = suffix_tree:get_clones_by_suffix_tree(Dir, IndexStr ++ "&", MinLen, 
  