code: Configuration copy(Configuration configuration) {
      Configuration copy = new Configuration();
      copy.restoreState(configuration);
      return copy;
    }
docs: Returns a copy of the given configuration.
  @param configuration the object to copy.
  @since 2.6