private List<ProblemFileSummaryWrapper> getFileSummaries(Long executionId, ProblemSummary summary) { return StreamSupport.stream(summary.getDescriptions().spliterator(), false) .flatMap(description -> StreamSupport.stream(summary.getFilesForDescription(description).spliterator(), false)) .map(fileSummary -> new ProblemFileSummaryWrapper( this.convertToMap(executionId, fileSummary.getFile().getElement(), 0, false), fileSummary.getOccurrences())) .collect(Collectors.toList()); }