Source:
<code>public AbstractEntity configure(Map flags) { if (!inConstruction && getManagementSupport().isDeployed()) { LOG.warn("bulk/flag configuration being made to after deployment: may not be supported in future versions ({})", new Object[] { this, flags }); } Entity suppliedParent = (Entity) flags.remove("parent"); if (suppliedParent != null) { suppliedParent.addChild(getProxyIfAvailable()); } Map<ConfigKey,?> suppliedOwnConfig = (Map<ConfigKey, ?>) flags.remove("config"); if (suppliedOwnConfig != null) { for (Map.Entry<ConfigKey, ?> entry : suppliedOwnConfig.entrySet()) { setConfigEvenIfOwned(entry.getKey(), entry.getValue()); } } if (flags.get("displayName") != null) { displayName.set((String) flags.remove("displayName")); displayNameAutoGenerated = false; } else if (flags.get("name") != null) { displayName.set((String) flags.remove("name")); displayNameAutoGenerated = false; } else if (isLegacyConstruction()) { <START> displayName.set(getClass().getSimpleName()+":"+id.substring(0, Math.min(id.length(), 4))); <END> displayNameAutoGenerated = true; } if (flags.get("iconUrl") != null) { iconUrl.set((String) flags.remove("iconUrl")); } flags = FlagUtils.setFieldsFromFlags(flags, this); flags = FlagUtils.setAllConfigKeys(flags, this); for (Iterator<Map.Entry> fi = flags.entrySet().iterator(); fi.hasNext();) { Map.Entry entry = fi.next(); Object k = entry.getKey(); if (k instanceof HasConfigKey) k = ((HasConfigKey)k).getConfigKey(); if (k instanceof ConfigKey) { setConfigEvenIfOwned((ConfigKey)k, entry.getValue()); fi.remove(); } } if (!flags.isEmpty()) { LOG.warn("Unsupported flags when configuring {}; ignoring: {}", this, flags); } return this; }</code><technical_language>Strings.maxlen(id, 4)</technical_language>

Target:
public AbstractEntity configure(Map flags) { if (!inConstruction && getManagementSupport().isDeployed()) { LOG.warn("bulk/flag configuration being made to after deployment: may not be supported in future versions ({})", new Object[] { this, flags }); } Entity suppliedParent = (Entity) flags.remove("parent"); if (suppliedParent != null) { suppliedParent.addChild(getProxyIfAvailable()); } Map<ConfigKey,?> suppliedOwnConfig = (Map<ConfigKey, ?>) flags.remove("config"); if (suppliedOwnConfig != null) { for (Map.Entry<ConfigKey, ?> entry : suppliedOwnConfig.entrySet()) { setConfigEvenIfOwned(entry.getKey(), entry.getValue()); } } if (flags.get("displayName") != null) { displayName.set((String) flags.remove("displayName")); displayNameAutoGenerated = false; } else if (flags.get("name") != null) { displayName.set((String) flags.remove("name")); displayNameAutoGenerated = false; } else if (isLegacyConstruction()) { displayName.set(getClass().getSimpleName()+":"+Strings.maxlen(id, 4)); displayNameAutoGenerated = true; } if (flags.get("iconUrl") != null) { iconUrl.set((String) flags.remove("iconUrl")); } flags = FlagUtils.setFieldsFromFlags(flags, this); flags = FlagUtils.setAllConfigKeys(flags, this); for (Iterator<Map.Entry> fi = flags.entrySet().iterator(); fi.hasNext();) { Map.Entry entry = fi.next(); Object k = entry.getKey(); if (k instanceof HasConfigKey) k = ((HasConfigKey)k).getConfigKey(); if (k instanceof ConfigKey) { setConfigEvenIfOwned((ConfigKey)k, entry.getValue()); fi.remove(); } } if (!flags.isEmpty()) { LOG.warn("Unsupported flags when configuring {}; ignoring: {}", this, flags); } return this; }