replace the runners with slightly modified BasicProxyRunner
185940
@Override
  protected List<Runner> getChildren() {
    // one runner for each parameter
    List<Runner> runners = super.getChildren();
    List<Runner> proxyRunners = new ArrayList<>(runners.size());
    for (Runner runner : runners) {
      // if the next line fails then the internal of Parameterized.class has been updated since this works with JUnit 4.11
      BlockJUnit4ClassRunner blockJUnit4ClassRunner = (BlockJUnit4ClassRunner) runner;
      Description description = blockJUnit4ClassRunner.getDescription();
      String name = description.getDisplayName();
      try {
        proxyRunners
            .add(new ProxyTestClassRunnerForParameters(mTestClass, mContainerUrl, name));
      } catch (InitializationError e) {
        throw new RuntimeException("Could not create runner for paramamter " + name, e);
      }
    }
    return proxyRunners;
  }
1019415
function (runner) {
    var
      suites = runner.suites(), idx, counter = 0, keyIdx,
      results = { suites: [ ], passed: 0, failed: 0, skipped: 0, total: 0, duration: 0 };
    for(idx = 0; idx < suites.length; ++idx) {
      if(null === suites[idx].parentSuite) {
        results.suites.push(__processSuite(suites[idx]));
        for(keyIdx = 0; keyIdx < __keys.length; ++keyIdx) {
          results[__keys[keyIdx]] += results.suites[counter][__keys[keyIdx]];
        }
        ++counter;
      }
    }
    /** global: CrossBrowserTestsRunner */
    CrossBrowserTestsRunner.runEnd(results, function() {
      // do nothing
    })
  }
148573
void copyFrom(BidiRun run)
    {
        this.start = run.start;
        this.limit = run.limit;
        this.level = run.level;
        this.insertRemove = run.insertRemove;
    }
713893
def teardown(self):
        """"""

        for proxy in self._proxies.values():
            proxy.restore_original_object()

        for patch in self._patches.values():
            patch.restore_original_object()
1281276
def main(output=None, error=None, verbose=False):
    
    runner = Runner(args=["--verbose"] if verbose is not False else None)
    runner.run(output, error)
5311
def apply_fixes(args, tmpdir):
  """"""
  invocation = [args.clang_apply_replacements_binary]
  if args.format:
    invocation.append('-format')
  if args.style:
    invocation.append('-style=' + args.style)
  invocation.append(tmpdir)
  subprocess.call(invocation)
939547
private void setProxyCredentials(Run<?, ?> run) {
    	if (proxySettings != null && proxySettings.getFsProxyCredentialsId() != null) {
    		UsernamePasswordCredentials up = CredentialsProvider.findCredentialById(
    				proxySettings.getFsProxyCredentialsId(),
            		StandardUsernamePasswordCredentials.class,
            		run,
        			URIRequirementBuilder.create().build());
			
    		if (up != null) {
    			proxySettings.setFsProxyUserName(up.getUsername());
        		proxySettings.setFsProxyPassword(up.getPassword());
    		}
    	}
    }
782824
def run(self, conn, tmp, module_name, module_args, inject):
        '''  '''

        # shell and command module are the same
        if module_name == 'shell':
            module_name = 'command'
            module_args += " #USE_SHELL"

        (module_path, is_new_style, shebang) = self.runner._copy_module(conn, tmp, module_name, module_args, inject)
        self.runner._low_level_exec_command(conn, "chmod a+rx %s" % module_path, tmp)

        return self.runner._execute_module(conn, tmp, 'async_wrapper', module_args,
           async_module=module_path,
           async_jid=self.runner.generated_jid,
           async_limit=self.runner.background,
           inject=inject
        )
