anchor.diff:  do_add_a_tag(FileName, {AnnAST, Info}, Tag, AffectedInitialFuns, SearchPaths) ->
       {value, {module, ModName}} = lists:keysearch(module, 1, Info),
       {InitialFuns1, ReceiveFuns1} = lists:unzip(AffectedInitialFuns),
  -    InitialFuns = lists:usort(lists:flatmap(fun({Init, _}) -> Init end, InitialFuns1)),
  +    InitialFuns = lists:usort(lists:flatmap(fun({Init, _, _}) -> Init end, InitialFuns1)),
  +    InitialSpawnExprs = lists:usort(lists:map(fun({_, _, SpawnExpr}) -> SpawnExpr end, InitialFuns1)),
  +    AffectedModsFuns = get_affected_mods_and_funs(InitialSpawnExprs, SearchPaths),
       ReceiveFuns = lists:usort(lists:append(ReceiveFuns1)),
       io:format("The current file under refactoring is:\n~p\n", [FileName]),
  -    {AnnAST1, _Changed} =refac_util:stop_tdTP(fun do_add_a_tag_1/2, AnnAST, {ModName, Tag, InitialFuns, ReceiveFuns}),
  +    {AnnAST1, _Changed} =refac_util:stop_tdTP(fun do_add_a_tag_1/2, AnnAST, {ModName, Tag, InitialFuns, ReceiveFuns, AffectedModsFuns}),
       OtherFiles = refac_util:expand_files(SearchPaths, ".erl") -- [FileName],
  -    Results = do_add_a_tag_in_other_modules(OtherFiles, Tag, InitialFuns, ReceiveFuns, SearchPaths),    
  +    Results = do_add_a_tag_in_other_modules(OtherFiles, Tag, InitialFuns, ReceiveFuns, AffectedModsFuns, SearchPaths),    
       [{{FileName, FileName}, AnnAST1} | Results].
   
  -do_add_a_tag_in_other_modules(Files, Tag, InitialFuns, ReceiveFuns, SearchPaths) ->
  +do_add_a_tag_in_other_modules(Files, Tag, InitialFuns, ReceiveFuns, AffectedModsFuns={Mods, _Funs}, SearchPaths) ->
       case Files of
   	[] ->
   	    [];
   	[F |Fs] ->
  -	    io:format("The current file under refactoring is:\n~p\n", [F]),
  -	    {ok, {AnnAST, Info}} = refac_util:parse_annotate_file(F, true, SearchPaths),
  -	    {value, {module, ModName}} = lists:keysearch(module, 1, Info),
  -	    {AnnAST1, Changed} = refac_util:stop_tdTP(fun do_add_a_tag_1/2, AnnAST, {ModName, Tag, InitialFuns, ReceiveFuns}),
  -	    if Changed ->
  -		    [{{F, F}, AnnAST1} | do_add_a_tag_in_other_modules(Fs, Tag, InitialFuns, ReceiveFuns, SearchPaths)];
  -		true -> do_add_a_tag_in_other_modules(Fs, Tag, InitialFuns, ReceiveFuns, SearchPaths)
  +	    BaseName = list_to_atom(filename:basename(F, ".erl")),
  +	    case lists:member(BaseName, Mods) of 
  +		true ->
  +		    io:format("The current file under refactoring is:\n~p\n", [F]),
  +		    {ok, {AnnAST, Info}} = refac_util:parse_annotate_file(F, true, SearchPaths),
  +		    {value, {module, ModName}} = lists:keysearch(module, 1, Info),
  +		    {AnnAST1, Changed} = refac_util:stop_tdTP(fun do_add_a_tag_1/2, AnnAST, {ModName, Tag, InitialFuns, ReceiveFuns,AffectedModsFuns}),
  +		    if Changed ->
  +			    [{{F, F}, AnnAST1} | do_add_a_tag_in_other_modules(Fs, Tag, InitialFuns, ReceiveFuns, AffectedModsFuns, SearchPaths)];
  +		       true -> do_add_a_tag_in_other_modules(Fs, Tag, InitialFuns, ReceiveFuns, AffectedModsFuns, SearchPaths)
  +		    end;
  +		_ -> do_add_a_tag_in_other_modules(Fs, Tag, InitialFuns, ReceiveFuns, AffectedModsFuns, SearchPaths)
   	    end
       end.
  -do_add_a_tag_1(Node, {ModName,Tag, InitialFuns, ReceiveFuns}) ->
  +do_add_a_tag_1(Node, {ModName,Tag, InitialFuns, ReceiveFuns,{_Mods,Funs}}) ->
       case refac_syntax:type(Node) of 
   	function ->
   	    {value, {fun_def, {M, F, A, _, _}}} = lists:keysearch(fun_def,1, refac_syntax:get_ann(Node)),
   	    case lists:member({M, F, A}, ReceiveFuns) of 
   		true ->
   		    Node1 = refac_util:full_buTP(fun do_add_tag_to_receive_exprs/2, Node,  Tag),
  -		    {Node2, _} = refac_util:stop_tdTP(fun do_add_tag_to_send_exprs/2, Node1, {ModName,Tag, InitialFuns}),
  -		    {Node2, true};
  +		    %% Can a process send an expression to itself?
  +		   %% {Node2, _} = refac_util:stop_tdTP(fun do_add_tag_to_send_exprs/2, Node1, {ModName,Tag, InitialFuns}), 
  +		    {Node1, true};
   		false ->
  -		   refac_util:stop_tdTP(fun do_add_tag_to_send_exprs/2, Node, {ModName, Tag, InitialFuns})
  +		    case lists:member({M, F, A}, Funs) of 
  +			true ->
  +			    refac_util:stop_tdTP(fun do_add_tag_to_send_exprs/2, Node, {ModName, Tag, InitialFuns});
  +			_ ->
  +			    {Node, false}
  +		    end
   	    end;
   	_ ->
   	    {Node, false}
  
