anchor.diff:  
   %% Search the clones of an expression from Tree.
   search_one_expr(Tree, Exp) ->
  -    Exp1  = simplify_expr(Exp),
  +    SimplifiedExp = simplify_expr(Exp),
       BdStructExp = var_binding_structure([Exp]),
  -    F = fun(T, Acc) ->
  -		case refac_util:is_expr(T) of 
  -		    true -> T1 = simplify_expr(T),
  -			    case Exp1 == T1 of 
  -				true -> 
  -				    BdStructT = var_binding_structure([T]),
  -				    case BdStructExp == BdStructT of 
  -					true ->
  -					    {{StartLn, StartCol}, {EndLn, EndCol}}= refac_util:get_range(T),
  -					    Acc ++ [{{StartLn, StartCol}, {EndLn, EndCol}}];
  -					    _  -> Acc
  -				    end;
  -				_ -> Acc
  -			    end;
  +    F = fun (T, Acc) ->
  +		case refac_util:is_expr(T) of
  +		  true -> T1 = simplify_expr(T),
  +			  case SimplifiedExp == T1 of
  +			      true ->
  +				  case var_binding_structure([T]) of
  +				      BdStructExp ->
  +					  StartEndLoc = refac_util:get_range(T),
  +					  [StartEndLoc| Acc];
  +				      _ -> Acc
  +				  end;
  +			      _ -> Acc
  +			  end;
   		    _ -> Acc
   		end
   	end,
  -    refac_syntax_lib:fold(F, [], Tree).
  -    
  -
  -%% search the clones of an expresion sequence from Tree.			
  +    lists:reverse(refac_syntax_lib:fold(F, [], Tree)).
  +    
  +
  +%% Search for the clones of an expresion sequence.
   search_expr_seq(Tree, ExpList) ->
       AllExpList = contained_exprs(Tree, length(ExpList)),
  -   lists:flatmap(fun(EL) ->get_clone(ExpList, EL) end, AllExpList).
  +    lists:flatmap(fun(EL) ->get_clone(ExpList, EL) end, AllExpList).
      
  -    
  -    
  -get_clone(List1, List2) ->    
  -    Len1 = length(List1),
  -    Len2 = length(List2),
  -    case Len1 =< Len2 of 
  -	true -> 
  -	    List11 = lists:map(fun(T) -> simplify_expr(T) end, List1),
  -	    List21 = lists:map(fun(T) -> simplify_expr(T) end, List2),
  -	    case lists:prefix(List11, List21) of 
  -		true ->
  -		    List22 = lists:sublist(List2, Len1),
  -		    BdList1 = var_binding_structure(List1),
  -		    BdList2 = var_binding_structure(List22),
  -		    case BdList1 == BdList2 of 
  -			true ->
  -			    E1 = hd(List22),
  -			    En = lists:last(List22),
  -			    {{StartLn, StartCol}, _EndLoc} = refac_util:get_range(E1),
  -			    {_StartLoc1, {EndLn, EndCol}} = refac_util:get_range(En),
  -			    [{{StartLn, StartCol}, {EndLn, EndCol}}] ++ get_clone(List1, tl(List2));
  -			_ -> get_clone(List1, tl(List2))
  -		    end;				       
  -		    _ -> get_clone(List1, tl(List2))
  -		end;			
  -	_  -> []
  +get_clone(ExpList1, ExpList2) ->
  +    Len1 = length(ExpList1),
  +    Len2 = length(ExpList2),
  +    case Len1 =< Len2 of
  +      true ->
  +	  SimplifiedExpList1 = simplify_expr(ExpList1),
  +	  SimplifiedExpList2 = simplify_expr(ExpList2),
  +	  case lists:prefix(SimplifiedExpList1, SimplifiedExpList2) of
  +	    true ->
  +		  List22 = lists:sublist(ExpList2, Len1),
  +		  BdList1 = var_binding_structure(ExpList1),
  +		  BdList2 = var_binding_structure(List22),
  +		  case BdList1 == BdList2 of
  +		      true ->
  +			  E1 = hd(List22),
  +			  En = lists:last(List22),
  +			  {StartLoc, _EndLoc} = refac_util:get_range(E1),
  +			  {_StartLoc1, EndLoc1} = refac_util:get_range(En),
  +			  [{StartLoc, EndLoc1}] ++ get_clone(ExpList1, tl(ExpList2));
  +		      _ -> get_clone(ExpList1, tl(ExpList2))
  +		  end;
  +	      _ -> get_clone(ExpList1, tl(ExpList2))
  +	  end;
  +	_ -> []
       end.
   	    
   
  -%% simplify an expression by masking variable names and literal variables, and also replace
  -%% the concrete location values with the default value.
  +%% Simplify expressions by masking variable names, literals and locations.
  +simplify_expr(Exp)when is_list(Exp) ->
  +    [simplify_expr(E)|| E<-Exp];
   simplify_expr(Exp) ->
  -    refac_util:full_buTP(fun(Node,_Others)->do_simplify_expr(Node) end, Exp,{}).
  +    refac_util:full_buTP(
  +      fun(Node,_Others)->
  +	      do_simplify_expr(Node) 
  +      end, Exp,{}).
  +
   
   do_simplify_expr(Node) ->
       Node1 = case refac_syntax:type(Node) of 
  