1169734
def main_hrun():
    
    import argparse
    from httprunner import logger
    from httprunner.__about__ import __description__, __version__
    from httprunner.api import HttpRunner
    from httprunner.compat import is_py2
    from httprunner.validator import validate_json_file
    from httprunner.utils import (create_scaffold, get_python2_retire_msg,
                                prettify_json_file)

    parser = argparse.ArgumentParser(description=__description__)
    parser.add_argument(
        '-V', '--version', dest='version', action='store_true',
        help="show version")
    parser.add_argument(
        'testcase_paths', nargs='*',
        help="testcase file path")
    parser.add_argument(
        '--log-level', default='INFO',
        help="Specify logging level, default is INFO.")
    parser.add_argument(
        '--log-file',
        help="Write logs to specified file path.")
    parser.add_argument(
        '--dot-env-path',
        help="Specify .env file path, which is useful for keeping sensitive data.")
    parser.add_argument(
        '--report-template',
        help="specify report template path.")
    parser.add_argument(
        '--report-dir',
        help="specify report save directory.")
    parser.add_argument(
        '--failfast', action='store_true', default=False,
        help="Stop the test run on the first error or failure.")
    parser.add_argument(
        '--save-tests', action='store_true', default=False,
        help="Save loaded tests and parsed tests to JSON file.")
    parser.add_argument(
        '--startproject',
        help="Specify new project name.")
    parser.add_argument(
        '--validate', nargs='*',
        help="Validate JSON testcase format.")
    parser.add_argument(
        '--prettify', nargs='*',
        help="Prettify JSON testcase format.")

    args = parser.parse_args()
    logger.setup_logger(args.log_level, args.log_file)

    if is_py2:
        logger.log_warning(get_python2_retire_msg())

    if args.version:
        logger.color_print("{}".format(__version__), "GREEN")
        exit(0)

    if args.validate:
        validate_json_file(args.validate)
        exit(0)
    if args.prettify:
        prettify_json_file(args.prettify)
        exit(0)

    project_name = args.startproject
    if project_name:
        create_scaffold(project_name)
        exit(0)

    runner = HttpRunner(
        failfast=args.failfast,
        save_tests=args.save_tests,
        report_template=args.report_template,
        report_dir=args.report_dir
    )
    try:
        for path in args.testcase_paths:
            runner.run(path, dot_env_path=args.dot_env_path)
    except Exception:
        logger.log_error("!!!!!!!!!! exception stage: {} !!!!!!!!!!".format(runner.exception_stage))
        raise

    return 0
336634
protected function adjustRunningWorkers() : void
    {
        foreach ($this->poolsConfig as $pool => $workerConfig) {
            $workersActive = count($this->pids[$pool]);
            $workersTarget = (int)$workerConfig['instances'];
            if ($workersActive >= $workersTarget) {
                continue;
            }

            $workerDiff = $workersTarget - $workersActive;
            for ($i = 0; $i < $workerDiff; $i++) {
                $this->startupWorker($pool);
            }
        }
    }
1033837
private String plainReplacement(String pUrl, String pServletPath) {
        int idx = pUrl.lastIndexOf(pServletPath);
        String url;
        if (idx != -1) {
            url = pUrl.substring(0,idx) + pServletPath;
        } else {
            url = pUrl;
        }
        return url;
    }
492772
def remodel_run(self, c=None, **global_optargs):
    

    if not c:
        with remodel.connection.get_conn() as conn:
            return run(self, conn, **global_optargs)
    else:
        return run(self, c, **global_optargs)
145088
def runner(fun, arg=None, timeout=5):
    '''
    
    '''
    # Form args as list
    if not isinstance(arg, list):
        arg = [salt.utils.args.yamlify_arg(arg)]
    else:
        arg = [salt.utils.args.yamlify_arg(x) for x in arg]
    if len(arg) == 1 and arg[0] is None:
        arg = []

    # Create and run the runner
    runner = salt.runner.RunnerClient(__opts__['__master_opts__'])
    return runner.cmd(fun, arg)
