boolean (PsiMethod method) { if (method.hasModifierProperty(PsiModifier.STATIC)) { return false; } final PsiCodeBlock body = method.getBody(); if (body == null) { return false; } final PsiClass aClass = method.getContainingClass(); final MethodContainsCallOnOtherInstanceVisitor visitor = new MethodContainsCallOnOtherInstanceVisitor(aClass); body.accept(visitor); return visitor.containsCallOnOtherInstance(); }