boolean (PsiMethodCallExpression expression) { if (!regexMethodNames.contains(getMethodName(expression))) { return false; } final PsiMethod method = expression.resolveMethod(); if (method == null) { return false; } final PsiClass containingClass = method.getContainingClass(); if (containingClass == null) { return false; } final String className = containingClass.getQualifiedName(); return CommonClassNames.JAVA_LANG_STRING.equals(className) || "java.util.regex.Pattern".equals(className); }