void (@NotNull AnalysisScope scope) { super.notifyInspectionsFinished(scope); try { File tempDirectory = FileUtil.createTempDirectory("inspection", "result"); final InspectionResultsView view = getView(); if (view != null) { ExportToXMLActionKt.dumpToXml(view.getCurrentProfile(), view.getTree(), view.getProject(), view.getGlobalInspectionContext(), tempDirectory.toPath()); File[] files = tempDirectory.listFiles(); if (files != null) { for (File file : files) { if (file.isHidden()) { continue; } Path path = file.toPath(); try (Stream<String> lines = Files.lines(path).filter(line -> line.contains("<problem>"))) { this.numberOfProblems = lines.count(); } } } else { LOGGER.error("tempDirectory.listFiles() is null"); } } } catch (IOException ex) { LOGGER.error(ex); } context.message(PerformanceTestingBundle.message("command.inspection.finish") + " " + PerformanceTestingBundle.message("command.inspection.finish.result", this.numberOfProblems), getLine()); actionCallback.setDone(); }