anchor.diff:  	    
   	    
     
  -intra_fun_forward_slice(AnnAST, ModName, FunDef, PatIndex) ->
  +intra_fun_forward_slice(Files, AnnAST, ModName, FunDef, PatIndex) ->
       FunName = refac_syntax:function_name(FunDef),
  +    FunName1 = refac_syntax:data(FunName),    
  +    Arity = refac_syntax:function_arity(FunDef),
       Cs = refac_syntax:function_clauses(FunDef),
       Cs1 = lists:map(fun(C) ->
  -			    process_a_clause_1(AnnAST, ModName,C, PatIndex) end, Cs),
  +			    process_a_clause_1(Files, AnnAST, ModName, FunName1, Arity,C, PatIndex) end, Cs),
       refac_syntax:function(FunName, Cs1).
   
  -process_a_clause_1(AnnAST, ModName, C, PatIndex) ->
  +process_a_clause_1(Files,AnnAST, ModName, FunName, Arity, C, PatIndex) ->
       Patterns = refac_syntax:clause_patterns(C),
       Body = refac_syntax:clause_body(C),
  -    Vars =refac_util:get_var_exports(lists:nth(PatIndex, Patterns)),
  -    Body1 = process_fun_body(AnnAST, ModName, Body, Vars),
  +    Vars =lists:flatmap(fun(I) -> refac_util:get_var_exports(lists:nth(I, Patterns)) end, PatIndex),
  +    Body1 = process_fun_body(Files, AnnAST, ModName, FunName, Arity, Body, Vars),
       refac_syntax:clause(Patterns, none, Body1).    
   
  -process_fun_body(_AnnAST, _ModName, [], _Vars) ->			    
  +process_fun_body(_Files,_AnnAST, _ModName, _FunName, _Arity,  [], _Vars) ->			    
       [];
  -process_fun_body(AnnAST, ModName, [E], Vars) ->
  -    E1 = process_fun_applications(AnnAST, ModName, E, Vars),
  +process_fun_body(Files,AnnAST, ModName, FunName, Arity, [E], Vars) ->
  +    E1 = process_fun_applications(Files,AnnAST, ModName, FunName, Arity,  E, Vars),
       FreeVars = refac_util:get_free_vars(E1),
       ExportedVars = refac_util:get_var_exports(E1),
       case (ExportedVars -- Vars =/= ExportedVars) of 
  
positive.code:     
  
  
  
  backward_slice(Expr, FunDef) ->
      FunName = refac_syntax:function_name(FunDef),
      {S, E} = refac_util:get_range(Expr),
  
negative.code: 	[] ->
  	    [refac_syntax:block_expr(Body)];
  	_ -> 
  	    Patterns = refac_syntax:clause_patterns(C),
  	    NewPatterns = lists:map(fun(P) ->
  					    BdVars = refac_util:get_bound_vars(P),
  					    case (FreeVarsInBody -- BdVars) =/= FreeVarsInBody of 
  						true -> P;
  						_ -> refac_syntax:underscore()
  					    end
  				    end, Patterns),
  	    C1 = refac_syntax:clause(NewPatterns, refac_syntax:clause_guard(C), refac_syntax:clause_body(C)), 
  	    SlicePoints = collect_app_sites(AnnAST, ModName, FunName, Arity),
  	    case SlicePoints of 
  		[] -> [refac_syntax:block_expr(Body)]; %% could not find any use sites of this function.
  		_ -> Slices = lists:map(fun({Fun, S}) ->
  						PsCs = lists:zip(NewPatterns, S),
  						lists:flatmap(fun({P, E}) ->
  								      case refac_syntax:type(P) of 
  									  underscore -> [refac_syntax:atom('_')];
  									  _ -> backward_slice(Files, AnnAST, ModName, Fun, E)
  								      end
  							      end, PsCs)
  					end,  SlicePoints),
  		     FunExpr = refac_syntax:fun_expr([C1]),
  		     Result = lists:map(fun(S) ->refac_syntax:application(FunExpr, S) end, Slices),
  		     Result       
  	    end
  