anchor.diff:      Functions = lists:foldl(fun({{Filename, _Fileline} = File, Code}, R) ->
           case re:run(Filename, "\\.erl$", [{capture, all, list}]) of
               {match, _} -> 
  -                R ++ case re:run(Code, "(" ++ ?ATOM_PATTERN ++ "):(" ++ ?ATOM_PATTERN ++ ")",
  -                                            [global, {capture, all, list}]) of
  -                    {match, Match1} ->
  -                        [{{M1, F1}, File} || [_, M1, F1] <- Match1];
  -                    nomatch ->
  -                        []
  -                end     
  -                ++ case re:run(Code, "apply\\s*\\(\\s*(" ++ ?ATOM_PATTERN ++ ")\\s*,\\s*(" ++ ?ATOM_PATTERN ++ ")\\s*,",
  -                                        [global, {capture, all, list}]) of
  -                    {match, Match2} ->
  -                        [{{M2, F2}, File} || [_, M2, F2] <- Match2];
  -                    nomatch ->
  -                        []
  -                end;
  +                R
  +                    ++ code_search(Code, {function, v1}, File)
  +                    ++ code_search(Code, {function, v2}, File);
               nomatch ->
                   R
           end
  
positive.code:     Grep = fun(Pattern) ->
          cmd("cd " ++ Dirname ++ " && grep -nIR \"" ++ Pattern ++ "\" * | grep -v \"\.eunit\" >> " ++ ?TMP_FILENAME)
      end,
      ok = Grep("[0-9a-z]*:[0-9a-z]*"),
      ok = Grep("apply(\\s*[0-9a-z]*\\s*,\\s*[0-9a-z]*\\s*,"),
      ok = Grep("module\\([0-9a-z]*\\)"),
  
      Lines = read_file(?TMP_FILENAME),
      ok = cmd("rm " ++ ?TMP_FILENAME),
  
negative.code:     lists:usort([{{list_to_atom(M), list_to_atom(F)}, File} || {{M, F}, File} <- Functions]).
  
  % private functions
  
  regexp(lb, bash, _Save) ->
      "(";
  regexp(lb, erlang, Save) ->
      "\\" ++ regexp(lb, bash, Save);
  regexp(rb, bash, _Save) ->
      ")";
  regexp(rb, erlang, Save) ->
      "\\" ++ regexp(rb, bash, Save);
  
  regexp(atom, Type, true) ->
      "(" ++ regexp(atom, Type, false) ++ ")";
  regexp(atom, _Type, false) ->
      "[a-zA-Z][a-zA-Z0-9_]*";
  
  regexp(module, Type, Save) ->
      "module" ++ regexp(lb, Type, Save) ++ regexp(atom, Type, Save) ++ regexp(rb, Type, Save);
  regexp({function, v1}, Type, Save) ->
      regexp(atom, Type, Save) ++ ":" ++ regexp(atom, Type, Save);
  regexp({function, v2}, Type, Save) ->
      "apply\\s*" ++ regexp(lb, Type, Save) ++ "\\s*" ++ regexp(atom, Type, Save) ++ "\\s*,\\s*" ++ regexp(atom, Type, Save) ++ "\\s*,";
  regexp(_, _, _) ->
      erlang:error(badarg).
  
  code_search(Code, RegExpName, Info) ->
      case re:run(Code, regexp(RegExpName, erlang, true), [global, {capture, all, list}]) of
          {match, Match} ->
              [{list_to_tuple(T), Info} || [_ | T] <- Match];
          nomatch ->
              []
      end.
  
  read_file(Filename) ->
      case file:open(Filename, [raw, binary, read, exclusive, read_ahead]) of
  