Retrieves a list of matches from given match.
160321
def at_match(self, match, predicate=None, index=None):
        
        return self.at_span(match.span, predicate, index)
207015
def matchers(self):
        """"""
        # To remove python_matches we now have to override it as it's now a property in the superclass.
        return [
            self.file_matches,
            self.magic_matches,
            self.python_func_kw_matches,
            self.dict_key_matches,
        ]
379476
public List<ENTITY> find(Match... matches) {
        return find(Arrays.asList(matches), new ArrayList<Order>(0));
    }
1073895
def find_matches(self, text):
        """"""
        if self.use_main_ns:
            self.namespace = __main__.__dict__

        if "." in text:
            return self.attr_matches(text)
        else:
            return self.global_matches(text)
829202
private boolean containsIgnoreCase(List<String> stringlist, String match) {
		for (String s : stringlist) {
			if (s.equalsIgnoreCase(match)) {
				return true;
			}
		}
		return false;
	}
159324
def get_matches(self, text, cache=None, conflict_resolver=resolve_using_maximal_coverage):
        """"""
        is_root_node = False
        if cache is None:
            cache = {}
            is_root_node = True
        if id(self) in cache:
            return cache[id(self)]
        matches = self.get_matches_without_cache(text, cache=cache)
        cache[id(self)] = matches

        # if this is the root node, resolve the matches
        if is_root_node and conflict_resolver is not None:
            return conflict_resolver(matches)
        return matches
313464
public List<Match<E>> findAll(List<E> tokens) {
        List<Match<E>> results = new ArrayList<Match<E>>();

        int start = 0;
        Match<E> match;
        do {
            match = this.find(tokens, start);

            if (match != null) {
                start = match.endIndex();

                // match may be empty query string has all optional parts
                if (!match.isEmpty()) {
                    results.add(match);
                }
            }
        } while (match != null);

        return results;
    }
943817
def matches(match_method, *params)
      return [] unless match_method.respond_to?(:yield)
      matches = match_method.yield(*params)
      return [] unless matches.respond_to?(:each)

      # We convert Nokogiri nodes to matches transparently
      matches.map do |m|
        if m.respond_to?(:node_name)
          match(m)
        elsif m.respond_to?(:xpath)
          m.to_a.map { |n| match(n) }
        else
          m
        end
      end.flatten
    end
689111
public List<Object> match() {
        final IntMatchResults result = new IntMatchResults();
        if (matches(result)) {
            return result.getIntResultList();
        } else {
            return null;
        }
    }
1233915
def get_match_names(match):
    """"""
    names = []
    if "paren" in match:
        (match,) = match
        names += get_match_names(match)
    elif "var" in match:
        (setvar,) = match
        if setvar != wildcard:
            names.append(setvar)
    elif "trailer" in match:
        match, trailers = match[0], match[1:]
        for i in range(0, len(trailers), 2):
            op, arg = trailers[i], trailers[i + 1]
            if op == "as":
                names.append(arg)
        names += get_match_names(match)
    return names
189172
def _split_match_steps_into_match_traversals(match_steps):
    """"""
    output = []
    current_list = None
    for step in match_steps:
        if isinstance(step.root_block, QueryRoot):
            if current_list is not None:
                output.append(current_list)
            current_list = [step]
        else:
            current_list.append(step)

    if current_list is None:
        raise AssertionError(u'current_list was unexpectedly None: {}'.format(match_steps))
    output.append(current_list)

    return output
764317
def matchesWithMatchers(self, event):
        '''
        
        '''
        ret = []
        self._matches(event, set(), ret)
        return tuple(ret)
1137466
def extract_match(self, list_title_matches):
        
        # Create a set of the extracted titles
        list_title_matches_set = set(list_title_matches)

        list_title_count = []
        # Count how often a title was matched and safe as tuple in list.
        for match in list_title_matches_set:
            list_title_count.append((list_title_matches.count(match), match))

        if list_title_count and max(list_title_count)[0] != min(list_title_count)[0]:
            return max(list_title_count)[1]

        return None
657312
private List<Match> getAllMatches(final Configuration configuration, final String password)
    {
        List<Match> matches = new ArrayList<>();

        for (PasswordMatcher passwordMatcher : configuration.getPasswordMatchers())
        {
            matches.addAll(passwordMatcher.match(configuration, password));
        }
        keepLowestMatches(matches);
        return matches;
    }
150059
def sort_matches(matches):
    ''''''
    multipliers = {'exact':10**5,'fname':10**4,'fuzzy':10**2,'fuzzy_fragment':1}
    matches = [(multipliers[x.type]*(x.amount if x.amount else 1),x) for x in matches]
    return [x[1] for x in sorted(matches,reverse=True)]
574647
def match(self, s):
      
      self.matches = self.re.search(s)
      return self.matches
369489
public static Iterable<MatchResult> findMatches(Pattern pattern,
			CharSequence s) {
		List<MatchResult> results = new ArrayList<MatchResult>();

		for (Matcher m = pattern.matcher(s); m.find();)
			results.add(m.toMatchResult());

		return results;
	}