Analysis function

    Get list of files that depend on given configs
    If there is 'graph=name' in analysis parameters, instead graph of includes will be rendered into name.svg
774436
def depends_on(options, **kwargs):
    
    include_graph = options['include_graph']

    include_graph.render('full_graph')

    result = None

    if 'graph' in kwargs:
        name = kwargs['graph']
        del kwargs['graph']

        result = _Result(kwargs)

        dep_graph = build_dependency_graph(include_graph, **kwargs)

        dep_graph.render(name)

        result.add_result("Rendered dep graph at {}".format(name))

    else:
        result = _Result(kwargs)

        dep_graph = build_dependency_graph(include_graph, **kwargs)

        for node, edges in dep_graph:
            if node not in kwargs:
                result.add_result(node)

    return result
561066
function getJSFiles(folder = srcFolder){
  let all = [];
  let f = fs.readdirSync(folder);
  for(file of f){
    all.push(path.join(folder,file))
    if(fs.lstatSync(path.join(folder,file)).isDirectory()){
      all = all.concat(getJSFiles(path.join(folder,file)));
    }
  }
  return all.filter(x => x.endsWith('.js'));
}
476378
function (err, res) {
      if (err) {
        cb(err)
      } else {
        res.stats.includedFiles.forEach(function (file) {
          compiler.emit('dependency', file)
        })
        cb(null, res.css.toString())
      }
    }
536017
def _analyze_case(model_dir, bench_dir, config):
    
    bundle = livvkit.verification_model_module
    model_out = functions.find_file(model_dir, "*"+config["output_ext"])
    bench_out = functions.find_file(bench_dir, "*"+config["output_ext"])
    model_config = functions.find_file(model_dir, "*"+config["config_ext"])
    bench_config = functions.find_file(bench_dir, "*"+config["config_ext"])
    model_log = functions.find_file(model_dir, "*"+config["logfile_ext"])
    el = [
            bit_for_bit(model_out, bench_out, config),
            diff_configurations(model_config, bench_config, bundle, bundle),
            bundle.parse_log(model_log)
         ]
    return el
