List components = getComponents();
BaseComponent theSoc = getSocietyComponent();
  private boolean allowModifyCData() {    // then give everyone a chance to modify what they've collectively produced    boolean componentModified = false;    List components = getComponents();    PopulateDb pdb = null;    try {      pdb = new PopulateDb(getExperimentID(), trialID);      for (int i = 0, n = components.size(); i < n; i++) {	BaseComponent soc = (BaseComponent) components.get(i);	if (log.isDebugEnabled()) {	  log.debug("allowModify letting comps modify. comp: " + soc.getShortName());	}	// Recipes typically need to do DB queries	// in order to do these insertions correctly,	// so need the version of modify that takes a pdb called.	soc.modifyComponentData(completeSociety, pdb);	componentModified |= soc.componentWasRemoved();      }          } catch (Exception e) {      if (log.isErrorEnabled()) {	log.error("allowModifyCData error with pdb", e);      }    } finally {      if (pdb != null) {	try {	  pdb.close();	} catch (SQLException e) {}      }    }//     if (log.isDebugEnabled())//       log.debug("end of allowModify: complete is now: " + completeSociety);    return componentModified;  }