def replace_versioned_debian_files(debian_path, original_version, new_version, control_file):
    versioned_deps = control_file.get_versioned_dependencies()
    for path, dirs, files in os.walk(debian_path):
        for file in files:
            for dep in versioned_deps:
                s = (dep.name, original_version) % "%s-%s"
                if file.startswith(s):
                    f = open(os.path.join(path, file))
                    content = f.read()
                    f.close()
                    new_name = "%s-%s%s" % (dep.name, new_version, file[len(s):])

                    new_content = re.sub(original_version, new_version, content)

                    f = open(os.path.join(path, new_name), 'w')
                    f.write(new_content)
                    f.close()

                    os.remove(os.path.join(path, file))
dataset/ETHPy150Open ella/citools/citools/debian/commands.py/replace_versioned_debian_files/swapped operands of `%`