@Override
      public void visitWhileStatement(@NotNull PsiWhileStatement statement) {
        final PsiStatement body = statement.getBody();
        final PsiExpression condition = statement.getCondition();
        if (condition == null) return;

        final PsiElement highlightElement = statement.getFirstChild();
        if (highlightElement == null || highlightElement.getNode().getElementType() != WHILE_KEYWORD) return;

        final DiffRange duplicateElements;
        if (body != null) {
          final Block bodyBlock = Block.init(body);
          duplicateElements = bodyBlock.getDiffRange(Block.find(statement, bodyBlock.statements.size()));
        }
        else {
          duplicateElements = null;
        }
        if (duplicateElements != null) {
          holder.registerProblem(highlightElement,
                                 InspectionGadgetsBundle.message("inspection.while.can.be.replaced.with.do.while.message"),
                                 duplicateElements.type(), new ReplaceWhileWithDoWhileFix());
        }
        else if (isOnTheFly){
          holder.registerProblem(highlightElement,
                                 InspectionGadgetsBundle.message("inspection.while.can.be.replaced.with.do.while.message"),
                                 ProblemHighlightType.INFORMATION, new ReplaceWhileWithDoWhileFix());
        }
      }
@Override
      public void visitWhileStatement(@NotNull PsiWhileStatement statement)