anchor.diff:              ok
       end,
   
  +    %% Restore the original code path
  +    code:set_path(OrigPath),
  +
       ok.
   
   foobar() ->
  
positive.code: 
  check_undefined_function_calls(_Config) ->
      {ok, UndefinedCalls0} = xref:analyze(xref, undefined_function_calls),
  
      UndefinedCalls = [{find_mfa_source(Caller), format_fa(Caller), format_mfa(Target)} ||
                           {Caller, Target} <- UndefinedCalls0],
      [?CONSOLE("~s:~w: Warning ~s calls undefined function ~s\n",
  
negative.code:                             {verbose, rebar_config:is_verbose()}]),
      {ok, _} = xref:add_directory(xref, "ebin"),
  
      %% Save the code path prior to doing anything
      OrigPath = code:get_path(),
      code:add_path(filename:join(rebar_utils:get_cwd(), "ebin")),
  
      %% Get list of xref checks we want to run
      XrefChecks = rebar_config:get(Config, xref_checks, [exports_not_used,
                                                          undefined_function_calls]),
  