code: public static Map<String, String> mergeDefaults(
          CmsObject cms,
          CmsResource resource,
          Map<String, String> properties,
          Locale locale,
          ServletRequest request) {
  
          Map<String, CmsXmlContentProperty> propertyConfig = null;
          if (CmsResourceTypeXmlContent.isXmlContent(resource)) {
              I_CmsFormatterBean formatter = null;
              // check formatter configuration setting
              for (Entry<String, String> property : properties.entrySet()) {
                  if (property.getKey().startsWith(CmsFormatterConfig.FORMATTER_SETTINGS_KEY)
                      && CmsUUID.isValidUUID(property.getValue())) {
                      formatter = OpenCms.getADEManager().getCachedFormatters(
                          cms.getRequestContext().getCurrentProject().isOnlineProject()).getFormatters().get(
                              new CmsUUID(property.getValue()));
                      break;
                  }
  
              }
  
              try {
  
                  if (formatter != null) {
                      propertyConfig = OpenCms.getADEManager().getFormatterSettings(
                          cms,
                          formatter,
                          resource,
                          locale,
                          request);
                  } else {
                      // fall back to schema configuration
                      propertyConfig = CmsXmlContentDefinition.getContentHandlerForResource(cms, resource).getSettings(
                          cms,
                          resource);
                  }
              } catch (CmsException e) {
                  // should never happen
                  LOG.error(e.getLocalizedMessage(), e);
              }
          }
          return mergeDefaults(cms, propertyConfig, properties);
      }
docs: Extends the given properties with the default values
  from the resource's property configuration.<p>
  
  @param cms the current CMS context
  @param resource the resource to get the property configuration from
  @param properties the properties to extend
  @param locale the content locale
  @param request the current request, if available
  
  @return a merged map of properties