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: 	
  	 
  
  -spec(get_parameters_eclipse/5::(MinLen::integer(), MinToks::integer(), MinFreq::integer(), 
  					 MaxNewVars::integer(),SimiScore::float())->
  					      {integer(), integer(), integer(), integer(),float()}).
  get_parameters_eclipse(MinLen1, MinToks1, MinFreq1, MaxNewVars1,SimiScore1) ->
      MinLen = case MinLen1 < 1 of
  		 true ->
  		     ?DEFAULT_LEN;
  	       _ -> MinLen1
  	     end,
      MinFreq = case MinFreq1 < ?DEFAULT_FREQ of
  		  true ->
  		      ?DEFAULT_FREQ;
  		  _ -> MinFreq1
  	      end,
      MinToks = case MinToks1 < 20 of
  		  true ->
  		      ?DEFAULT_TOKS;
  		  _ -> MinToks1
  	      end,
      MaxNewVars = case MaxNewVars1<0 of 
  		     true ->
  			 ?DEFAULT_NEW_VARS;
  		     _ -> MaxNewVars1
  		 end,			      
      SimiScore = case SimiScore1 >= 0.1 andalso SimiScore1 =< 1.0
  		of
  		    true -> SimiScore1;
  		    _ -> ?DefaultSimiScore
  		end,
      {MinLen, MinToks, MinFreq, MaxNewVars, SimiScore}.
  
  
  get_parameters(MinLen1, MinToks1 ,MinFreq1, MaxVars1, SimiScore1) ->
      MinLen = get_parameters_1(MinLen1, ?DEFAULT_LEN, 1),
      MinToks = get_parameters_1(MinToks1,?DEFAULT_TOKS, 20),
      MinFreq = get_parameters_1(MinFreq1, ?DEFAULT_FREQ,?DEFAULT_FREQ),
      MaxVars = get_parameters_1(MaxVars1, ?DEFAULT_NEW_VARS, 0),
      SimiScore = try
  