TODO

@param matches TODO
@return TODO
172923
protected TimeoutMatch findTimeout(Match matches[]) {
        TimeoutMatch ourTimeout = null;
        for (int i = 0; i < matches.length; i++) {
            if (matches[i] instanceof TimeoutMatch)
                ourTimeout = (TimeoutMatch) matches[i];
        }
        /* TODO: candidate for removal?
        if( ourTimeout == null ) {
            // Have to create our own
            ourTimeout = new TimeoutMatch(null);
        }
         */
        return ourTimeout;
    }
175398
public String match(String text){
		if(null == text){
			return null;
		}
		List<String> matchAll = matchAll(text, 1);
		if(CollectionUtil.isNotEmpty(matchAll)){
			return matchAll.get(0);
		}
		return null;
	}
272441
private function getActionFromDynamicMatch($match)
    {
        if (array_key_exists("action", $match["params"])) {
            return $this->getActionFromParam($match["params"]["action"]);
        }

        if (array_key_exists("controller", $match["params"]) && !array_key_exists("action", $match["params"])) {
            return "index";
        }

        return "noActionMatch";
    }
1255884
public static <T> DecomposableMatchBuilder0<Optional<T>> some(MatchesExact<T> t) {
    List<Matcher<Object>> matchers = Lists.of(ArgumentMatchers.eq(t.t));
    return new DecomposableMatchBuilder0<Optional<T>>(matchers, new OptionalFieldExtractor<>());
  }
536471
def matches? meth
      Citero.map("").respond_to?(meth) && ( directionize(meth).eql?("to") || directionize(meth).eql?(meth.to_s) )
    end
1357694
function(match) {
			var matches = (iFormat + 1 < format.length && format.charAt(iFormat + 1) == match);
			if (matches)
				iFormat++;
			return matches;
		}
258654
function setBadge(todos) {
  if (chrome.browserAction) {
    const count = todos.filter(todo => !todo.marked).length;
    chrome.browserAction.setBadgeText({ text: count > 0 ? count.toString() : '' });
  }
}
68296
public List<ENTITY> findExcludeColumns(Collection<String> excludeColumns, Match... matches) {
        Set<String> columns = orMapping.getAllColumns();
        for (String column : excludeColumns) {
            columns.remove(column);
        }
        return findIncludeColumns(columns, matches);
    }
1226430
@Override
    public final MatchResult matches(final List<String> lines) {
        for (int i = 0; i < lines.size(); i++) {
            if (matches(i + 1, lines.get(i))) return new MatchResult(true, this, i);
        }
        return NO_MATCH;
    }
116716
public void doMatch() {
    boolean matchFound = false;
    for (ConsumablePattern<T> pattern : patterns) {
      if (pattern.matches(value)) {
        pattern.consume(value);
        matchFound = true;
        break;
      }
    }

    if (!matchFound) {
      throw new MatchException("No match found for " + value);
    }
  }
956321
@Override
	protected boolean matchesSafely(T actual, Description mismatch)
	{
		boolean matches = true;
		
		for (Matcher<? super T> matcher : matchers)
		{
			if (!matcher.matches(actual))
			{
				if (!matches)
				{
					mismatch.appendText(SEPARATOR);
				}
				
				matches = false;
				
				matcher.describeMismatch(actual, mismatch);
			}
		}
		
		return matches;
	}
411891
function (match) {
    var temp = match[0], result;

    function checkDot(ctx) {
      var c = ctx + temp,
        m = match,
        build = '';

      build = '(typeof ' + c + ' !== "undefined" && ' + c + ' !== null';
      utils.each(m, function (v, i) {
        if (i === 0) {
          return;
        }
        build += ' && ' + c + '.' + v + ' !== undefined && ' + c + '.' + v + ' !== null';
        c += '.' + v;
      });
      build += ')';

      return build;
    }

    function buildDot(ctx) {
      return '(' + checkDot(ctx) + ' ? ' + ctx + match.join('.') + ' : "")';
    }
    result = '(' + checkDot('_ctx.') + ' ? ' + buildDot('_ctx.') + ' : ' + buildDot('') + ')';
    return '(' + result + ' !== null ? ' + result + ' : ' + '"" )';
  }
131072
public function setMatches($matches)
    {
        foreach ($matches as $key => $dtoData) {
            $this->matches[$key] = new MatchReferenceDto($dtoData);
        }
    
        return $this;
    }
1009226
public static CharMatcher isNot(final char match) {
    return new FastMatcher() {
      @Override public boolean matches(char c) {
        return c != match;
      }

      @Override public CharMatcher and(CharMatcher other) {
        return other.matches(match) ? super.and(other) : other;
      }

      @Override public CharMatcher or(CharMatcher other) {
        return other.matches(match) ? ANY : this;
      }

      @Override public CharMatcher negate() {
        return is(match);
      }

      @Override public String toString() {
        return "CharMatcher.isNot('" + showCharacter(match) + "')";
      }
    };
  }
1297304
public static Todo instance(Context context) {
        Todo instance = context.get(todoKey);
        if (instance == null)
            instance = new Todo(context);
        return instance;
    }
130971
public MethodDoc getMatchingMethod(MethodDoc method) {

        MethodDoc[] methods = getMethods();
        for (int i = 0; i < methods.length; i++) {

            if (method.getName().equals(methods[i].getName()) &&
                method.getSignature().equals(methods[i].getSignature())) {

                return methods[i];
            }
        }
        return null;
    }
1303978
def todo_with_substring(substring)
      issue_todo = @remaining_todos.detect{ |t| !t.content.index(substring).nil? }
      issue_todo ||= @completed_todos.detect { |t| !t.content.index(substring).nil? }
    end