Explodes mock configs to usable form
Each mock is an array containing
config, delay, response
request
method, url, params, data, headers
response
data to be returned or function()

@param configs Array
@returns {Array}
762931
function explodeMocks(configs) {
		function explode(config, delay, response) {
			// Config can be array, function or string (function contents)
			config = angular.isArray(config) ? explodeConfig.apply(null, config) : (
				angular.isFunction(config) ? config : Function("return " + config)()
			);
			return {
				config: config,
				delay: delay,
				response: response
			};
		}
		function explodeConfig(method, url, params, data, headers) {
			return {
				method: method,
				url: url,
				params: params,
				data: data,
				headers: headers
			}
		}
		var mocks = [];
		angular.forEach(configs, function(value, key) {
			mocks.push(explode.apply(null, value));
		});
		return mocks;
	}
326925
function loadAppConfigs() {
        var appConfigs = {};
        var appDir = path.join(this.injector.rootDir, '/app');

        if (!fs.existsSync(appDir)) {
            return appConfigs;
        }

        var me = this;
        var appNames = fs.readdirSync(appDir);

        _.each(appNames, function (appName) {
            appConfigs[appName] = me.injector.loadModule('app/' + appName + '/' + appName + '.app');
        });

        return appConfigs;
    }
26262
public Map<URI, Config> getConfigsFromStrings(Collection<String> configKeyStrs)
      throws ConfigStoreFactoryDoesNotExistsException, ConfigStoreCreationException, VersionDoesNotExistException,
      URISyntaxException {
    if (configKeyStrs == null || configKeyStrs.size() == 0)
      return Collections.emptyMap();

    Collection<URI> configKeyUris = new ArrayList<>();
    for (String s : configKeyStrs) {
      configKeyUris.add(new URI(s));
    }
    return getConfigs(configKeyUris);
  }
680759
function registerMock(post) {

        var responseObj = {};
        responseObj["statusCode"] = parseInt(post.statusCode) || 200;
        responseObj["header"] = post.header || {
                'Content-Type': post.contentType || 'application/json',
                'Access-Control-Allow-Origin': '*'
            };
        responseObj["contentType"] = post.contentType || "application/json";
        if (typeof post.responseText == 'object') {

            responseObj["responseText"] = JSON.stringify(post.responseText);

        } else {
            responseObj["responseText"] = post.responseText || "This is a fake response";
        }


        responseObj["responseFile"] = post.responseFile;

        responseObj["id"] = post.id;
        responseObj["keyValues"] = post.keyValues || {};
        responseObj["eval"] = post.eval;
        responseObj["delayTime"] = parseInt(post.delayTime) || 0;

        var requestPath = post.requestPath;
        if (post.requestJSONBody == '' || post.requestJSONBody == null) {

            mockReqRespMap[requestPath] = responseObj;

        } else {
            responseObj["requestJSONBody"] = post.requestJSONBody;
            var uniqueID = md5(JSON.stringify(post.requestJSONBody));
            mockReqRespMap[requestPath + uniqueID] = responseObj;
        }
    }
440390
function mockTimeout() {
  var events = [];
  var id = 0;
  var now = 0;

  return {
    mocks: {setTimeout: mockSetTimeout, clearTimeout: mockClearTimeout},
    flush: flush, get pending() { return events.length; }
  };

  function mockSetTimeout(fn, delay) {
    delay = delay || 0;
    events.push({time: now + delay, fn: fn, id: id});
    events.sort(function(a, b) { return a.time - b.time; });
    return id++;
  }

  function mockClearTimeout(id) {
    for (var i = 0; i < events.length; ++i) {
      if (events[i].id === id) {
        events.splice(i, 1);
        break;
      }
    }
  }

  function flush(delay) {
    if (delay !== undefined)
      now += delay;
    else if (events.length)
      now = events[events.length - 1].time;
    else
      throw new Error('No timer events registered');

    while (events.length && events[0].time <= now) {
      events.shift().fn();
    }
  }
}
765604
function assertConfigSetters(configSetters) {
  if (!Array.isArray(configSetters)) {
    throw new Error(
      `Expected parameter 'configSetters' to be an array of functions. Instead got ${configSetters}.`
    )
  }
  if (!configSetters.every(_.isFunction)) {
    const invalidElementIndex = configSetters.findIndex(setter => !_.isFunction(setter))
    throw new Error(
      `Expected parameter 'configSetters' to be an array of functions. ` +
        `Element at index ${invalidElementIndex} is invalid: ${configSetters[invalidElementIndex]}.`
    )
  }
}
375977
function captureConfigObject(config) {
  let captured;
  const require = {};
  require.config = function _config(conf) {
    captured = conf;
  };

  let wedConfig;

  // eslint-disable-next-line no-unused-vars
  function define(name, obj) {
    if (wedConfig !== undefined) {
      throw new Error("more than one define");
    }

    switch (arguments.length) {
    case 0:
      throw new Error("no arguments to the define!");
    case 1:
      if (typeof name !== "object") {
        throw new Error("if define has only one argument, it must be an " +
                        "object");
      }
      wedConfig = name;
      break;
    default:
      throw new Error("captureConfigObject is designed to capture a " +
                      "maximum of two arguments.");
    }
  }

  eval(config); // eslint-disable-line no-eval
  return {
    requireConfig: captured,
    wedConfig,
  };
}
918790
function (config, mockSrc) {
    var dataWithContext = readMockManifest(config, mockSrc);

    // log('readScenarioData config', config);
    if (config.plugins) {
      dataWithContext = runPlugins(dataWithContext, config.plugins);
    }

    return removeContext(dataWithContext);
  }
