anchor.diff:      stop_clone_check_process(CloneCheckerPid),
       stop_ast_process(ASTPid),
       Cs3 = combine_clones_by_au(Cs2),
  -    %%Time2 = time(),
  -    refac_code_search_utils:display_clone_result(Cs3, "Similar"),
  -    ?debug("Time used: \n~p\n", [{Time1, Time2}]).
  -    
  +   %% ?wrangler_io("Time used: \n~p\n", [{Time1, Time2}]).
  +    case Editor of 
  +	emacs ->
  +	    refac_code_search_utils:display_clone_result(Cs3, "Similar");
  +	_ -> Cs3
  +    end.
  +   
   %% Get files that are deleted/changed/newly added since the last 
   %% run of the clone detection.
   %% This function 
  
positive.code:  %% 	  au       %% the anti-unification of the clone class.
   %% 	 }).
  
  %%-spec(inc_sim_code_detection_in_buffer/8::(FileName::filename(), MinLen::float(), MinToks::integer(),
  %%				 MinFreq::integer(),  MaxVars:: integer(),SimiScore::float(), 
  %%				 SearchPaths::[dir()], TabWidth::integer()) -> {ok, string()}).
  inc_sim_code_detection_in_buffer(FileName, MinLen1, MinToks1, MinFreq1, MaxVars1, SimiScore1, SearchPaths, TabWidth)->
      inc_sim_code_detection([FileName], MinLen1, MinToks1, MinFreq1, MaxVars1, SimiScore1, SearchPaths, TabWidth).
    
  %%-spec(inc_sim_code_detection/8::(DirFileList::[filename()|dir()], MinLen::float(), MinToks::integer(),
  %%				 MinFreq::integer(),  MaxVars:: integer(),SimiScore::float(), 
  %%				 SearchPaths::[dir()], TabWidth::integer()) -> {ok, string()}).
  inc_sim_code_detection(DirFileList, MinLen1, MinToks1, MinFreq1, MaxVars1, SimiScore1, SearchPaths, TabWidth) ->
      ?wrangler_io("\nCMD: ~p:inc_sim_code_detection(~p,~p,~p,~p,~p, ~p,~p,~p).\n",
  		 [?MODULE, DirFileList, MinLen1, MinToks1, MinFreq1, MaxVars1,SimiScore1, SearchPaths, TabWidth]),
      {MinLen, MinToks, MinFreq, MaxVars, SimiScore} = get_parameters(MinLen1, MinToks1, MinFreq1, MaxVars1, SimiScore1),
      Files = refac_util:expand_files(DirFileList, ".erl"),
      case Files of
  	[] ->
  	    ?wrangler_io("Warning: No files found in the searchpaths specified.", []);
  	_ ->
  	    %% dets tables used to cache information.
  	    Tabs=#tabs{ast_tab=from_dets(ast_tab, ?ASTTab),
  		       var_tab=from_dets(var_tab, ?VarTab),
  		       file_hash_tab=from_dets(file_hash_tab, ?FileHashTab),
  		       exp_hash_tab=from_dets(expr_hash_tab, ?ExpHashTab),
  		       clone_tab = from_dets(expr_clone_tab, ?CloneTab),
  		       tmp_ast_tab = ets:new(tmp_ast_tab, [set, public])},
  
              %% Threshold parameters.
  	    Threshold=#threshold{min_len=MinLen, 
  				 min_freq=MinFreq, 
  				 min_toks=MinToks, 
  				 max_new_vars=MaxVars,
  				 simi_score=SimiScore},
              %% Clone detection.
  	    inc_sim_code_detection(Files, Threshold, Tabs, SearchPaths, TabWidth),
             
              %% output cache information to dets tables.
  	    to_dets(Tabs#tabs.ast_tab, ?ASTTab),
  	    to_dets(Tabs#tabs.var_tab, ?VarTab),
  	    to_dets(Tabs#tabs.file_hash_tab, ?FileHashTab),
  	    to_dets(Tabs#tabs.exp_hash_tab, ?ExpHashTab),	    
  	    to_dets(Tabs#tabs.clone_tab, ?CloneTab),
  	    file:write_file(?Threshold, term_to_binary(Threshold)),
  	    ets:delete(Tabs#tabs.tmp_ast_tab)
      end,
      {ok, "Clone detection finish."}.
  
  %% incremental clone detection.
  inc_sim_code_detection(Files, Thresholds, Tabs, SearchPaths, TabWidth) ->
     
      %%Time1 = time(),
      %% get file status change info.
  
negative.code:     %% Generate clone candidates using suffix tree based clone detection techniques.
      Dir = filename:dirname(hd(Files)),
      Cs = get_clone_candidates(ASTPid, Thresholds, Dir),
      %% Time2 = time(),
      %%?wrangler_io("\nInitial candiates finished\n", []),
      
      ?wrangler_io("\nNumber of initial clone candidates: ~p\n", [length(Cs)]),
      CloneCheckerPid = start_clone_check_process(),
  