}
public static Pair<DocOp, DocOp> composeWithBothStartingStates(DocOpFactory factory, DocOp a,
DocOp b) throws ComposeException {
ComposeException e1 = null;
DocOp composedDocOp1 = null;
try {
composedDocOp1 = Composer.composeWithStartState(factory, a, b, false);
} catch (ComposeException e) {
e1 = e;
}
ComposeException e2 = null;
DocOp composedDocOp2 = null;
try {
composedDocOp2 = Composer.composeWithStartState(factory, a, b, true);
} catch (ComposeException e) {
e2 = e;