def is_filtered(self, ext, ref, dir, file):
        found = False

        if ext in Filter.FILTERED_EXTENSIONS:
            found = True
        else:
            if Filter.FILTERED_RESOURCES.get(ref):
                filtered_dirs_in_ref = Filter.FILTERED_RESOURCES.get(ref)
                if filtered_dirs_in_ref.get('*'):
                    found = True
                else:
                    if filtered_dirs_in_ref.get(dir):
                        filtered_files_in_dir = filtered_dirs_in_ref.get(dir)
                        if filtered_files_in_dir in '*':
                            found = True
                        else:
                            if file in filtered_files_in_dir:
                                found = True
        return found
dataset/ETHPy150Open SOM-Research/Gitana/filter.py/Filter.is_filtered/swapped operands of `in`