MCPcopy Create free account
hub / github.com/nodejs/node / callRandomFunction

Function callRandomFunction

deps/v8/tools/clusterfuzz/js_fuzzer/mutators/common.js:332–348  ·  view source on GitHub ↗
(path, identifier, seed)

Source from the content-addressed store, hash-verified

330}
331
332function callRandomFunction(path, identifier, seed) {
333 if (seed === undefined) {
334 seed = randomSeed();
335 }
336
337 let args = [
338 identifier,
339 _numericLiteral(seed)
340 ];
341
342 args = args.map(_unwrapExpressionStatement);
343 args = args.concat(randomArguments(path));
344
345 return babelTypes.callExpression(
346 babelTypes.identifier('__callRandomFunction'),
347 args);
348}
349
350function nearbyRandomNumber(value) {
351 const probability = random.random();

Callers

nothing calls this directly

Calls 6

randomSeedFunction · 0.85
_numericLiteralFunction · 0.85
randomArgumentsFunction · 0.85
concatMethod · 0.80
mapMethod · 0.65
identifierMethod · 0.45

Tested by

no test coverage detected