anchor.diff:  
   -include("../hrl/wrangler.hrl").
   
  --define(DEFAULT_MIN_CLONE_LEN, 20).  %% minimal number of tokens.
  --define(DEFAULT_MIN_CLONE_MEMBER, 2).
  +%% minimal number of tokens.
  +-define(DEFAULT_MIN_CLONE_LEN, 20).
  +
  +%% minimal number of duplication times.
  +-define(DEFAULT_MIN_CLONE_MEMBER, 1).
  +
  +
  +%%-define(DEBUG, true).
  +
  +-ifdef(DEBUG).
  +-define(debug(__String, __Args), io:format(__String, __Args)).
  +-else.
  +-define(debug(__String, __Args), ok).
  +-endif.
   
   %% ==================================================================================
   %% @doc Find duplicated code in a Erlang source files.
  
positive.code: %% combine the ranges within two continuous branches if possible.
  extend_range(SuffixTree) ->
      extend_range([],SuffixTree).
  extend_range(_Prev_Range, {branch, {Range, {Len, Freq}}, leaf}) ->
       {branch, {Range, {Len,Freq}}, leaf};
  extend_range(Prev_Range,{branch, {Range, {Len, Freq}}, Bs}) -> 
       ExtendedRange = lists:map(fun(R) -> combine_range(Prev_Range, R) end, Range),
       case overlapped_range(ExtendedRange) orelse
   	 (lists:subtract(ExtendedRange, Range) =/= ExtendedRange) of 
   	true -> Bs1=lists:map(fun(B) -> extend_range(Range, B) end, Bs), 
   		{branch, {Range, {Len, Freq}}, Bs1};
   	false -> Bs1 = lists:map(fun(B) -> extend_range(ExtendedRange,B) end, Bs),
   		 {S, E} = hd(ExtendedRange),
   		 {branch, {ExtendedRange, {E-S+1, Freq}}, Bs1}
       end.
  
  overlapped_range(R) -> overlapped_range_1(lists:usort(R)).
  
  
negative.code:      end.
  
  
  %%================================================================================
  
  remove_sub_clones(Cs) ->
      Cs1 = lists:sort(fun({_Range1, Len1, F1},{_Range2, Len2, F2})
  