def get_ranker_results_with_objs(project_name, version, ranker_obj, filter_obj,
                                 provider):
    spectra_file = spectra_maker.get_spectra_file(project_name, version)
    run_to_result = run_result.load(spectra_file)

    buggy_lines = projects.get_known_buggy_lines(project_name,
                                                 version)
    if buggy_lines is None:
        print("Buggy lines aren't known for version {0}".format(version))
        return None



    failing_to_rankres = {}
    for failing_test_num, run_res in provider.get_run_results(run_to_result):
        failing_to_rankres[failing_test_num] = compute_results(run_res,
                                                               ranker_obj,
                                                               filter_obj,
                                                               buggy_lines)

    ret = {}
    for failing,rank_res in failing_to_rankres.items():
        key = "{0}-{1}-{2}".format(project_name, version, failing)
        ret[key] = rank_res
    return ret
def load_run_res(project_name, version):
    return run_result.load(get_spectra_file(project_name, version))