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