anchor.diff:  %% @spec add_function(Tree::syntaxTree(),FunName::atom(),DefPos::Pos, Exp::expression()) ->syntaxTree()
   %%
   add_function(Tree, FunName, DefPos, Exp, SideEffect) -> 				
  -    Exp1 =  make_actual_parameter(Exp, SideEffect),
       Forms = refac_syntax:form_list_elements(Tree),
       MakeClause = fun(C, Expr, Name) ->
   			  Pats = refac_syntax:clause_patterns(C),
  
positive.code: 
  -export([generalise/6, generalise_eclipse/6]).
  
  %% temporally exported for testing purposed.
  -export([pre_cond_checking/2, do_generalisation/6, gen_fun_1/8, gen_fun_1_eclipse/8, gen_fun_2_eclipse/8]).
  
  %% =====================================================================
  %% @spec generalise(FileName::filename(), Start::Pos, End::Pos, ParName::string(), SearchPaths::[string()])-> term()
  
negative.code: make_actual_parameter(Exp, SideEffect) ->
      FreeVars = lists:map(fun({V,_}) -> V end, refac_util:get_free_vars(Exp)),
      case FreeVars==[] of 
  	true -> 
  	    case refac_syntax:type(Exp) of 
  		fun_expr -> Exp;
  		implicit_fun -> Exp;
  		_ ->  case lists:keysearch(fun_def, 1, refac_syntax:get_ann(Exp)) of 
  			  {value, {fun_def, {_M, _N, A, _P1, _P2}}} ->
  			      case refac_syntax:type(Exp) of 
  				  atom -> refac_syntax:implicit_fun(Exp, refac_syntax:integer(A));				       
  				  module_qualifier -> refac_syntax:implicit_fun(Exp, refac_syntax:integer(A));
  				  _ -> throw({error, 
  					      "Wrangler failed to perform this refactoring, because it could not get enough information about the expression selected."})
  			      end;					     
  			  _ -> case SideEffect of 
  				   true -> case refac_syntax:type(Exp) of
  					       fun_expr -> Exp;
  					       _ -> C = refac_syntax:clause([],[],[Exp]),
  						    refac_syntax:copy_attrs(Exp, refac_syntax:fun_expr([C]))
  					   end;
  				   _ -> Exp
  			       end
  		      end
  	    end;
  	false -> Pars  = lists:map(fun(P) ->refac_syntax:variable(P) end, FreeVars),
  		 C = refac_syntax:clause(Pars,[],[Exp]),
  		 refac_syntax:copy_attrs(Exp, refac_syntax:fun_expr([C]))    
      end.
  	    
  %% =====================================================================
  