Invokes {@link QuickDiagnose#matches(org.hamcrest.Matcher, java.lang.Object, org.hamcrest.Description, java.lang.String)}
for {@code m},
enclosed in parentheses if necessary.
@param self
@param matcher
@param item
@param mismatch
@param message
@return
1260
public static boolean matches(PrecedencedSelfDescribing self, Matcher<?> matcher, Object item, Description mismatch, String message) {
        if (message == null) {
            return matches(self, matcher, item, mismatch);
        }
        boolean paren = useParen(self, matcher);
        if (paren) message = message.replace("$1", "($1)");
        return QuickDiagnose.matches(matcher, item, mismatch, message);
    }
1245579
private boolean findMatches() throws IOException {
    // check for something in queue of matches
    if (!queueMatches.isEmpty()) {
      return true;
    } else {
      ignoreItem.advanceToDoc(spans.docID());
      while (true) {
        // try to get something in queue of spans
        if (queueSpans.isEmpty() && !collectSpan()) {
          return false;
        }
        // try to get matches with first span in queue
        Match firstMatch = queueSpans.remove(0);
        // create a list of matches with same startPosition as firstMatch
        List<Match> matches = new ArrayList<>();
        matches.add(firstMatch);
        // matches.addAll(expandWithIgnoreItem(spans.docID(), firstMatch));
        // try to collect spans until lastStartPosition not equal to
        // startPosition of firstMatch
        while (!lastSpan && (lastStartPosition == firstMatch.startPosition())) {
          collectSpan();
        }
        while (!queueSpans.isEmpty() && (queueSpans.get(0)
            .startPosition() == firstMatch.startPosition())) {
          Match additionalMatch = queueSpans.remove(0);
          matches.add(additionalMatch);
          matches.addAll(expandWithIgnoreItem(spans.docID(), additionalMatch));
        }
        // construct all matches for this startPosition
        for (Match match : matches) {
          for (int n = (minimumRecurrence - 1); n <= (maximumRecurrence
              - 1); n++) {
            findMatches(match, n);
          }
        }
        // check for something in queue of matches
        if (!queueMatches.isEmpty()) {
          ignoreItem.removeBefore(spans.docID(),
              queueMatches.get(0).startPosition());
          return true;
        }
      }
    }
  }
181384
public boolean filterMatches(AbstractItem item)
  {
    if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
      SibTr.entry(tc, "filterMatches", item);

    boolean match = false;
    LocalQPConsumerKey matchingMember = null;

    // Hopefully we have a general consumer so we don't need to parse the message
    if(generalMemberCount > 0)
    {
      // We have a match but we don't care which one out of the general members
      // actually takes the message, so if one of the general members is the one
      // performing the scan they can take the message.
      matchingMember = null;
      match = true;
    }
    // Damn, all we've got are members with selectors, we'll have to parse the message
    else
    {
      // If there is just the single member see if they match the message
      if(singleMember != null)
      {
        if(singleMember.filterMatches(item))
        {
          match = true;
          matchingMember = singleMember;
        }
      }
      // Otherwise we give all the members a chance to match it
      else
      {
        LocalQPConsumerKey keyMember;
        int index;
        int size = specificKeyMembers.size();
        for(index = 0;
            (index < size) && !match;
            index++)
        {
          keyMember = specificKeyMembers.get(index);
          // Drop out if one of the members matches it
          if(keyMember.filterMatches(item))
          {
            match = true;
            matchingMember = keyMember;
          }
        }
      }
    }

//  we only want to remember this result if get got here as a result of a consumer
    //asking for a message.
    boolean onConsumerThread = consumerThreadActive &&
                               (Thread.currentThread().getId() == consumerThreadID);

    if(onConsumerThread)
    {
      currentMatch = match;
      currentMatchingMember = matchingMember;
    }

    if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
      SibTr.exit(tc, "filterMatches", new Object[] {Boolean.valueOf(match), matchingMember});

    return match;
  }
630575
public static final <T extends Tree> Matcher<T> inSynchronized() {
    return new Matcher<T>() {
      @Override
      public boolean matches(T tree, VisitorState state) {
        SynchronizedTree synchronizedTree =
            ASTHelpers.findEnclosingNode(state.getPath(), SynchronizedTree.class);
        if (synchronizedTree != null) {
          return true;
        }

        MethodTree methodTree = ASTHelpers.findEnclosingNode(state.getPath(), MethodTree.class);
        return methodTree != null
            && methodTree.getModifiers().getFlags().contains(Modifier.SYNCHRONIZED);
      }
    };
  }
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;
	}
