code: public Xid createBranch(Xid globalId, int branch) {
          byte[] branchId = baseId.clone();
          branchId[0] = (byte) branch;
          branchId[1] = (byte) (branch >>> 8);
          branchId[2] = (byte) (branch >>> 16);
          branchId[3] = (byte) (branch >>> 24);
          insertLong(start, branchId, 4);
          return new XidImpl(globalId, branchId);
      }
docs: Create a branch Xid.
  @param globalId the global Xid
  @param branch the branch number
  @return the new Xid.