code: private CmsContainerElementBean adjustSettings(
          CmsContainerElementBean element,
          String originalContainer,
          String adjustedContainer,
          boolean setNewInstanceId) {
  
          Map<String, String> settings = new HashMap<String, String>(element.getIndividualSettings());
          if (setNewInstanceId) {
              settings.put(CmsContainerElement.ELEMENT_INSTANCE_ID, new CmsUUID().toString());
          }
          String formatterId = settings.remove(CmsFormatterConfig.getSettingsKeyForContainer(originalContainer));
          settings.put(CmsFormatterConfig.getSettingsKeyForContainer(adjustedContainer), formatterId);
          return CmsContainerElementBean.cloneWithSettings(element, settings);
      }
docs: Adjusts formatter settings and initializes a new instance id for the given container element.<p>
  
  @param element the container element
  @param originalContainer the original parent container name
  @param adjustedContainer the target container name
  @param setNewInstanceId <code>true</code> to set a new instance id
  
  @return the new element instance