Matches patterns like i = i + 1 and i = i - 1 in which i is volatile, and the pattern is not
enclosed by a synchronized block.
544396
private static Matcher<AssignmentTree> assignmentIncrementDecrementMatcher(
      ExpressionTree variable) {
    return allOf(
        variableFromAssignmentTree(Matchers.<ExpressionTree>hasModifier(Modifier.VOLATILE)),
        not(inSynchronized()),
        assignment(
            Matchers.<ExpressionTree>anything(),
            toType(
                BinaryTree.class,
                Matchers.<BinaryTree>allOf(
                    Matchers.<BinaryTree>anyOf(kindIs(Kind.PLUS), kindIs(Kind.MINUS)),
                    binaryTree(sameVariable(variable), Matchers.<ExpressionTree>anything())))));
  }
412705
private static boolean resemblesPropertyPattern(String pattern, int pos) {
        // Patterns are at least 5 characters long
        if ((pos+5) > pattern.length()) {
            return false;
        }

        // Look for an opening [:, [:^, \p, or \P
        return pattern.regionMatches(pos, "[:", 0, 2) ||
                pattern.regionMatches(true, pos, "\\p", 0, 2) ||
                pattern.regionMatches(pos, "\\N", 0, 2);
    }
747613
def ILIKE(pattern):
    """"""
    return P(lambda x: fnmatch.fnmatch(x.lower(), pattern.lower()))
72855
function checkShash(i) {
  const start = i;
  let l;

  if (i >= tokensLength) return 0;

  if (tokens[i].type === TokenType.NumberSign) i++;
  else return 0;

  if (l = checkIdent(i)) i += l;
  else return 0;

  return i - start;
}
278376
boolean matchNext() {
        if (numAtoms == 0)
            return false;
        if (sptr > 1)
            backtrack();
        main:
        while (sptr != 0) {
            final int bidx = currBondIdx();

            if (bidx == numBonds) {

                // done
                if (numMapped == numAtoms)
                    return true;

                // handle disconnected atoms
                for (IAtom qatom : query.atoms()) {
                    if (amap[qatom.getIndex()] == UNMAPPED) {
                        Iterator<IAtom> iter = atoms();
                        while (iter.hasNext()) {
                            IAtom atom = iter.next();
                            if (feasible(bidx, (IQueryAtom) qatom, atom))
                                continue main;
                        }
                        break;
                    }
                }
                backtrack();
                continue;
            }

            IQueryBond qbond = qbonds[bidx];
            IQueryAtom qbeg  = (IQueryAtom) qbond.getBegin();
            IQueryAtom qend  = (IQueryAtom) qbond.getEnd();

            int begIdx = amap[qbeg.getIndex()];
            int endIdx = amap[qend.getIndex()];

            // both atoms matched, there must be a bond between them
            if (begIdx != UNMAPPED && endIdx != UNMAPPED) {
                IBond bond = mol.getAtom(begIdx).getBond(mol.getAtom(endIdx));
                if (feasible(qbond, bond))
                    continue;
            }
            // 'beg' is mapped, find a feasible 'end' from it's neighbor list
            else if (begIdx != UNMAPPED) {
                IAtom           beg   = mol.getAtom(begIdx);
                Iterator<IBond> biter = bonds(beg);
                while (biter.hasNext()) {
                    IBond bond = biter.next();
                    IAtom end  = bond.getOther(beg);
                    if (qbond.matches(bond) && feasible(bidx + 1, qend, end))
                        continue main;
                }
            }
            // 'end' is mapped, find a feasible 'beg' from it's neighbor list
            else if (endIdx != UNMAPPED) {
                IAtom           end   = mol.getAtom(endIdx);
                Iterator<IBond> biter = bonds(end);
                while (biter.hasNext()) {
                    IBond bond = biter.next();
                    IAtom beg  = bond.getOther(end);
                    if (qbond.matches(bond) && feasible(bidx + 1, qbeg, beg))
                        continue main;
                }
            }
            // 'beg' nor 'end' matched, find a feasible mapping from
            // any atom in the molecule
            else {
                Iterator<IAtom> aiter = atoms();
                while (aiter.hasNext()) {
                    if (feasible(bidx, qbeg, aiter.next()))
                        continue main;
                }
            }
            backtrack();
        }
        return false;
    }
78336
@Override
	public boolean satisfies(Match match, int... ind)
	{
		int x = -1;
		for (MappedConst mc : con)
		{
			if (mc.satisfies(match, ind)) x *= -1;
		}
		return x == 1;
	}
356966
private boolean isInteger(final int i, final int q_offset) {
    final short flags = Internal.getFlagsFromQualifier(batched_qualifier, q_offset);
    return (flags & Const.FLAG_FLOAT) == 0x0;
  }
765582
private final boolean cvc(int i) {
        if (i < 2 || !isConsonant(i) || isConsonant(i - 1) || !isConsonant(i - 2)) {
            return false;
        }
        {
            int ch = b[i];
            if (ch == 'w' || ch == 'x' || ch == 'y') {
                return false;
            }
        }
        return true;
    }
