SocietyComponent society = getSocietyComponent(i);
ModifiableConfigurableComponent society = getComponent(i);
  public int getTrialCount() {    if (hasValidTrials)       return numberOfTrials;    ArrayList experimentValueCounts = new ArrayList(100);    int n = getSocietyComponentCount();    for (int i = 0; i < n; i++) {      SocietyComponent society = getSocietyComponent(i);      Iterator names = society.getPropertyNames();      while (names.hasNext()) {	Property property = society.getProperty((CompositeName)names.next());	List values = property.getExperimentValues();	if (values != null)	  experimentValueCounts.add(new Integer(values.size()));      }    }    // one dimension: sum the counts of experiment values    // but only count nominal value the first time    if (variationScheme.equals(VARY_ONE_DIMENSION)) {      numberOfTrials = 0;      for (int i = 0; i < experimentValueCounts.size(); i++)	numberOfTrials = numberOfTrials + 	  ((Integer)experimentValueCounts.get(i)).intValue() - 1;      numberOfTrials++; // add one to use nominal value for first time    }    // sequential or random: (all combinations): multiply counts    else if (variationScheme.equals(VARY_RANDOM) ||	     variationScheme.equals(VARY_SEQUENTIAL)) {      numberOfTrials = 1;      for (int i = 0; i < experimentValueCounts.size(); i++)	numberOfTrials = numberOfTrials *	  ((Integer)experimentValueCounts.get(i)).intValue();    }    // two dimension: ???    if (numberOfTrials == 0)      numberOfTrials = 1;  // always assume at least one trial    return numberOfTrials;  }