<commit_before>class FileSystemStub:

    def __init__(self):
        self._fs_stub = {}
        self._file_name_stub = {}

    def read(self, file_path):
        if not file_path in self._fs_stub:
            return None

        return self._fs_stub[file_path].split('\n')

    def write(self, file_path, file_content):
        print('FileSystemStub WRITE:', file_path)
        print(file_content)
        self._fs_stub[file_path] = file_content

    def set_file(self, path, list_of_filenames):
        print('Adding adding files', list_of_filenames, 'for path', path)
        self._file_name_stub[path] = list_of_filenames

    def list_files(self, path):
        return self._file_name_stub[path]<commit_msg>refactor file system stub for list files!<commit_after>class FileSystemStub:

    def __init__(self):
        self._fs_stub = {}

    def read(self, file_path):
        if not file_path in self._fs_stub:
            return None

        return self._fs_stub[file_path].split('\n')

    def write(self, file_path, file_content):
        print('FileSystemStub WRITE:', file_path)
        print(file_content)
        self._fs_stub[file_path] = file_content

    def list_files(self, path):
        files = []
        for element in self._fs_stub:
            if element.startswith(path):
                files.append(element)
        return files
{'fraction_non_alphanumeric': 0.09734513274336283, 'fraction_numerical': 0.0, 'mean_word_length': 2.6576819407008085, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '394093', 'n_tokens_mistral': 427, 'n_tokens_neox': 431, 'n_words': 91}