821566
@Override
	public boolean validate(final Problems problems, final String compName, final String model) {
		final Matcher m = this.pattern.matcher(model);
		final boolean result = this.acceptPartialMatches ? m.lookingAt() : m.matches();
		if (!result) {
			String prb = this.message;
			prb = MessageFormat.format(prb, new Object[] { compName, model });
			problems.add(prb);
		}
		return result;
	}
521620
void expectStringOrSymbol(Node n, JSType type, String msg) {
    if (!type.matchesStringContext() && !type.matchesSymbolContext()) {
      mismatch(n, msg, type, STRING_SYMBOL);
    }
  }
600387
public static MultiMatcher<MethodTree, VariableTree> methodHasParameters(
      MatchType matchType, Matcher<VariableTree> parameterMatcher) {
    return new MethodHasParameters(matchType, parameterMatcher);
  }
244989
public boolean matches( Message message ) throws JMSException
    {
        Boolean result = selectorTree != null ? selectorTree.evaluateBoolean(message) : null;
        return result != null && result.booleanValue();
    }
1065915
def matches(self, msg_seq: int, msg: MessageInterface) -> bool:
        
        return all(crit.matches(msg_seq, msg) for crit in self.all_criteria)
1072476
public ResultMatcher matches(final Matcher<?> matcher) {
        return new AbstractResultMatcher(path, configuration) {
            public void doMatch(Object actual) {
                isPresent(actual);
                Node node = getNode(actual);
                assertThat("Node \"" + path + "\" does not match.", node.getValue(), (Matcher<? super Object>) matcher);
            }
        };

    }
1156323
public static <T extends ParameterDescription> ElementMatcher.Junction<T> hasType(ElementMatcher<? super TypeDescription> matcher) {
        return hasGenericType(erasure(matcher));
    }
1214992
public static boolean matches(final Pattern pattern, final String value, final boolean completeMatch) {
        val matcher = pattern.matcher(value);
        LOGGER.debug("Matching value [{}] against pattern [{}]", value, pattern.pattern());
        if (completeMatch) {
            return matcher.matches();
        }
        return matcher.find();
    }
1000880
static Matcher dedupOr(Matcher matcher) {
    if (matcher instanceof OrMatcher) {
      List<Matcher> ms = new ArrayList<>(
          new LinkedHashSet<>(matcher.<OrMatcher>as().matchers()));
      return OrMatcher.create(ms);
    }
    return matcher;
  }
541936
public boolean isFilterMatch(BaseMessageHeader messageHeader)
    {
        boolean bMatch = true;
        if (messageHeader != null)
        {
            if (this.getQueueName() != null)
                if (!this.getQueueName().equals(messageHeader.getQueueName()))
                    return false;   // No match
            if (this.getQueueType() != null)
                if (!this.getQueueType().equals(messageHeader.getQueueType()))
                    return false;   // No match
            if (this.getMessageSource() != null)
                if (this.getMessageSource() == messageHeader.getMessageSource())
                    return false;   // If the source codes are the same object, don't echo!
            Object[][] mxMessageHeader = messageHeader.getNameValueTree();
            Object[][] mxMessageFilter = this.getNameValueTree();
            bMatch = this.compareTrees(mxMessageHeader, mxMessageFilter, false);
            if (bMatch)
                if (messageHeader.getRegistryIDMatch() != null)
                    if (!messageHeader.getRegistryIDMatch().equals(this.getRegistryID()))
                        bMatch = false;
        }
        return bMatch;    // MATCH!!!
    }
862693
private boolean matchLemmaList(AnalyzedTokenReadings aToken,
      List<String> list) {
    boolean matches = false;
    for (AnalyzedToken analyzedToken : aToken) {
      if (list.contains(analyzedToken.getLemma())) {
          matches = true;
          break;
      }
    }
    return matches;
  }
682789
@Override
    public final boolean matches(Object item, Description mismatch) {
        if (matches(item)) {
            return true;
        } else {
            describeMismatch(item, mismatch);
            return false;
        }
    }