private static void removeChanges(@NotNull ShelvedChangeList list, @NotNull List<ShelvedChange> shelvedChanges) {
    for (Iterator<ShelvedChange> iterator = Objects.requireNonNull(list.getChanges()).iterator(); iterator.hasNext(); ) {
      final ShelvedChange change = iterator.next();

      boolean toRemove = ContainerUtil.exists(shelvedChanges, newChange ->
        Objects.equals(change.getBeforePath(), newChange.getBeforePath()) &&
        Objects.equals(change.getAfterPath(), newChange.getAfterPath())
      );
      if (toRemove) {
        iterator.remove();
      }
    }
  }
private static void removeChanges(@NotNull ShelvedChangeList list, @NotNull List<ShelvedChange> shelvedChanges)