code: public static HierarchicalConfiguration getHierarchicalConfiguration(final Configuration configuration) {
          if (configuration instanceof CompositeConfiguration) {
              final CompositeConfiguration compositeConfig = (CompositeConfiguration) configuration;
              for (int i = 0; i < compositeConfig.getNumberOfConfigurations(); i++) {
                  if (compositeConfig.getConfiguration(i) instanceof HierarchicalConfiguration) {
                      return (HierarchicalConfiguration) compositeConfig.getConfiguration(i);
                  }
              }
          }
          // maybe I need to send a runtime exception ??
          // throw new
          // ConfigurationRuntimeException("no hierarchical configuration was defined");
          return null;
      }
docs: returns the hierarchical part of a configuration
  
  @param configuration
  the given configuration
  @return the hierarchical configuration or null if not found in the given
  configuration object.