@NotNull
      private static BitSet getDeclarations(PsiStatement[] statements) {
        BitSet declarations = new BitSet();
        for (int i = 0; i < statements.length; i++) {
          if (statements[i] instanceof PsiDeclarationStatement decl &&
              ArrayUtil.getFirstElement(decl.getDeclaredElements()) instanceof PsiLocalVariable) {
            declarations.set(i);
          }
        }
        return declarations;
      }
@NotNull
      private static BitSet getDeclarations(PsiStatement[] statements)