private static @Nullable PsiVariable getIndexVariable(@NotNull PsiForStatement forStatement) {
      final PsiStatement initialization = forStatement.getInitialization();
      if (!(initialization instanceof PsiDeclarationStatement)) {
        return null;
      }
      final PsiElement declaration = ((PsiDeclarationStatement)initialization).getDeclaredElements()[0];
      if (!(declaration instanceof PsiVariable)) {
        return null;
      }
      return (PsiVariable)declaration;
    }
private static @Nullable PsiVariable getIndexVariable(@NotNull PsiForStatement forStatement)