anchor.diff:      ModNames = [M || {M, _} <- refac_util:get_modules_by_file(Files)],
       [{{Mod, Dir},analyze_mod_with_called_funs({Mod, Dir}, ModNames, SearchPaths)}
        || {Mod, Dir}<-ModDirs].
  -   
  -
  +  
   analyze_mod_with_called_funs({Mod, Dir}, ModNames, SearchPaths) ->
       File = filename:join(Dir, atom_to_list(Mod) ++ ".erl"),
       {ok, {AnnAST, Info}} = refac_util:parse_annotate_file(File, true, SearchPaths),
  
positive.code: 			      ||F<-refac_syntax:form_list_elements(AnnAST)]),
      [{M, [{F,A}]}||{M, F, A}<-CalledFuns, M/=ModName, lists:member(M, ModNames)].
     
   
  group_by_mod_names(ModFuns) ->
      ModFuns1 = group_by(1, ModFuns),
      refac_io:format("ModFuns1:\n~p\n", [ModFuns1]),
      Res =[{hd(Ms), lists:append(Fs)}||MFs<-ModFuns1, {Ms, Fs} <-[lists:unzip(MFs)]],
      refac_io:format("Res:\n~p\n", [Res]),
      Res.
      
  
  -spec group_by(integer(), [tuple()]) -> [tuple()].
  group_by(N, TupleList) ->
      SortedTupleList = lists:keysort(N, lists:usort(TupleList)),
      group_by(N, SortedTupleList, []).
  
  group_by(_N,[],Acc) -> Acc;
  group_by(N,TupleList = [T| _Ts],Acc) ->
      E = element(N,T),
      {TupleList1,TupleList2} = 
  	lists:partition(fun (T1) ->
  				element(N,T1) == E
  			end,
  			TupleList),
      group_by(N,TupleList2,Acc ++ [TupleList1]).
  
  -spec (module_subgraph_to_dot/4::(filename(), [modulename()],[filename()|dir()], boolean()) ->true).
  module_subgraph_to_dot(OutFile, ModNames, SearchPaths, WithLabel) ->
      DotFile = filename:dirname(OutFile)++filename:rootname(OutFile)++".dot",
  
negative.code: 		    end,
      CalledModFuns = collect_called_modules_with_called_funs(Mod, AnnAST, ModNames),
      Res = ImportedMods0 ++ ImportedMods1 ++ CalledModFuns,
      ordsets:from_list(group_by_mod_names(Res)).
     
  
  