void processLoop(PsiLoopStatement statement) {
      final PsiStatement body = statement.getBody();
      if (body == null) return;
      StreamSource source = StreamSource.tryCreate(statement);
      if (source == null) return;
      if (!ExceptionUtil.getThrownCheckedExceptions(body).isEmpty()) return;
      TerminalBlock tb = TerminalBlock.from(source, body);

      BaseStreamApiMigration migration = findMigration(statement, body, tb, SUGGEST_FOREACH, REPLACE_TRIVIAL_FOREACH);
      if (migration == null || (!myIsOnTheFly && !migration.isShouldWarn())) return;
      MigrateToStreamFix[] fixes = {new MigrateToStreamFix(migration)};
      if (migration instanceof ForEachMigration && !(tb.getLastOperation() instanceof CollectionStream)) { //for .stream()
        fixes = ArrayUtil.append(fixes, new MigrateToStreamFix(new ForEachMigration(migration.isShouldWarn(), "forEachOrdered")));
      }
      ProblemHighlightType highlightType =
        migration.isShouldWarn() ? ProblemHighlightType.GENERIC_ERROR_OR_WARNING : ProblemHighlightType.INFORMATION;
      String message = JavaBundle.message("inspection.stream.api.migration.can.be.replaced.with.call", migration.getReplacement());
      TextRange range = getRange(migration.isShouldWarn(), statement, myIsOnTheFly);
      myHolder.registerProblem(statement, message, highlightType, range.shiftRight(-statement.getTextOffset()), fixes);
    }
void processLoop(PsiLoopStatement statement)