657399
function runner(options, callback) {
	// call CommonJS module
	var analyzerOpts = {
		'noOffenders': options.noOffenders,
		'preprocessor': false,
	};

	function analyze(css) {
		new analyzer(css, analyzerOpts, callback);
	}

	if (options.url) {
		debug('Fetching remote CSS file: %s', options.url);

		// @see https://www.npmjs.com/package/node-fetch#options
		var agentOptions = {},
			requestOptions = {
				url: options.url,
				headers: {
					'User-Agent': getUserAgent()
				}
			};

		// handle options

		// @see https://github.com/bitinn/node-fetch/issues/15
		// @see https://nodejs.org/api/https.html#https_https_request_options_callback
		if (options.ignoreSslErrors) {
			agentOptions.rejectUnauthorized = false;
		}

		// @see https://gist.github.com/cojohn/1772154
		if (options.authUser && options.authPass) {
			requestOptions.headers.Authorization = "Basic " + new Buffer(options.authUser + ":" + options.authPass, "utf8").toString("base64");
		}

		// @see https://nodejs.org/api/http.html#http_class_http_agent
		var client = require(/^https:/.test(options.url) ? 'https' : 'http');
		requestOptions.agent = new client.Agent(agentOptions);

		// @see http://stackoverflow.com/a/5810547
		options.proxy = options.proxy || process.env.HTTP_PROXY;

		if (options.proxy) {
			debug('Using HTTP proxy: %s', options.proxy);

			requestOptions.agent = new(require('http-proxy-agent'))(options.proxy);
		}

		request(requestOptions, function(err, css) {
			if (err) {
				err.code = analyzer.EXIT_URL_LOADING_FAILED;

				debug(err);
				callback(err);
			} else {
				analyze(css);
			}
		});
	} else if (options.file) {
		// resolve to the full path
		options.file = resolve(process.cwd(), options.file);
		debug('Loading local CSS file: %s', options.file);

		fs.readFile(options.file, {
			encoding: 'utf-8'
		}, function(err, css) {
			if (err) {
				err = new Error('Loading CSS file failed: ' + err.toString());
				err.code = analyzer.EXIT_FILE_LOADING_FAILED;

				debug(err);
				callback(err);
			} else {
				// find the matching preprocessor and use it
				if (analyzerOpts.preprocessor === false) {
					analyzerOpts.preprocessor = preprocessors.findMatchingByFileName(options.file);
				}

				// pass the name of the file being analyzed
				analyzerOpts.file = options.file;

				analyze(css);
			}
		});
	} else if (options.stdin) {
		debug('Reading from stdin');
		cli.withStdin(analyze);
	}
}
857854
def get_default_runner(udf_class, input_col_delim=',', null_indicator='NULL', stdin=None):
    
    proto = udf.get_annotation(udf_class)
    in_types, out_types = parse_proto(proto)
    stdin = stdin or sys.stdin
    arg_parser = ArgParser(in_types, stdin, input_col_delim, null_indicator)
    stdin_feed = make_feed(arg_parser)
    collector = StdoutCollector(out_types)
    ctor = _get_runner_class(udf_class)
    return ctor(udf_class, stdin_feed, collector)
405319
function replaceDirect(brstars, replacer) {
    replacer(['require'], function(node) {
      var caller = node.parent
      if (!node.arguments.length) return
      if (!caller.arguments) return
      if (!caller.arguments.length) return
      var value = evaluate(caller.arguments[0])
      if (!value) return
      var source = evaluate(node.arguments[0])
      if (!source) return

      source = resolve.sync(source, {
        basedir: dirname
      })

      var index = brstars.indexOf(source)
      if (index === -1) return

      value = require(source)(value)
      replaceCount += 1
      hijack(caller, value)
    })
  }
1153309
function replacePatterns(token, replacements, measureThreshold) {
    var result = attemptReplacePatterns(token, replacements, measureThreshold);
    token = result == null ? token : result;
    
    return token;
}