code: static void prepareDisplayShortcuts(IAtomContainer container, Map<IAtom, String> symbolRemap) {
  
          List<Sgroup> sgroups = container.getProperty(CDKConstants.CTAB_SGROUPS);
          if (sgroups == null || sgroups.isEmpty())
              return;
  
          // select abbreviations that should be contracted
          for (Sgroup sgroup : sgroups) {
              if (sgroup.getType() == SgroupType.CtabAbbreviation) {
                  Boolean expansion = sgroup.getValue(SgroupKey.CtabExpansion);
                  // abbreviation is displayed as expanded
                  if (expansion != null && expansion)
                      continue;
                  // no or empty label, skip it
                  if (sgroup.getSubscript() == null || sgroup.getSubscript().isEmpty())
                      continue;
  
                  // only contract if the atoms are either partially or fully highlighted
                  if (checkAbbreviationHighlight(container, sgroup))
                      contractAbbreviation(container, symbolRemap, sgroup);
              } else if (sgroup.getType() == SgroupType.CtabMultipleGroup) {
                  hideMultipleParts(container, sgroup);
              } else if (sgroup.getType() == SgroupType.ExtMulticenter) {
                  Set<IAtom> atoms = sgroup.getAtoms();
                  // should only be one bond
                  for (IBond bond : sgroup.getBonds()) {
                      IAtom beg = bond.getBegin();
                      IAtom end = bond.getEnd();
                      if (atoms.contains(beg)) {
                          StandardGenerator.hideFully(beg);
                      } else {
                          StandardGenerator.hideFully(end);
                      }
                  }
              }
          }
      }
docs: If the molecule has display shortcuts (abbreviations or multiple group sgroups) certain parts
  of the structure are hidden from display. This method marks the parts to hide and in the case
  of abbreviations, remaps atom symbols. Appart from additional property flags, the molecule
  is unchanged by this method.
  
  @param container   molecule input
  @param symbolRemap a map that will hold symbol remapping