String name = oldName.trim();
if (!name.equals(oldName)) {
name = p.getAlternativesDefinition().createUniqueName(name);
try {
log.debug("Renaming alternative {} to {}", oldName, name);
p.renameAlternative(a, name);
a.setDescription(a.getDescription() + "\r\n(PLATO: Alternative name normalization: '" + oldName
+ "' to '" + name + "')");
fixed = true;
} catch (PlanningException e) {
log.error("Failed to rename alternative for plan " + pid, e);