if (initName != getRecipeName()) {
for (int i = 0; i < getChildCount(); i++) { Property propName = ((ConfigurableComponent)getChild(i)).getProperty(AgentDBComponent.PROP_AGENT_NAME); if (propName != null) { propName.addPropertyListener(new ConfigurableComponentPropertyAdapter() { public void propertyValueChanged(PropertyEvent e) { String newVal = (String)e.getProperty().getValue(); if (getRecipeName().equals(newVal)) { if (log.isDebugEnabled()) log.debug("Complex recipe: agent name changing to recipe name (" + newVal + ")! Will reject."); String old = (String)e.getPreviousValue(); e.getProperty().setValue(old); } } }); } }  if (! getRecipeName().equals(initName)) {
  public void initProperties() {    if (cdata != null) {      initFromCData();      assemblyId = null;    } else if (assemblyId != null) {      initFromDatabase();    }    propAssemblyId = addProperty(ASSEMBLY_PROP, ((assemblyId != null) ? assemblyId : ""));    propAssemblyId.setVisible(false);    if (initName != getRecipeName()) {      // A recipe copy - mark it as modified      oldAssemblyId = assemblyId;      assemblyId = "";      propAssemblyId.setValue("");      modified = true;    } else {      // After reading from the DB, it is not modified.      modified = false;      fireModification(new ModificationEvent(this, RECIPE_SAVED));    }  }