void (@NotNull PsiBlockStatement statement) { final PsiElement parent = statement.getParent(); final boolean isAlreadyCounted = parent instanceof PsiDoWhileStatement || parent instanceof PsiWhileStatement || parent instanceof PsiForStatement || parent instanceof PsiForeachStatement || parent instanceof PsiIfStatement || parent instanceof PsiSynchronizedStatement; if (!isAlreadyCounted) { enterScope(statement); } super.visitBlockStatement(statement); }