1292779
public static String buildDynamicKey(final Object[] paramNames, final Object[] paramValues) {
		return Arrays.toString(paramNames).concat(Arrays.toString(paramValues));
	}
369444
function _use(config) {
    var _config = this._config;

    Object.keys(config).forEach(function(key) {
      _config[key] = config[key];
    });

    return this;
  }
321129
function (path) {
		filesThatExist.push(path);

		var mockGetConfig = {
			handler: function (req, res, params) {
				return params;
			},
		};

		spyOn(mockGetConfig, 'handler').and.callThrough();
		
		registerRequireMock(testObject._formatPathForRequire(path), function () {
			return mockGetConfig;
		});

		return mockGetConfig;
	}
1065198
function Config() {
	this._parameterNames = [];
	this._descriptors = {};
	this._forms = [];
	this._formMap = {};
	this._flags = [
		{ name: "optional", symbol: "?" },
		{ name: "noLone",   symbol: "*" }
	];

	var flagsList = this._flags.map(function(flag) {
		return "\\" + flag.symbol;
	}).join("");
	this._flagsRegex = new RegExp("^([" + flagsList + "]+)");

	this._flagsMap = {};
	for (var i = 0, len = this._flags.length; i < len; i++) {
		var flag = this._flags[i];
		this._flagsMap[flag.symbol] = flag.name;
	}
}
585814
public List<IResponseDumpable> createResponseDumpers(DumpConfig config, HttpServerExchange exchange) {
        ResponseDumperFactory factory = new ResponseDumperFactory();
        List<IResponseDumpable> dumpers = new ArrayList<>();
        for(String dumperNames: responseDumpers) {
            IResponseDumpable dumper = factory.create(dumperNames, config, exchange);
            dumpers.add(dumper);
        }
        return dumpers;
    }
577194
public List<Invocation> find(List<?> mocks) {
        List<Invocation> unused = new LinkedList<Invocation>();
        for (Object mock : mocks) {
            List<Stubbing> fromSingleMock = MockUtil.getInvocationContainer(mock).getStubbingsDescending();
            for(Stubbing s : fromSingleMock) {
                if (!s.wasUsed()) {
                     unused.add(s.getInvocation());
                }
            }
        }
        return unused;
    }
183812
function (config) {
        config = config || {};
        this.api_key = config.api_key;
        this.host = config.host || undefined;
        this.api_version = config.api_version || undefined;
        this.dev_mode = config.dev_mode || false;
        return this;
    }
706508
function listConfigs(resultFunc) {
  $.ajax({
    type: 'GET',
    url: 'command/list_configs',
    dataType: 'text',
    error: function(request, textStatus) {
      getResponseDataJson(textStatus);
    },
    success: function(data, textStatus, request) {
      var response = getResponseDataJson(null, data);
      if (response) {
        resultFunc(response.configs);
      }
    }
  });
}
977688
function (buildConfig, config) {
        var testConfig = extend(true, {}, config || {}, {
            nomen: true,
            unparam: true,
            predef: [
                'it',
                'describe'
            ]
        });

        if (!buildConfig.nodeProject) {
            testConfig.predef.push('angular');
        }

        return testConfig;
    }