code: public static MutableFst copyFrom(Fst fst) {
      MutableFst copy = emptyWithCopyOfSymbols(fst);
      // build up states
      for (int i = 0; i < fst.getStateCount(); i++) {
        State source = fst.getState(i);
        MutableState target = new MutableState(source.getArcCount());
        target.setFinalWeight(source.getFinalWeight());
        copy.setState(i, target);
      }
      // build arcs now that we have target state refs
      for (int i = 0; i < fst.getStateCount(); i++) {
        State source = fst.getState(i);
        MutableState target = copy.getState(i);
        for (int j = 0; j < source.getArcCount(); j++) {
          Arc sarc = source.getArc(j);
          MutableState nextTargetState = copy.getState(sarc.getNextState().getId());
          MutableArc tarc = new MutableArc(sarc.getIlabel(), sarc.getOlabel(), sarc.getWeight(), nextTargetState);
          target.addArc(tarc);
        }
      }
      MutableState newStart = copy.getState(fst.getStartState().getId());
      copy.setStart(newStart);
      return copy;
    }
docs: Make a deep copy of the given FST. The symbol tables are "effectively deep copied" meaning that they will
  take advantage of any immutable tables (using the UnionSymbolTable) to avoid doing a large deep copy.
  @param fst
  @return