boolean ( @NotNull PsiMethodCallExpression methodCallExpression) { final PsiReferenceExpression methodExpression = methodCallExpression.getMethodExpression(); final String methodName = methodExpression.getReferenceName(); @NonNls final String setPriority = "setPriority"; if (!setPriority.equals(methodName)) { return false; } final PsiMethod method = methodCallExpression.resolveMethod(); if (method == null) { return false; } final PsiClass aClass = method.getContainingClass(); if (aClass == null) { return false; } final String className = aClass.getQualifiedName(); return "java.lang.Thread".equals(className); }