positive.code: %% <p> When the selected code contains multiple, but non-continuous sequence of, expressions, the first
  %% continuous sequence of expressions is taken as the user-selected expression. A continuous sequence of
  %% expressions is a sequence of expressions separated by ','.
  %% <p>
  %% =================================================================================================
  %% @spec expr_search(FileName::filename(), Start::Pos, End::Pos)-> term().
  %% =================================================================================================         
  
  %%-spec(expr_search/4::(filename(), pos(), pos(), integer()) -> {ok, [{integer(), integer(), integer(), integer()}]} | {error, string()}).    
  expr_search(FileName, Start={Line, Col}, End={Line1, Col1}, TabWidth) ->
      ?wrangler_io("\nCMD: ~p:expr_search(~p, {~p,~p},{~p,~p},~p).\n", [?MODULE, FileName, Line, Col, Line1, Col1, TabWidth]),
      {ok, {AnnAST, _Info}} =refac_util:parse_annotate_file(FileName,true, [], TabWidth),
      case refac_util:pos_to_expr_list(AnnAST, Start, End) of 
  	[E|Es] -> 
  	    Res = case Es == [] of 
  		      true ->
  			  SE = refac_sim_expr_search:get_start_end_loc(E),
  			  SearchRes = search_one_expr(AnnAST, E),
  			  [SE|(SearchRes--[SE])];
  		      _ -> 
  			  SE =refac_sim_expr_search:get_start_end_loc([E|Es]),
  			  SearchRes = search_expr_seq(AnnAST, [E|Es]),
  			  [SE|(SearchRes--[SE])]
  		  end,
  	    Num = length(Res),
  	    case Num=<1 of  
  		true -> ?wrangler_io("No identical expression has been found. \n",[]),
  		     {ok, []};
  		false-> ?wrangler_io("\n~p identical expressions(including the expression selected) have been found.\n", [Num]),
  		     ?wrangler_io(compose_search_result_info(FileName, Res),[]),
  		     ?wrangler_io("\nUse 'C-c C-e' to remove highlights!\n",[]),
  		     {ok, Res}
  	    end;
  	    _   -> {error, "You have not selected an expression!"}
      end.     
  	  
  %%-spec(expr_search_eclipse/4::(filename(), pos(), pos(), integer()) -> {ok, [{integer(), integer(), integer(), integer()}]} | {error, string()}).
  expr_search_eclipse(FileName, Start, End, TabWidth) ->
      {ok, {AnnAST, _Info}} =refac_util:parse_annotate_file(FileName,true, [], TabWidth),
      case refac_util:pos_to_expr_list(AnnAST, Start, End) of 
  
negative.code: 		    refac_syntax:default_literals_vars(Node, '%');
  		atom -> case lists:keysearch(fun_def,1,refac_syntax:get_ann(Node)) of 
  			    false ->refac_syntax:default_literals_vars(Node, '%') ;
  			    _ -> refac_syntax:default_literals_vars(
  				   Node, refac_syntax:atom_value(Node))
  			end;
  		nil -> refac_syntax:default_literals_vars(Node, nil);
  		underscore ->refac_syntax:default_literals_vars(Node, '&');
  