if (log.isErrorEnabled()) { log.error("Null property " + name.toString() + " copying from " + this.getFullName().toString(), new Throwable()); } continue;
myProp = getInvisibleProperty(name); if (myProp == null) { if (log.isErrorEnabled()) { log.error("Null property " + name.toString() + " copying from " + this.getFullName().toString(), new Throwable()); } continue; }
  public BaseComponent copy(BaseComponent result) {    // Make sure we're copying apples into apples    // The result can be a sub-class, but we want it    // to at least have the same set of properties    if (! (this.getClass().isAssignableFrom(result.getClass())))      return null;    Iterator iter = getSortedLocalPropertyNames();    while(iter.hasNext()) {      CompositeName name = (CompositeName)iter.next();      Property myProp = getProperty(name);      if (myProp == null) {	if (log.isErrorEnabled()) {	  log.error("Null property " + name.toString() + " copying from " + this.getFullName().toString(), new Throwable());	}	continue;      }      // compose the correct name for the property      // name must be prepended by new society name      String s = name.last().toString();      ComponentName hisPropName = new ComponentName(result, s);      Property hisProp = result.getProperty(hisPropName);      if (hisProp == null) {	if (log.isErrorEnabled()) {	  log.error("Report bug 1377: Using " + CSMART.writeDebug() + " couldn't find " + hisPropName.toString() + " in " + result.getFullName().toString() + " copying from " + name.toString() + " in " + this.getFullName().toString(), new Throwable());	}	// FIXME: Try creating it?      } else {	try {	  // if have experimental values, then copy those	  // else copy the property value	  if (myProp.getExperimentValues() != null) {	    List experimentValues = myProp.getExperimentValues();	    Object newValue = Array.newInstance(myProp.getPropertyClass(),						experimentValues.size());	    for (int j = 0; j < experimentValues.size(); j++)	      Array.set(newValue, j,			PropertyHelper.validateValue(myProp, 						     experimentValues.get(j)));	    hisProp.setExperimentValues(Arrays.asList((Object[])newValue));	    hisProp.setValue(null); // no specific value	  } else {	    Object o = PropertyHelper.validateValue(myProp, myProp.getValue());	    if (o != null) {	      hisProp.setValue(o);	    }	  }	} catch (InvalidPropertyValueException e) {	  if(log.isErrorEnabled()) {	    log.error("Caught InvalidPropertyValueException: " + getClass().getName(), e);	  }	}      } // end of else block    } // end of loop over properties    // Now, clone my children    for(int i=0; i < getChildCount(); i++) {      ConfigurableComponent cc = (ConfigurableComponent)getChild(i);      BaseComponent co =         (BaseComponent)result.getChild(cc.getFullName().last());      if(co != null) {	cc.copy(co);      }    }    return result;  }