public @Nullable DocumentChangeTransaction getTransaction(@NotNull Document document) {
    Pair<DocumentChangeTransaction, Integer> pair = myTransactionsMap.get(document);
    return Pair.getFirst(pair);
  }
public @Nullable DocumentChangeTransaction getTransaction(@NotNull Document document)