@Override
      public void visitMethodCallExpression(
        @NotNull PsiMethodCallExpression expression) {
        if (enumerationMethodCalled) {
          return;
        }
        super.visitMethodCallExpression(expression);
        final PsiReferenceExpression methodExpression =
          expression.getMethodExpression();
        final @NonNls String methodName =
          methodExpression.getReferenceName();
        if (!"hasMoreElements".equals(methodName) &&
            !"nextElement".equals(methodName)) {
          return;
        }
        final PsiExpression qualifierExpression =
          methodExpression.getQualifierExpression();
        if (!(qualifierExpression instanceof PsiReferenceExpression referenceExpression)) {
          return;
        }
        final PsiElement element = referenceExpression.resolve();
        if (!(element instanceof PsiVariable var)) {
          return;
        }
        enumerationMethodCalled = this.variable.equals(var);
      }
@Override
      public void visitMethodCallExpression(
        @NotNull PsiMethodCallExpression expression)