void (@NotNull List<LineHits> report) { boolean unique = checkForLineUniqueness(report); if (unique) { return; } List<LineHits> out = new ArrayList<>(report.size()); LineHits prev = null; for (LineHits cur : report) { if (prev != null && prev.getLineNumber() == cur.getLineNumber()) { prev.addHits(cur.getHits()); } else { out.add(cur); prev = cur; } } report.clear(); report.addAll(out); }