767865
public static boolean matches(String pattern, String value) {
        Pattern p = Pattern.compile(pattern);
        Matcher m = p.matcher(value);
        return m.matches();
    }
460584
private boolean oneMatchletMagicEquals(int offset, byte[] data) {
        int rangeStart = content.getInt(offset);      // first byte of data for check to start at
        int rangeLength = content.getInt(offset + 4); // last byte of data for check to start at
        int dataLength = content.getInt(offset + 12); // number of bytes in match data/mask
        int dataOffset = content.getInt(offset + 16); // contentBytes offset to the match data
        int maskOffset = content.getInt(offset + 20); // contentBytes offset to the mask

        boolean found = false;

        for (int i = 0; !found && (i <= rangeLength) && (i + rangeStart + dataLength <= data.length); i++) {
            if (maskOffset != 0) {
                found = subArraysEqualWithMask(
                        contentBytes, dataOffset,
                        data, rangeStart + i,
                        contentBytes, maskOffset,
                        dataLength
                );
            } else {
                found = subArraysEqual(
                        contentBytes, dataOffset,
                        data, rangeStart + i,
                        dataLength
                );
            }
        }

        return found;
    }
703853
@Benchmark
  public void fizzBuzzPatternMatching() {
    IntStream.range(0, 101).forEach(
        n -> System.out.println(
            match(Tuple2.of(n % 3, n % 5))
                .when(tuple2(eq(0), eq(0))).get(() -> "FizzBuzz")
                .when(tuple2(eq(0), any())).get(y -> "Fizz")
                .when(tuple2(any(), eq(0))).get(x -> "Buzz")
                .orElse(String.valueOf(n))
                .getMatch()
        )
    );
  }
187008
def match_alphabet(self, pattern):
    
    s = {}
    for char in pattern:
      s[char] = 0
    for i in xrange(len(pattern)):
      s[pattern[i]] |= 1 << (len(pattern) - i - 1)
    return s
785151
function checkMixin2(i) {
  const start = i;
  let l;

  if (i >= tokensLength) return 0;

  if (tokens[i].type === TokenType.EqualsSign) i++;
  else return 0;

  if (l = checkSC(i)) i += l;

  if (l = checkIdentOrInterpolation(i)) i += l;
  else return 0;

  if (l = checkSC(i)) i += l;

  if (l = checkBlock(i)) i += l;
  else {
    if (l = checkArguments(i)) i += l;

    if (l = checkSC(i)) i += l;

    if (l = checkBlock(i)) i += l;
    else return 0;
  }

  return i - start;
}
1223306
public int matches(Replaceable text,
                       int[] offset,
                       int limit,
                       boolean incremental) {
        int start = offset[0];
        int count = 0;
        while (count < maxCount) {
            int pos = offset[0];
            int m = matcher.matches(text, offset, limit, incremental);
            if (m == U_MATCH) {
                ++count;
                if (pos == offset[0]) {
                    // If offset has not moved we have a zero-width match.
                    // Don't keep matching it infinitely.
                    break;
                }
            } else if (incremental && m == U_PARTIAL_MATCH) {
                return U_PARTIAL_MATCH;
            } else {
                break;
            }
        }
        if (incremental && offset[0] == limit) {
            return U_PARTIAL_MATCH;
        }
        if (count >= minCount) {
            return U_MATCH;
        }
        offset[0] = start;
        return U_MISMATCH;
    }
1195212
static int subSequenceEquals(
        CharSequence test,
        int offset,
        CharSequence expected,
        boolean caseInsensitive,
        boolean rtl
    ) {

        int j = 0;
        int max = test.length();
        int len = expected.length();

        for (int i = 0; i < len; i++) {
            char c = '\u0000';
            char exp = expected.charAt(i);

            if (isBidi(exp)) {
                continue; // always ignore bidis in pattern when parsing
            }

            if (rtl) {
                while ((j + offset < max) && isBidi(c = test.charAt(j + offset))) {
                    j++;
                }
            } else if (j + offset < max) {
                c = test.charAt(j + offset);
            }

            if (j + offset >= max) {
                return -1;
            } else {
                j++;
            }

            if (caseInsensitive) {
                if (!charEqualsIgnoreCase(c, exp)) {
                    return -1;
                }
            } else if (c != exp) {
                return -1;
            }
        }

        if (rtl) {
            while ((j + offset < max) && isBidi(test.charAt(j + offset))) {
                j++;
            }
        }

        return j;

    }
245288
private void checkPatternMatching(Map<String, PatternCacheControl> patterns, String specificPattern, String generalPattern) {
        if (PatternMatcherUtils.caseInsensitiveMatch(specificPattern, generalPattern)) {
            PatternCacheControl specificPatternDirective = patterns.get(specificPattern);
            PatternCacheControl generalPatternDirective = patterns.get(generalPattern);
            generalPatternDirective.incrementMatchingPatternCount();
            ConflictResolverUtils.resolveConflicts(specificPatternDirective, generalPatternDirective);
        }
    }
117903
function checkProperty1(i) {
  const start = i;
  let l;

  if (i >= tokensLength) return 0;

  if (l = checkIdent(i)) i += l;
  else return 0;

  return i - start;
}