Looks for a potential exact match
based on given data.

@param {String} ctx
@param {Array} data
@return {String}
@api private
967830
function getMatch(ctx, data, options) {
  // Look for a command match, eliminating and then
  // re-introducing leading spaces.
  var len = ctx.length;
  var trimmed = ctx.replace(/^\s+/g, '');
  var match = autocomplete.match(trimmed, data.slice(), options);
  if (_.isArray(match)) {
    return match;
  }
  var prefix = new Array(len - trimmed.length + 1).join(' ');
  // If we get an autocomplete match on a command, finish it.
  if (match) {
    // Put the leading spaces back in.
    match = prefix + match;
    return match;
  }
  return undefined;
}
496067
function (xxx, results) {
                var o
                ,   r
                ,   lookup = {}
                // map from results to keys
                for (var i = 0, l = results.rows.length; i < l; i++) {
					var rowObj = results.rows.item(i);
                    o = JSON.parse(rowObj.value)
                    var row_key = rowObj.id;
                    lookup[row_key] = o;
                    try{row_key = JSON.parse(row_key);}catch(exc){}
                    //o.key = row_key;
                    o.timestamp = rowObj.timestamp;
                }
                r = args.map(function(row_key) {return lookup[row_key];});
                if (!that.isArray(keyOrArray)) r = r.length ? r[0] : null
                if (cb) that.lambda(cb).call(that, r)
            }
632224
function( data ) {
        var ret = {
            coverage: 0,
            hits: 0,
            misses: 0,
            sloc: 0
        };
        for (var i = 0; i < data.source.length; i++) {
            var line = data.source[i];
            var num = i + 1;
            if (data[num] === 0) {
                ret.misses++;
                ret.sloc++;
            } else if (data[num] !== undefined) {
                ret.hits++;
                ret.sloc++;
            }
        }
        ret.coverage = ret.hits / ret.sloc * 100;

        return [ret.hits,ret.sloc];

    }
1041734
private Optional<Data<Input, Output>> match_(Input input) {
        return Optional.ofNullable(recent_.get())
                .filter((Data<Input, Output> data) -> equality_.test(data.getInput(), input));
    }
451956
function (data, regex, {
	multiple = false
} = {}) {
	let result = data
	let extracted
	if (regex) {
		try {
			let rgx = regex
			if (_.isString(regex)) {
				rgx = new RegExp(regex, 'gim')
			}
			extracted = rgx.exec(data)
			if (multiple) {
				result = extracted
				// result = data.match(rgx)
			} else {
				if (extracted[1]) {
					result = extracted[1]
				} else {
					result = extracted[0]
				}
				// result = data.match(rgx)[0]
			}
		} catch (error) {
			// console.log("Regex error: ", error)
		}
	}
	return result
}
215992
function getMatchData(input, cb) {
  var string = input.context;
  var cmd = input.match;
  var midOption = String(string).trim().slice(0, 1) === '-';
  var afterOption = input.option !== undefined;
  if (midOption === true && !cmd._allowUnknownOptions) {
    var results = [];
    for (var i = 0; i < cmd.options.length; ++i) {
      var long = cmd.options[i].long;
      var short = cmd.options[i].short;
      if (!long && short) {
        results.push(short);
      } else if (long) {
        results.push(long);
      }
    }
    cb(results);
    return;
  }

  function handleDataFormat(str, config, callback) {
    var data = [];
    if (_.isArray(config)) {
      data = config;
    } else if (_.isFunction(config)) {
      var cbk = config.length < 2 ? function () {} : function (res) {
        callback(res || []);
      };
      var res = config(str, cbk);
      if (res && _.isFunction(res.then)) {
        res.then(function (resp) {
          callback(resp);
        }).catch(function (err) {
          callback(err);
        });
      } else if (config.length < 2) {
        callback(res);
      }
      return;
    }
    callback(data);
    return;
  }

  if (afterOption === true) {
    var opt = strip(input.option).trim();
    var shortMatch = _.find(cmd.options, { short: opt });
    var longMatch = _.find(cmd.options, { long: opt });
    var match = longMatch || shortMatch;
    if (match) {
      var config = match.autocomplete;
      handleDataFormat(string, config, cb);
      return;
    }
  }

  var conf = cmd._autocomplete;
  conf = conf && conf.data ? conf.data : conf;
  handleDataFormat(string, conf, cb);
  return;
}
269638
function (data) {
    if (! data.success) {
      //var timestamp = Math.round(new Date().getTime() / 1000);
      this.xml[0].children[this.testIdx].children[this.testCount].children.push({
        name: 'failure',
        attrs: {
          name: data.type,
          message:  (data.message ? data.message : 'Expected: ' + data.expected + 'Actual: ' + data.value)
        }
      });

      //if (this.variationCount > -1 && this.xml[0].children[this.testIdx].children[this.testCount].children[this.variationCount]) {
        //this.xml[0].children[this.testIdx].children[this.testCount].children[this.variationCount].attrs.end = timestamp;
      //}

      this.variationCount++;
    }

    return this;
  }