1173882
function findDependencies(startFile, class2Path, deps) {
    // Create a new regex object to reset the readIndex
    const depRegEx = /global ([a-zA-Z0-9,\s]+) \*/g;

    // Get global variable
    const contents = fs.readFileSync(startFile).toString();
    /** @type {string[]} */
    let fileDeps = [];
    let fileDepMatch;
    while ((fileDepMatch = depRegEx.exec(contents)) !== null) { // eslint-disable-line no-cond-assign
        const fileDep = fileDepMatch[1];
        fileDeps = fileDeps.concat(fileDep.split(/,\s*/g));
    }

    fileDeps.forEach(dep => {
        // CustomError classes
        if (dep.slice(-5) === 'Error') dep = 'errors';
        if (dep === 'runKeyguard' || dep === 'loadNimiq') dep = 'common';

        if (deps.indexOf(dep) > -1) return;

        deps.push(dep);

        if (dep === 'Nimiq') return;

        const depPath = class2Path.get(dep);
        if (!depPath) throw new Error(`Unknown dependency ${dep} referenced from ${startFile}`);

        // deps are passed by reference
        findDependencies(depPath, class2Path, deps); // recurse
    });

    return deps;
}
916170
function getFileNames(fileNames = [], componentName) {
  const defaultFileNames = {
    testFileName: `${defaultOptions.testFileName}.${componentName}`,
    componentFileName: componentName,
    styleFileName: componentName,
  }

  const formattedFileNames = Object.keys(fileNames).reduce(
    (acc, curr) => {
      acc[curr] = replaceKeys(fileNames[curr], componentName)
      return acc
    },
    { ...defaultFileNames }
  )

  return formattedFileNames
}
1280868
async function buildPathsObject(files) {
  return Promise.all(
    files.map(async filepath => {
      const name = path.basename(filepath, '.svg');
      const svg = fs.readFileSync(filepath, 'utf-8');
      const pathStrings = await svgo.optimize(svg, { path: filepath })
        .then(({ data }) => data.match(/ d="[^"]+"/g) || [])
        .then(paths => paths.map(s => s.slice(3)));
      return `"${name}": [${pathStrings.join(',\n')}]`;
    }),
  );
}
779118
function mapDependencies(dependencies) {
  var deps;

  deps = (dependencies) ? Object.keys(dependencies) : [];

  return deps.map(function(name) {
    return {
      name: name,
      version: dependencies[name]
    };
  });
}
1241565
def _get_graph(self, ctx, bundle, extensions, caller=None):
        
        request = ctx.get('request')
        if request is None:
            request = get_current_request()
        if ':' in bundle:
            config_name, bundle = bundle.split(':')
        else:
            config_name = 'DEFAULT'
        webpack = request.webpack(config_name)
        assets = (caller(a) for a in webpack.get_bundle(bundle, extensions))
        return ''.join(assets)
530587
function collectDependencies(module) {
    let paths = [];
    function pathsToAcceptingModules(path, root) {
      const requiredMe = parents[root.filename];
      if (module.hot._selfAccepted) {
        paths.push(path.concat(root.filename));
        return;
      }
      if (module.hot._selfDeclined) {
        return;
      }
      for (let next in requiredMe) {
        let parentHotRuntime = requiredMe[next].hot;
        if (parentHotRuntime._acceptedDependencies[root.filename]) {
          paths.push(path.concat(root.filename));
          continue;
        }
        if (parentHotRuntime._declinedDependencies[root.filename]) {
          continue;
        }
        pathsToAcceptingModules(path.concat(root.filename), requiredMe[next]);
      }
    }
    pathsToAcceptingModules([], module);
    return paths;
  }
440502
private static List<String> getDependencies(Config config) {
    return config.hasPath(ConfigurationKeys.JOB_DEPENDENCIES) ? Arrays
        .asList(config.getString(ConfigurationKeys.JOB_DEPENDENCIES).split(",")) : new ArrayList<>();
  }
799686
def _fetchDevAll(self, namestr, devlist, statsfunc):
        
        for dev in devlist:
            stats = statsfunc(dev)
            name = 'diskio_%s_requests' % namestr
            if self.hasGraph(name):
                self.setGraphVal(name, dev + '_read', stats['rios'])
                self.setGraphVal(name, dev + '_write', stats['wios'])
            name = 'diskio_%s_bytes' % namestr
            if self.hasGraph(name):
                self.setGraphVal(name, dev + '_read', stats['rbytes'])
                self.setGraphVal(name, dev + '_write', stats['wbytes'])
            name = 'diskio_%s_active' % namestr
            if self.hasGraph(name):
                self.setGraphVal(name, dev, stats['ios_active'])
861421
function includesAtSteal(graph) {
	var found = false;

	var isAtSteal = function(name) {
		return name === "@steal";
	};

	keys(graph).forEach(function(name) {
		var node = graph[name];

		if (isPluginExcludedFromBuild(node)) {
			return;
		}

		if (isAtSteal(name)) {
			return (found = true);
		}

		defaultTo(node.dependencies, []).forEach(function(depName) {
			if (isAtSteal(depName)) {
				return (found = true);
			}
		});
	});

	return found;
}
1175296
function getDepends(file, config) {
    var code = fs.readFileSync(file, 'utf8'),
        // only process the first module in file
        meta = ast.parse(code)[0],
        deps = ((meta || {}).dependencies || []).map(function (dep) {
            return idToPath(dep, config);
        });
    return deps;
}
69232
function getConfigPath(configPaths) {
  let conf = null;

  // Try all config paths and return for the first found one
  some(configPaths, configPath => {
    if (!configPath) return;

    // Compile config using environment variables
    const compiledConfigPath = template(configPath)(process.env);

    let resolvedConfigPath = resolve(process.cwd(), compiledConfigPath);
    const resolvedName = fileExists(resolvedConfigPath);

    if (resolvedConfigPath && resolvedName) {
      conf = resolvedName;
    }

    return conf;
  });

  return conf;
}
379253
function getPaths(src, baseDir, output) {
    return new Elixir.GulpPaths()
        .src(src, baseDir || config.get('assets.svg.folder'))
        .output(output || config.get('public.svg.outputFolder'));
}
234951
def save_graph_to_file(graph_file_name, module_spec, class_count):
  """"""
  sess, _, _, _, _, _ = build_eval_session(module_spec, class_count)
  graph = sess.graph

  output_graph_def = tf.graph_util.convert_variables_to_constants(
      sess, graph.as_graph_def(), [FLAGS.final_tensor_name])

  with tf.gfile.GFile(graph_file_name, 'wb') as f:
    f.write(output_graph_def.SerializeToString())