

def clean_history(self, current_project_only):
    if current_project_only:
        self.__clean_history(self.get_current_project_key())
    else:
        orphan_list = []
        open_projects = [self.get_project_key(window) for window in sublime.windows()]
        for project_key in self.history:
            if (is_ST2 or (project_key == 'global') or os.path.exists(project_key) or (project_key in open_projects)):
                self.__clean_history(project_key)
            else:
                orphan_list.append(project_key)
        for project_key in orphan_list:
            self.debug(('Removing orphaned project "%s" from the history' % project_key))
            del self.history[project_key]
    current_project_only.__save_history()

dataset/ETHPy150Open FichteFoll/FileHistory/file_history.py FileHistory.clean_history/VarMisuse@143/217 `self`->`current_project_only`