String (ProjectScanningHistory scanningHistory) { var statistics = scanningHistory.getScanningStatistics(); int numberOfScannedFiles = statistics.stream().mapToInt(JsonScanningStatistics::getNumberOfScannedFiles).sum(); int numberOfFilesForIndexing = statistics.stream().mapToInt(JsonScanningStatistics::getNumberOfFilesForIndexing).sum(); return "Scanning completed for " + scanningHistory.getProject().getName() + '.' + " Number of scanned files: " + numberOfScannedFiles + "; number of files for indexing: " + numberOfFilesForIndexing; }