def get_cached_mtimes(self, root_folder, use_files_relpaths, get_all=False):
        location = os.path.join(root_folder, ".git", "harpoon_cached_mtimes.json")
        sorted_use_files_relpaths = sorted(use_files_relpaths)
        result = []
        if os.path.exists(location):
            try:
                result = json.load(open(location))
            except (__HOLE__, ValueError) as error:
                log.warning("Failed to open harpoon cached mtimes\tlocation=%s\terror=%s", location, error)
            else:
                if type(result) is not list or not all(type(item) is dict for item in result):
                    log.warning("Harpoon cached mtimes needs to be a list of dictionaries\tlocation=%s\tgot=%s", location, type(result))
                    result = []

        if get_all:
            return result

        for item in result:
            if sorted(item.get("use_files_relpaths", [])) == sorted_use_files_relpaths:
                return item.get("commit"), item.get("mtimes")

        return None, {}
dataset/ETHPy150Open realestate-com-au/harpoon/harpoon/ship/context.py/ContextBuilder.get_cached_mtimes