code: public static void putStateIntoConfiguration(State state, Configuration configuration) {
      for (String key : state.getPropertyNames()) {
        configuration.set(key, state.getProp(key));
      }
    }
docs: Put all configuration properties in a given {@link State} object into a given
  {@link Configuration} object.
  
  @param state the given {@link State} object
  @param configuration the given {@link Configuration} object