anchor.diff:  	_ -> display_clones_1(Cs, Str)
       end.
   display_clones_1([], Str) -> Str ++ "\n";
  -display_clones_1([{Ranges, _Len, F}| Cs], Str) ->
  +display_clones_1([{Ranges, _Len, F, Code}| Cs], Str) ->
       [{{File, StartLine, StartCol}, {File, EndLine, EndCol}}| Range] = lists:keysort(1, Ranges),
       NewStr = compose_clone_info({File, StartLine, StartCol}, {File, EndLine, EndCol}, F, Range, Str),
  -    display_clones_1(Cs, NewStr).
  +    NewStr1 = NewStr ++ "The duplicated expression/function after generalisation:\n\n"++ io_lib:format("~s", [Code]) ++ "\n",
  +    display_clones_1(Cs, NewStr1).
   
   compose_clone_info({File, StartLine, StartCol}, {File, EndLine, EndCol}, F, Range, Str) ->
       case F - 1 of
   	1 -> Str1 = Str ++ "\n" ++ File ++ io_lib:format(":~p.~p-~p.~p: This code has been duplicated once:\n",
  -							 [StartLine, StartCol - 1, EndLine, EndCol]),
  +							 [StartLine, lists:max([1, StartCol-1]), EndLine, EndCol]),
   	     display_clones_2(Range, Str1);
   	2 -> Str1 = Str ++ "\n" ++ File ++ io_lib:format(":~p.~p-~p.~p: This code has been duplicated twice:\n",
  -							 [StartLine, StartCol - 1, EndLine, EndCol]),
  +							 [StartLine, lists:max([1, StartCol-1]), EndLine, EndCol]),
   	     display_clones_2(Range, Str1);
   	_ -> Str1 = Str ++ "\n" ++ File ++ io_lib:format(":~p.~p-~p.~p: This code has been duplicated ~p times:\n",
  -							 [StartLine, StartCol - 1, EndLine, EndCol, F - 1]),
  +							 [StartLine, lists:max([1, StartCol-1]), EndLine, EndCol, F - 1]),
   	     display_clones_2(Range, Str1)
       end.
   
  
positive.code: 	{char, _, _} ->'C' ;        
  	{A, _} -> case lists:keysearch(A, 1, alphabet_1()) of
  		      {value, {A, Value}} -> Value;
  		      _  -> erlang:error(?wrangler_io("Unhandled token:\n~p\n", [T]))
  		  end
      end.
  
  
negative.code: 
  %% ===========================================================================
  %% display the found-out clones to the user.
  
  display_clone_result(Cs) ->
      case length(Cs) >=1  of 
  	true -> display_clones_by_freq(Cs),
  		display_clones_by_length(Cs);
  	false -> ?wrangler_io("\nDuplicated code detection finished with no clones found.\n", [])
      end.
      
  display_clones_by_freq(Cs) ->
      ?wrangler_io("\n===================================================================\n",[]),
      ?wrangler_io("Duplicated Code Detection Results Sorted by the Number of Times Being Duplicated.\n",[]),
      ?wrangler_io("======================================================================\n",[]),		 
      ?wrangler_io(display_clones(Cs),[]).
  
  display_clones_by_length(Cs) ->
      ?wrangler_io("\n===================================================================\n",[]),
      ?wrangler_io("Duplicated Code Detection Results Sorted by the Size of the Duplicated Code.\n",[]),
      ?wrangler_io("======================================================================\n",[]),		 
      Cs1 = lists:sort(fun({_Range1, Len1, F1, _},{_Range2, Len2, F2,_})
  			-> {Len1, F1} >= {Len2, F2}
  		     end, Cs),
      ?wrangler_io(display_clones(Cs1),[]).
  