positive.code: 
  get_affected_initial_funs(InitialFuns, {ModName, FunName, Arity}, SearchPaths) ->
      ReachedReceiveFuns = reached_receive_funs(InitialFuns, SearchPaths),
      io:format("ReachedReceiveFuns:\n~p\n", [ReachedReceiveFuns]),
      lists:filter(fun({_InitialFun, Fs}) ->
  					    lists:member({ModName, FunName, Arity}, Fs) end, ReachedReceiveFuns).
  
  
  collect_process_initial_funs_1({AnnAST, Info}, _SearchPaths) ->  
      {value, {module, ModName}} = lists:keysearch(module, 1, Info),
      HandleSpecialFuns = fun(Node) ->
  				{{Ln, _}, _} = refac_util:get_range(Node),
  
negative.code:       _ -> false
      end.
  
  get_affected_mods_and_funs(SpawnExprs, SearchPaths) ->
      SliceRes =forward_slice(SpawnExprs, SearchPaths, []),
      AffectedFuns = lists:usort(lists:map(fun({{Mod, Fun, Arity, _}, _Value}) -> 
  						 {Mod, Fun, Arity} end, SliceRes)),
      {Mods, _, _} = lists:unzip3(AffectedFuns),
      AffectedMods = lists:usort(Mods),
      {AffectedMods, AffectedFuns}.
      
  forward_slice([], _SearchPaths, Acc) -> Acc;
  forward_slice([{FileName, Expr}|T], SearchPaths, Acc) ->
     case forward_slice_1(FileName, Expr, SearchPaths) of 
         {ok, Res} -> 
  	   forward_slice(T, SearchPaths, Res ++ Acc);
         {error, Msg} ->
  	   {error, Msg}
     end.
      
  
  forward_slice_1(FileName, Expr, SearchPaths) ->
      Files = refac_util:expand_files(SearchPaths, ".erl"),
      {StartPos, EndPos} = refac_util:get_range(Expr),
      {ok, {AnnAST, Info}} = refac_util:parse_annotate_file(FileName, true, SearchPaths),
      {value, {module, ModName}} = lists:keysearch(module, 1, Info),
      case refac_util:pos_to_expr(AnnAST, StartPos, EndPos) of 
  	{ok, Expr} ->
  	    case refac_util:pos_to_fun_def(AnnAST, StartPos) of     
  		{ok, FunDef} ->
  		    {ok, refac_slice:forward_slice(Files, AnnAST, ModName, FunDef, Expr)};
  		_ ->
  		    {error, "Forward slicing failed"}
  	    end;
  	_ -> {error, "Foward slicing failed"}
      end.
  
  %% Qn: is it possible to get more static infomration? How to balance the usages of staic and dynamic info?
  %% How do we know the existing trace info is uptodate?
  