Return True on match.

        Only match log lines containing 'is now in state' (reflects other
        node's state changes) or of type "[rsMgr] replSet PRIMARY" (reflects
        own state changes).
771115
def accept_line(self, logevent):
        
        if ("is now in state" in logevent.line_str and
                logevent.split_tokens[-1] in self.states):
            return True

        if ("replSet" in logevent.line_str and
                logevent.thread == "rsMgr" and
                logevent.split_tokens[-1] in self.states):
            return True

        return False
140258
def matches(self, a, b, **config):
        
        submitter_a = a['msg']['override']['submitter']['name']
        submitter_b = b['msg']['override']['submitter']['name']
        if submitter_a != submitter_b:
            return False
        return True
66296
private static boolean match(String regExp, String userInput) {
        Pattern pattern = Pattern.compile(regExp);
        Matcher matcher = pattern.matcher(userInput);
        if (matcher.find())
            return true;
        else
            return false;
    }
234323
def confirm_top(match, data, nodegroups=None):
    '''
    
    '''
    matcher = 'compound'
    if not data:
        log.error('Received bad data when setting the match from the top '
                  'file')
        return False
    for item in data:
        if isinstance(item, dict):
            if 'match' in item:
                matcher = item['match']

    matchers = salt.loader.matchers(__opts__)
    funcname = matcher + '_match.match'
    if matcher == 'nodegroup':
        return matchers[funcname](match, nodegroups)
    else:
        m = matchers[funcname]
        return m(match)
380316
function isMatchPresent(regex, text, test = false) {
  return test ? regex.test(text) : text.match(regex)
}
625501
private boolean matchPreservesCase(List<Match> suggestionMatches, String msg) {
    if (suggestionMatches != null && !suggestionMatches.isEmpty()) {
      //PatternRule rule = (PatternRule) this.rule;
      int sugStart = msg.indexOf(SUGGESTION_START_TAG) + SUGGESTION_START_TAG.length();
      for (Match sMatch : suggestionMatches) {
        if (!sMatch.isInMessageOnly() && sMatch.convertsCase()
            && msg.charAt(sugStart) == '\\') {
          return false;
        }
      }
    }
    return true;
  }
569606
public boolean matches(SAMRecord record) {
    int myEnd = end == 0 ? Integer.MAX_VALUE : end;
    switch (readPositionConstraint) {
      case OVERLAPPING:
        return CoordMath.overlaps(start, myEnd, 
            record.getAlignmentStart(), record.getAlignmentEnd());
      case CONTAINED:
        return CoordMath.encloses(start, myEnd,
            record.getAlignmentStart(), record.getAlignmentEnd());
      case START_AT:
        return start == record.getAlignmentStart();
    }
    return false;
  }
251671
def has_host_match(log_data, hosts):
    
    hostname = getattr(log_data, 'host', None)
    if hostname and hostname not in host_cache:
        for host_pattern in hosts:
            if host_pattern.search(hostname) is not None:
                host_cache.add(hostname)
                return True
        else:
            return False
    return True
342204
def matches(self, other):
        
        return self.interaction == other.interaction and \
            self.direction != other.direction and \
            self.call_duration == other.call_duration and \
            abs((self.datetime - other.datetime).total_seconds()) < 30
656905
private boolean doesStatusMatch(String status) {
		return (status.equals(transferListener.getStatus(xferid)) ? true : false);
	}
1238486
public boolean matches(HttpServletRequest request) {
        if (pattern.equals(MATCH_ALL)) {
            if (logger.isDebugEnabled()) {
                logger.debug("Request '" + getRequestPath(request) + "' matched by universal pattern '/**'");
            }

            return true;
        }

        String url = getRequestPath(request);

        if (logger.isDebugEnabled()) {
            logger.debug("Checking match of request : '" + url + "'; against '" + pattern + "'");
        }

        return matcher.matches(url);
    }
58006
def match?(arr, parser=nil)
      arr = arr.to_a
      return false if arr.length != self.length
      each_with_index do |node, i|
        node.match?(arr[i], parser) or return false
      end
      return true
    end
390006
def data_matching(filename_re)
      raw_data = raw_data_relative
      update_script_lines__

      match = raw_data.keys.sort.grep(filename_re).first
      return nil unless match

      refine_coverage_info(@script_lines__[match], raw_data[match])
    end
1217914
def is_match(self, match):
        
        result = False
        if self == match:
            result = True
        elif isinstance(match, str) and fnmatchcase(self.name, match):
            result = True  # Found by instance or name
        return result
114118
def is_state(self, entity_id, state):
        """"""
        return remote.is_state(self.api, entity_id, state)
1086481
def is_on_tag(self) -> bool:
        
        if self.get_current_tag():
            LOGGER.debug('latest commit is tagged')
            return True

        LOGGER.debug('latest commit is NOT tagged')
        return False
1059118
@Override
  public boolean isAcceptableChange(
      Changes changes, Tree node, MethodSymbol symbol, VisitorState state) {
    return findReverseWordsMatchInParentNodes(state) == null;
  }