anchor.diff:      refac_module_graph:module_graph_to_dot(OutFile, Res, false).
   
   
  +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  +%%                                                                     %%
  +%%  Some utility functions.                                            %%
  +%%                                                                     %%
  +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  +
  +
  +
  +
  +list_insection(L1, L2) ->
  +    ordsets:to_list(ordsets:intersection(ordsets:from_list(L1), ordsets:from_list(L2))).
  +
  +list_subtract(L1, L2) ->
  +    ordsets:to_list(ordsets:subtract(ordsets:from_list(L1), ordsets:from_list(L2))).
  +
  +is_sub_list(L1, L2) ->
  +    ordsets:is_subset(ordsets:from_list(L1), ordsets:from_list(L2)).
  +
  +remove_sub_lists(ListOfLists) ->
  +    ListOfLists1 = lists:sort(fun(L1, L2)-> length(L1)>= length(L2) end, ListOfLists),
  +    remove_sub_lists(ListOfLists1,[]).
  +
  +remove_sub_lists([], Acc) ->
  +    lists:reverse(Acc);
  +remove_sub_lists([L|T], Acc) ->
  +    case lists:any(fun(A)->
  +			   is_sub_list(L, A) 
  +		   end, Acc) of 
  +	true ->
  +	    remove_sub_lists(T, Acc);
  +	false ->
  +	    remove_sub_lists(T, [L|Acc])
  +    end.
  +		  
  +
  +
  +is_prop_sub_list(L1, L2) ->
  +    S1 = ordsets:from_list(L1),
  +    S2 = ordsets:from_list(L2),
  +    size(S1) < size(S2) andalso ordsets:is_subset(S1, S2).
  +
   add_edges([], MG) ->
       MG;
   add_edges([{Caller, Callees}|Left], MG) ->
  
positive.code:      wrangler_callgraph_server:fun_callgraph_to_dot(OutFile, FileName).
     
  
  improper_inter_module_calls(OutFile, SearchPaths, NotCareMods) ->
      ModCallerCallees = refac_module_graph:module_graph_with_funs(SearchPaths),
      Files = refac_util:expand_files(SearchPaths, ".erl"),
      FunCallees = lists:append(lists:flatmap(fun process_a_file/1, Files)),
      Res = [[{CallerMod, [{CalleeMod, CalledFuns}]} || {CalleeMod, CalledFuns} <- CalleeMods,
  						      not lists:member(CalleeMod, NotCareMods),
  						      [{CalleeMod, F, A} || {F, A} <- CalledFuns] -- FunCallees == []]
  	   || {CallerMod, CalleeMods} <- ModCallerCallees,
  	      not lists:member(CallerMod, NotCareMods)],
      refac_module_graph:module_graph_to_dot(OutFile, lists:append(Res), true).
      
  
  process_a_file(F) ->
      #callgraph{callercallee = CallerCallee, scc_order = Sccs} =
  	wrangler_callgraph_server:get_callgraph([F]),
      Sccs1 = [[MFA || {MFA, _Def} <- Sc] || Sc <- Sccs],
      [[{M1, F1, A1} || {M1, F1, A1} <- CalledFuns,
  		      M0 == M1,
  		      not lists:any(fun (S) ->
  					    lists:member({M0, F0, A0}, S)
  						andalso
  						lists:member({M1, F1, A1}, S)
  				    end, Sccs1)]
       || {{M0, F0, A0}, CalledFuns} <- CallerCallee].
  
  
      
  mutual_recursive_modules(OutFile, SearchPaths, WithLabel) ->
      ?wrangler_io("\nCMD: ~p:gen_module_scc_graph(~p, ~p, ~p).\n",
  		 [?MODULE, OutFile, SearchPaths, WithLabel]),
      refac_module_graph:scc_graph_to_dot(OutFile, SearchPaths, WithLabel).
  
  partition_a_module(FileName) ->
      CallerCalleesWithDef = wrangler_callgraph_server:build_callercallee_callgraph([FileName]),
      CallerCallees = [{{M,F,A}, Callee}||{{{M,F,A}, _}, Callee}<-CallerCalleesWithDef],
      MG = digraph:new(),
      add_edges(CallerCallees,  MG).
  
  
  modules_with_big_fanin(DotFile, SearchPaths, MinInDegree, NotCareMods) ->
      ModCallerCallees = refac_module_graph:module_graph_with_funs(SearchPaths),
      CalleeMods1 = lists:append([element(1, lists:unzip(CalleeMods)) || {_CallerMod, CalleeMods} <- ModCallerCallees]),
      refac_io:format("CalleeMods1:\n~p\n", [CalleeMods1]),
      Res = [[{CallerMod, [{CalleeMod, CalledFuns}]} || {CalleeMod, CalledFuns} <- CalleeMods,
  						      not lists:member(CalleeMod, NotCareMods),
  						      length([M || M <- CalleeMods1, M == CalleeMod]) >= MinInDegree]
  	   || {CallerMod, CalleeMods} <- ModCallerCallees],
      refac_io:format("Res:\n~p\n", [Res]),
      refac_module_graph:module_graph_to_dot(DotFile, lists:append(Res), true).
      
      
  modules_with_big_fanout(OutFile, SearchPaths, MinOutDegree, NotCareMods) ->
      ModCallerCallees = refac_module_graph:module_graph_with_funs(SearchPaths),
      Res = [{CallerMod, CalleeMods} || {CallerMod, CalleeMods} <- ModCallerCallees,
  
negative.code: 
  -export([gen_module_graph/4, gen_module_scc_graph/3, gen_function_callgraph/3]).
  
  -export([improper_inter_module_calls/3, cyclic_dependent_modules/3, 
  	 modules_with_big_fanin/4, modules_with_big_fanout/4,
  	 improper_located_apis/3]).
  
  -compile(export_all).
  -define(SimiScore, 0.4).
  
  -include("../include/wrangler.hrl").
  
  