public @NotNull FrozenDocument freeze() {
    FrozenDocument frozen = myFrozen;
    if (frozen == null) {
      synchronized (myLineSetLock) {
        frozen = myFrozen;
        if (frozen == null) {
          myFrozen = frozen = new FrozenDocument(myText, myLineSet, myModificationStamp, dereference(myTextString));
        }
      }
    }
    return frozen;
  }
public @NotNull FrozenDocument freeze()