List<Collection<Change>> (@NotNull Collection<Change> mergedChanges) { if (myChangesOutput.size() == 1) { return Collections.singletonList(mergedChanges); } else { List<Collection<Change>> changes = new ArrayList<>(myChangesOutput.size()); for (int i = 0; i < myChangesOutput.size(); i++) { ProgressManager.checkCanceled(); changes.add(myParser.apply(myChangesOutput.get(i), i)); } return changes; } }