@NotNull
  public IntSet collapseAll() {
    IntSet collapsedMerges = new IntOpenHashSet();
    for (int i = myLinearBekGraph.getGraph().nodesCount() - 1; i >= 0; i--) {
      MergeFragment fragment = getFragment(i);
      if (fragment != null) {
        fragment.collapse(myLinearBekGraph);
        collapsedMerges.add(fragment.getParent());
      }
    }
    return collapsedMerges;
  }
@NotNull
  public IntSet collapseAll()