anchor.diff:      end.
   
   
  --spec(gen_fun_clause_eclipse/9::(FileName::filename(), ParName::atom(), FunName::atom(), Arity::integer(), DefPos::pos(), 
  -				 Exp::syntaxTree(), TabWidth::integer(), SideEffect::boolean(),  Dups::[{pos(), pos()}]) ->
  +-spec(gen_fun_clause_eclipse/10::(FileName::filename(), ParName::atom(), FunName::atom(), Arity::integer(), DefPos::pos(), 
  +				 Exp::syntaxTree(), TabWidth::integer(), SideEffect::boolean(),  Dups::[{pos(), pos()}], LogCmd::string()) ->
   					{ok, [{filename(), filename(), string()}]}).
  -gen_fun_clause_eclipse(FileName, ParName, FunName, Arity, DefPos, Exp, TabWidth, SideEffect, Dups) ->
  -    gen_fun_clause_1(FileName, ParName, FunName, Arity, DefPos, Exp, [], TabWidth, SideEffect, Dups, eclipse, "").
  +gen_fun_clause_eclipse(FileName, ParName, FunName, Arity, DefPos, Exp, TabWidth, SideEffect, Dups, LogCmd) ->
  +    gen_fun_clause_1(FileName, ParName, FunName, Arity, DefPos, Exp, [], TabWidth, SideEffect, Dups, eclipse, LogCmd).
   
   -spec(gen_fun_clause/10::(FileName::filename(), ParName::atom(), FunName::atom(), Arity::integer(), DefPos::pos(), 
   			 Exp::syntaxTree(), TabWidth::integer(), SideEffect::boolean(), 
  
positive.code: 		     SearchPaths::[dir()], TabWidth::integer()) ->
  	     {ok, [filename()]}
  		 |{error, string()}
                   |{multiple_instances, {atom(), atom(), integer(), pos(), syntaxTree(), boolean(),[{pos(), pos()}], logmsg}}
  		 |{unknown_side_effect, {atom(), atom(),integer(), pos(), syntaxTree(), integer(),
  					 [{pos(), pos()}], [{pos(),pos()}], logmsg}}
  		 |{more_than_one_clause, {atom(), atom(), integer(), pos(), syntaxTree(), boolean(),
  					  [{pos(), pos()}], [{pos(),pos()}], logmsg}}). 
  
  generalise(FileName, Start, End, ParName, SearchPaths, TabWidth) ->
      generalise(FileName, Start, End, ParName, SearchPaths, TabWidth, emacs).
  
negative.code:     DupsInFun = search_duplications(Fun, Exp),
      DupsInClause = search_duplications(expr_to_fun_clause(Fun, Exp), Exp),
      case SideEffect of
  	unknown ->
  	    {unknown_side_effect, {ParName1, FunName, FunArity,
  				   FunDefPos, Exp, NoOfClauses, DupsInFun, DupsInClause, Cmd}};
  	_ ->
  	    case NoOfClauses > 1 of
  		true ->
  		    {more_than_one_clause,
  		     {ParName1, FunName, FunArity, FunDefPos, Exp, SideEffect, DupsInFun, DupsInClause, Cmd}};
  		_ ->
  		    case DupsInFun of
  			[_| _] ->
  			    {multiple_instances,
  			     {ParName1, FunName, FunArity, FunDefPos, Exp, SideEffect, DupsInFun, Cmd}};
  			_ ->
  			    {AnnAST1, _} = gen_fun(FileName, ModName, AnnAST, ParName1, FunName,
  						   FunArity, FunDefPos, Info, Exp, SideEffect, [], SearchPaths, TabWidth),
  			    case Editor of
  				emacs ->
  				    refac_util:write_refactored_files_for_preview([{{FileName, FileName}, AnnAST1}], Cmd),
  				    {ok, [FileName]};
  				eclipse ->
  				    Content = refac_prettypr:print_ast(refac_util:file_format(FileName), AnnAST1),
  				    {ok, [{FileName, FileName, Content}]}
  			    end
  		    end
  	    end
      end.
  
  
  -spec(gen_fun_1/11::(SideEffect::boolean(), FileName::filename(),ParName::atom(), FunName::atom(),
  		     Arity::integer(), FunDefPos::pos(), Exp::syntaxTree(), SearchPaths::[dir()],
  		     TabWidth::integer(), Dups::[{pos(), pos()}], LogCmd::string())
        -> {ok, [filename()]}).
  gen_fun_1(SideEffect, FileName,ParName, FunName, Arity, DefPos, Exp, SearchPaths,TabWidth, Dups, LogCmd) ->
      gen_fun_1(SideEffect, FileName,ParName, FunName, Arity, DefPos, Exp, SearchPaths,TabWidth,Dups, emacs, LogCmd).
  
  -spec(gen_fun_1_eclipse/11::(SideEffect::boolean(), FileName::filename(),ParName::atom(), FunName::atom(), 
  			    Arity::integer(), FunDefPos::pos(), Expr::syntaxTree(), SearchPaths::[dir()],
  			    TabWidth::integer(), Dups::[{pos(), pos()}], LogCmd::string()) 
        -> {ok, [{filename(), filename(),string()}]}).
  gen_fun_1_eclipse(SideEffect, FileName,ParName, FunName, Arity, DefPos, Exp, SearchPaths,TabWidth, Dups, LogCmd) ->
      gen_fun_1(SideEffect, FileName,ParName, FunName, Arity, DefPos, Exp, SearchPaths, TabWidth, Dups, eclipse,LogCmd).
  
  gen_fun_1(SideEffect, FileName,ParName, FunName, Arity, DefPos, Exp, SearchPaths,TabWidth, Dups, Editor, LogCmd) ->
      {ok, {AnnAST, Info}} = refac_util:parse_annotate_file(FileName,true, [],TabWidth),  
  