anchor.diff:      fold_expression(FileName, Line, Col, SearchPaths, TabWidth, eclipse).
   
   fold_expression(FileName, Line, Col, SearchPaths, TabWidth, Editor) ->
  -    {ok, {AnnAST, Info}} =refac_util:parse_annotate_file(FileName,true, SearchPaths, TabWidth),
  -    {value, {module, CurrentModName}} = lists:keysearch(module, 1, Info),
  +    {ok, {AnnAST, _Info}} =refac_util:parse_annotate_file(FileName,true, SearchPaths, TabWidth),
       case pos_to_fun_clause(AnnAST, {Line, Col}) of 
  -	{ok, {Mod, FunName, _Arity, FunClauseDef, ClauseIndex}} ->
  +	{ok, {Mod, FunName, _Arity, FunClauseDef, _ClauseIndex}} ->
   	    case side_condition_analysis(FunClauseDef) of 
   		ok ->			    
   		    Candidates = search_candidate_exprs(AnnAST, {Mod, Mod}, FunName, FunClauseDef),
  
positive.code: 	_  -> {Tree, false}
      end.
      
  
  do_replace_expr_with_fun_call(Tree, {Expr,NewExp, Range})->
      case length(Expr) of 
  	1 -> do_replace_expr_with_fun_call_1(Tree, {NewExp, Range});
  	_  -> do_replace_expr_with_fun_call_2(Tree, {NewExp, Range})
      end.
  	    
  
  do_replace_expr_with_fun_call_1(Tree, {NewExp, Range}) ->
       case refac_util:get_range(Tree) of 
   	Range ->
  	    {NewExp, true};
   	_  -> {Tree, false}
       end.
      
  do_replace_expr_with_fun_call_2(Tree, {NewExp, {StartLoc, EndLoc}}) -> 
     case refac_syntax:type(Tree) of
  	clause ->
  	    Exprs = refac_syntax:clause_body(Tree),
  	    {Exprs1, Exprs2} = lists:splitwith(fun(E) -> element(1,refac_util:get_range(E)) =/= StartLoc end, Exprs),
  	    {NewBody, Modified} = case Exprs2 of 
  				      [] -> {Exprs, false};
  				      _ -> {_Exprs21, Exprs22} = lists:splitwith(fun(E) -> element(2, refac_util:get_range(E)) =/= EndLoc end, Exprs),
  					   case Exprs22 of 
  					       [] -> {Exprs, false};  %% THIS SHOULD NOT HAPPEN.
  					       _ -> {Exprs1++[NewExp|tl(Exprs22)], true}
  					   end
  				  end,
  	    Pats = refac_syntax:clause_patterns(Tree),
  	    G = refac_syntax:clause_guard(Tree),
  	    {refac_syntax:copy_pos(Tree, refac_syntax:copy_attrs(Tree, refac_syntax:clause(Pats, G, NewBody))), Modified};
  	block_expr ->
  	    Exprs = refac_syntax:block_expr_body(Tree),
  	    {Exprs1, Exprs2} = lists:splitwith(fun(E) -> element(1,refac_util:get_range(E)) =/= StartLoc end, Exprs),
  	    {NewBody, Modified} = case Exprs2 of 
  				      [] -> {Exprs, false};
  				      _ -> {_Exprs21, Exprs22} = lists:splitwith(fun(E) -> element(2, refac_util:get_range(E)) =/= EndLoc end, Exprs),
  					   case Exprs22 of 
  					       [] -> {Exprs, false};  %% THIS SHOULD NOT HAPPEN.
  					       _ -> {Exprs1++[NewExp|tl(Exprs22)], true}
  					   end
  				  end,
  	    {refac_syntax:copy_pos(Tree, refac_syntax:copy_attrs(Tree, refac_syntax:block_expr(NewBody))), Modified};	 
  	_  -> {Tree, false}
      end.
  
  %% =============================================================================================
  %% Search expression/expression sequence with are instances of of the selected function clause.
  
negative.code: fold_expression_1_eclipse_1(AnnAST, _Body,  []) -> 
      AnnAST;
  fold_expression_1_eclipse_1(AnnAST, Body, [{{StartLoc, EndLoc}, Exp}|Tail]) ->
      {AnnAST1,_} = refac_util:stop_tdTP(fun do_replace_expr_with_fun_call/2, AnnAST, {Body, {{StartLoc, EndLoc}, Exp}}),
      fold_expression_1_eclipse_1(AnnAST1, Body, Tail).
      
      
  
  fold_expression_1(FileName, CandidatesToFold, SearchPaths, TabWidth) ->
      {ok, {AnnAST, _Info}} = refac_util:parse_annotate_file(FileName, true, SearchPaths, TabWidth),
      AnnAST1= fold_expression_1_1(AnnAST,  CandidatesToFold),
      refac_util:write_refactored_files_for_preview([{{FileName, FileName}, AnnAST1}]),
      {ok, [FileName]}.
  
  fold_expression_1_1(AnnAST, []) -> 
      AnnAST;
  fold_expression_1_1(AnnAST, [{StartLine, StartCol, EndLine, EndCol, Exp0, FunClauseDef0}|Tail]) ->
      FunClauseDef = binary_to_term(list_to_binary(FunClauseDef0)),
      Exp = binary_to_term(list_to_binary(Exp0)),
      Body = refac_syntax:clause_body(FunClauseDef),
      {AnnAST1,_} = refac_util:stop_tdTP(fun do_replace_expr_with_fun_call/2, AnnAST, {Body, {{{StartLine, StartCol}, {EndLine, EndCol}}, Exp}}),
      fold_expression_1_1(AnnAST1,Tail).
      
  
  -spec(fold_expression_2_eclipse/7::(filename(), atom(),integer(), integer(), integer(), [dir()], integer()) -> 
  	     {ok, [{integer(), integer(), integer(), integer(), syntaxTree(), {syntaxTree(), integer()}}]}
  