def run_js(shell, script, code=None):
    cmd = [shell, "-e", script]
    shell_obj = subprocess.Popen(
        cmd, shell=False, stdin=subprocess.PIPE, stderr=subprocess.PIPE,
        stdout=subprocess.PIPE)

    data, stderr = shell_obj.communicate(code)

    if stderr:
        raise RuntimeError((cmd, stderr) % 'Error calling %r: %s')

    if not data:
        raise JSReflectException("Reflection failed")

    return data, stderr
dataset/ETHPy150Open mozilla/app-validator/appvalidator/testcases/javascript/spidermonkey.py/run_js/swapped operands of `%`