This is just for use in unit-testing.
492115
public void waitForEachEventLoop() throws InterruptedException, ExecutionException
    {
        for (EventExecutor exec : serverGroup.clientToProxyWorkerPool)
        {
            exec.submit(() -> {
                // Do nothing.
            }).get();
        }
    }
659644
@Override
  public final void sample()
  {
    long totalCount = _totalCount.get();
    long lastTotal = _lastTotal;
    _lastTotal = totalCount;

    _value = totalCount - lastTotal;
  }
521629
function only( testName, expected, callback, async ) {
	var newTest;

	if ( focused )  { return; }

	QUnit.config.queue.length = 0;
	focused = true;

	if ( arguments.length === 2 ) {
		callback = expected;
		expected = null;
	}

	newTest = new Test({
		testName: testName,
		expected: expected,
		async: async,
		callback: callback
	});

	newTest.queue();
}
959058
public final void evaluate() {
    final POSEvaluator evaluator = new POSEvaluator(this.posTagger);
    try {
      evaluator.evaluate(this.testSamples);
    } catch (IOException e) {
      e.printStackTrace();
    }
    System.out.println(evaluator.getWordAccuracy());
  }
248832
def _check_valid_udunits(self, ds, variable_name):
        '''
        
        '''
        variable = ds.variables[variable_name]

        units = getattr(variable, 'units', None)
        standard_name = getattr(variable, 'standard_name', None)
        standard_name, standard_name_modifier = self._split_standard_name(standard_name)
        std_name_units_dimensionless = cfutil.is_dimensionless_standard_name(self._std_names._root,
                                                               standard_name)

        # If the variable is supposed to be dimensionless, it automatically passes
        should_be_dimensionless = (variable.dtype.char == 'S' or
                                   std_name_units_dimensionless)

        valid_udunits = TestCtx(BaseCheck.HIGH, self.section_titles["3.1"])
        are_udunits = (units is not None and util.units_known(units))
        valid_udunits.assert_true(should_be_dimensionless or are_udunits,
                                  'units for {}, "{}" are not recognized by UDUNITS'.format(variable_name, units))
        return valid_udunits.to_result()
299700
function () {
        var compo = $singleton (Component, {
                        somthingHappened: $triggerOnce () })

        $assertEveryCalled (function (first, second) {
            compo.somthingHappened (function (what) { $assert (what, 'somthin'); first () })
            compo.somthingHappened (function (what) { $assert (what, 'somthin'); second () })
            compo.somthingHappened ('somthin') }) }
581120
@Override
    public void visitClassContext(ClassContext classContext) {
        try {
            unusedParms = new BitSet();
            regToParm = new HashMap<>();
            stack = new OpcodeStack();
            super.visitClassContext(classContext);
        } finally {
            stack = null;
            regToParm = null;
            unusedParms.clear();
        }
    }
555726
function (data) {
    data.assertionInfo = this.temporaryAssertions;
    data.browser = this.temp.browser;
    this.output.test[data.id] = this.templates.test(data);
    this.temporaryAssertions = [];
    return this;
  }
810936
public <T> void assertThat(T actual, org.hamcrest.Matcher<? super T> matcher) {
    try {
      org.hamcrest.MatcherAssert.assertThat(actual, matcher);
    } catch (AssertionError e) {
      fail(e);
    }
  }
122454
protected void demo() throws Throwable {
	    MethodHandles.Lookup lookup = MethodHandles.lookup();
	    MethodType type = MethodType.methodType(String.class, int.class, int.class);
	    MethodHandle mh = lookup.findVirtual(String.class, "substring", type);
	    String str = (String) mh.invokeExact("Hello World", 1, 3);
	    System.out.println(str);
	}
1025112
public static void main(String[] args) throws IOException {
		ExampleHelpers.configureLogging();
		ClassPropertyUsageAnalyzer.printDocumentation();

		ClassPropertyUsageAnalyzer processor = new ClassPropertyUsageAnalyzer();
		ExampleHelpers.processEntitiesFromWikidataDump(processor);
		processor.writeFinalReports();
	}
101422
function () {
        $assertEveryCalledOnce (function (prototypeMethod, instanceMethod) {
            var instance = null
            var Compo = new $component ({
                prototypeMethod: function () { $assert (this === instance); prototypeMethod () } })
            instance = new Compo ({
                instanceMethod:  function () { $assert (this === instance); instanceMethod () } })

            instance.prototypeMethod.call (null)
            instance.instanceMethod.call (null) }) }
1787
private void assertApplicable( FunctionInputDef inputDef) throws IllegalArgumentException
    {
    try
      {
      for( VarNamePattern varNamePattern : getIncludedVars())
        {
        assertApplicable( inputDef, varNamePattern);
        }
      for( VarNamePattern varNamePattern : getExcludedVars())
        {
        assertApplicable( inputDef, varNamePattern);
        }
      }
    catch( Exception e)
      {
      throw new IllegalArgumentException( "Can't apply " + this + " to " + inputDef, e);
      }
    }
1208012
function () {
    this.controllerPresent = false;
    this.isControllerPresent = trackedControlsUtils.isControllerPresent; // to allow mock
    this.buttonStates = {};
    this.previousAxis = [];
    this.onModelLoaded = bind(this.onModelLoaded, this);
    this.checkIfControllerPresent = bind(this.checkIfControllerPresent, this);
    this.onGamepadConnected = bind(this.onGamepadConnected, this);
    this.onGamepadDisconnected = bind(this.onGamepadDisconnected, this);
  }
881883
private static void verifyJUnit4Present() {
    try {
      Class<?> clazz = Class.forName("org.junit.runner.Description");
      if (!Serializable.class.isAssignableFrom(clazz)) {
        JvmExit.halt(SlaveMain.ERR_OLD_JUNIT);
      }
    } catch (ClassNotFoundException e) {
      JvmExit.halt(SlaveMain.ERR_NO_JUNIT);
    }
  }
170561
@CheckReturnValue
    public static <T> T mock(Class<T> classToMock) {
        return mock(classToMock, withSettings());
    }
377339
public function main()
    {
        $fail = $this->nestedConditionPresent() ? $this->testNestedCondition() :
            $this->testIfCondition() && $this->testUnlessCondition();

        if ($fail) {
            $text = null;
            if ($this->message !== null && strlen(trim($this->message)) > 0) {
                $text = trim($this->message);
            } else {
                if ($this->ifCondition !== null && $this->ifCondition !== "" && $this->testIfCondition()) {
                    $text = "if=" . $this->ifCondition;
                }
                if ($this->unlessCondition !== null && $this->unlessCondition !== "" && $this->testUnlessCondition()) {
                    if ($text === null) {
                        $text = "";
                    } else {
                        $text .= " and ";
                    }
                    $text .= "unless=" . $this->unlessCondition;
                }
                if ($this->nestedConditionPresent()) {
                    $text = "condition satisfied";
                } else {
                    if ($text === null) {
                        $text = "No message";
                    }
                }
            }

            $this->log("failing due to " . $text, Project::MSG_DEBUG);
            if ($this->status === null) {
                throw new BuildException($text);
            }

            throw new ExitStatusException($text, $this->status);
        }
    }