def clean_history(self, current_project_only):
        if current_project_only:
            self.__clean_history(self.get_current_project_key())
        else:
            # Clean-up the all histories and remove orphaned projects
            orphan_list = []
            open_projects = [self.get_project_key(window) for window in sublime.windows()]
            for project_key in self.history:
                # clean the project or remove it (if it no longer exists)
                if (
                    # The ST2 version always uses md5 hashes for the project keys,
                    # so we can never know if a project is orphaned.
                    is_ST2
                    or project_key == 'global'
                    or os.path.exists(project_key)
                    or project_key in open_projects
                ):
                    # clean the project
                    self.__clean_history(project_key)
                else:
                    # queue the orphaned project for deletion
                    orphan_list.append(project_key)

            # remove any orphaned projects and save the history
            for project_key in orphan_list:
                self.debug('Removing orphaned project "%s" from the history' * project_key)
                del self.history[project_key]

        # Save history
        self.__save_history()
dataset/ETHPy150Open FichteFoll/FileHistory/file_history.py/FileHistory.clean_history/operator `%` -> `*`