anchor.diff:  
   -export([init/1, collect_vars/1]).
   
  --export([get_clones_by_suffix_tree/5,
  -	 get_clones_by_erlang_suffix_tree/4, 
  +-export([get_clones_by_suffix_tree/6,
  +	 get_clones_by_erlang_suffix_tree/5, 
   	 display_clone_result/2, remove_sub_clones/1]).
   
   -compile(export_all).
  
positive.code: 		  _E -> ?debug("Reason:\n~p\n", [_E]),
  			stop_suffix_tree_clone_detector(),
  			file:delete(OutFileName),
  			get_clones_by_erlang_suffix_tree(ProcessedToks, MinLength, MinClones, Alphabet)
  		    
  	      end;	
  	_ ->  get_clones_by_erlang_suffix_tree(ProcessedToks, MinLength, MinClones, Alphabet)
      end.
  
  get_clones_by_erlang_suffix_tree(ProcessedToks, MinLength, MinClones, Alphabet) ->
      ?wrangler_io("\nWrangler failed to use the C suffixtree implementation;"
                   " Initial clones are calculated using Erlang suffixtree implementation.\n",[]),
      Tree = suffix_tree(Alphabet, ProcessedToks ++ "&"),
      Cs = lists:flatten(lists:map(fun (B) ->
  					 collect_clones(MinLength, MinClones, B)
  				 end,
  
negative.code:   
  %% ===========================================================================
  %% combine the ranges within two continuous branches if possible.
  extend_range(SuffixTree, AllowOverLap) ->
      extend_range([],SuffixTree, AllowOverLap).
  
  extend_range(Prev_Range, {branch, {Range, {_Len, Freq}}, leaf}, _AllowOverLap) ->
      ExtendedRange = lists:map(fun (R) -> combine_range(Prev_Range, R) end, Range),
      {S, E} = hd(ExtendedRange),
      {branch, {ExtendedRange, {E-S+1, Freq}}, leaf};
  extend_range(Prev_Range, {branch, {Range, {Len, Freq}}, Bs}, AllowOverLap) ->
      ExtendedRange = lists:map(fun (R) -> combine_range(Prev_Range, R) end, Range),
      case (AllowOverLap==0) andalso overlapped_range(ExtendedRange) of 
  	true ->  Bs1 = lists:map(fun (B) -> extend_range(Range, B, AllowOverLap) end, Bs),
  		 {branch, {Range, {Len, Freq}}, Bs1};
  	_ -> 
  	    Bs1 = lists:map(fun (B) -> extend_range(ExtendedRange, B, AllowOverLap) end, Bs),
  	    {S, E} = hd(ExtendedRange),
  	    {branch, {ExtendedRange, {E - S + 1, Freq}}, Bs1}
      end.
  
  
  overlapped_range(R) -> overlapped_range_1(lists:usort(R)).
  