void (@NotNull Collection<? extends GitDiffChange> changes, @NotNull Set<FilePath> added, @NotNull Set<FilePath> removed, @NotNull PairConsumer<? super FilePath, ? super FilePath> function) { for (GitDiffChange change : changes) { FilePath before = change.getBeforePath(); FilePath after = change.getAfterPath(); if (removed.contains(before)) before = null; if (added.contains(after)) after = null; function.consume(before, after); } }