int n = getComponentCount();
ModifiableComponent comp = getSocietyComponent(); List propertyNames = comp.getPropertyNamesList(); for (Iterator j = propertyNames.iterator(); j.hasNext(); ) { Property property = comp.getProperty((CompositeName)j.next()); List values = property.getExperimentValues(); if (values != null && values.size() != 0) { properties.add(property); experimentValues.add(values); } }   int n = getRecipeComponentCount();
  public Trial[] getTrials() {    if (hasValidTrials)      return (Trial[])trials.toArray(new Trial[trials.size()]);    getTrialCount(); // update trial count    // get lists of unbound properties and their experimental values    List properties = new ArrayList();    List experimentValues = new ArrayList();    int n = getComponentCount();    for (int i = 0; i < n; i++) {      ModifiableComponent comp = getComponent(i);      List propertyNames = comp.getPropertyNamesList();      for (Iterator j = propertyNames.iterator(); j.hasNext(); ) {	Property property = comp.getProperty((CompositeName)j.next());	List values = property.getExperimentValues();	if (values != null && values.size() != 0) {	  properties.add(property);	  experimentValues.add(values);	}      }    }    // handle simple case of no properties to vary    int nProperties = properties.size();    if (nProperties == 0) {      hasValidTrials = true;      numberOfTrials = 1;      Trial trial = new Trial("Trial 1");      trial.initProperties();      trials = new ArrayList(1);      trials.add(trial);      variationScheme = VARY_ONE_DIMENSION;      return (Trial[])trials.toArray(new Trial[trials.size()]);    }    // create trials according to variation scheme    if (variationScheme.equals(VARY_ONE_DIMENSION))       return getUnivariateTrials(properties, experimentValues);    else if (variationScheme.equals(VARY_TWO_DIMENSION))       return getBivariateTrials(properties, experimentValues);    else if (variationScheme.equals(VARY_SEQUENTIAL) ||	     variationScheme.equals(VARY_RANDOM))      return getMultivariateTrials(properties, experimentValues);    else {      System.out.println("Variation scheme not implemented: " + 			 variationScheme);      return null;    }  }