649643
def match(pattern, data, **parse_kwargs):
    """"""
    return [m.value for m in parse(pattern, **parse_kwargs).find(data)]
293861
public int exactMatchSearch(char[] keyChars, int pos, int len, int nodePos)
    {
        int result = -1;

        int b = base[nodePos];
        int p;

        for (int i = pos; i < len; i++)
        {
            p = b + (int) (keyChars[i]) + 1;
            if (b == check[p])
                b = base[p];
            else
                return result;
        }

        p = b;
        int n = base[p];
        if (b == check[p] && n < 0)
        {
            result = -n - 1;
        }
        return result;
    }
300130
function (data) {
    this.variationCount = -1;
    this.xml[0].children[this.testIdx].children.push({
      name: 'testcase',
      children: [],
      attrs: {
        classname: this.xml[0].children[this.testIdx].attrs.name,
        name: data.name
      }
    });

    return this;
  }
1353309
def data(self, ctx=None):
        
        d = self._check_and_get(self._data, ctx)
        if self._rate:
            d = nd.Dropout(d, self._rate, self._mode, self._axes)
        return d
984235
function(type, pattern, data) {
		if (type == 'tag') { // case-insensitive match on tag name
			return pattern && pattern.toLowerCase() == data.toLowerCase();
		} else {
			return pattern === data;
		}
	}
965830
function resemblesData (string) {
  const fixed = ethUtil.addHexPrefix(string)
  const isValidAddress = ethUtil.isValidAddress(fixed)
  return !isValidAddress && isValidHex(string)
}
23364
function ctx() {
    return function context(req, res, next) {
        var data = {};

        req.set = function set(key, value) {
            assert.string(key, 'key must be string');

            if (key === '') {
                assert.fail('key must not be empty string');
            }
            data[key] = value;
        };

        req.get = function get(key) {
            assert.string(key, 'key must be string');

            if (key === '') {
                assert.fail('key must not be empty string');
            }
            return data[key];
        };

        // private method which returns the entire context object
        req._getAllContext = function _getAllContext() {
            return data;
        };

        return next();
    };
}
1167396
private function elementExistsWith($data)
    {
        $found = null;
        array_map(function ($element) use ($data, &$found) {
            if ($element->getData() === $data) {
                $found = $element;
            }
        }, $this->elements);

        return $found !== null;
    }
1050479
function (data, filters) {
			this.writeDebug('filterData',arguments);
			var filterTest = true;

			for (var k in filters) {
				if (filters.hasOwnProperty(k)) {

					// Exclusive filtering
					if (this.settings.exclusiveFiltering === true || (this.settings.exclusiveTax !== null && Array.isArray(this.settings.exclusiveTax) && this.settings.exclusiveTax.indexOf(k) !== -1)) {
						var filterTests = filters[k];
						var exclusiveTest = [];

						if (typeof data[k] !== 'undefined') {
							for (var l = 0; l < filterTests.length; l++) {
								exclusiveTest[l] = new RegExp(filterTests[l], 'i').test(data[k].replace(/([^\x00-\x7F]|[.*+?^=!:${}()|\[\]\/\\]|&\s+)/g, ''));
							}
						}

						if (exclusiveTest.indexOf(true) === -1) {
							filterTest = false;
						}
					}
					// Inclusive filtering
					else {
						if (typeof data[k] === 'undefined' || !(new RegExp(filters[k].join(''), 'i').test(data[k].replace(/([^\x00-\x7F]|[.*+?^=!:${}()|\[\]\/\\]|&\s+)/g, '')))) {
							filterTest = false;
						}
					}
				}
			}

			if (filterTest) {
				return true;
			}
		}
51013
function(xxx, results) {
        var o, r, lookup = {}
          // map from results to keys
        for (var i = 0, l = results.rows.length; i < l; i++) {
          o = JSON.parse(results.rows.item(i).value)
          o.key = results.rows.item(i).id
          lookup[o.key] = o;
        }
        r = args.map(function(key) {
          return lookup[key];
        });
        if (!that.isArray(keyOrArray)) r = r.length ? r[0] : null
        if (cb) that.lambda(cb).call(that, r)
      }