code: public static <T> T copy(T orig) {
          if (orig == null)
              return null;
          try {
              ByteArrayOutputStream bos = new ByteArrayOutputStream();
              ObjectOutputStream oos = new ObjectOutputStream(bos);
              oos.writeObject(orig);
              oos.flush();
              ByteArrayInputStream bin = new ByteArrayInputStream(bos.toByteArray());
              ObjectInputStream ois = new ObjectInputStream(bin);
              return (T) ois.readObject();
          } catch (Exception e) {
              throw S1SystemError.wrap(e);
          }
      }
docs: Copy object deeply
  
  @param orig
  @return