ExperimentINIWriter cw = null; if (DBUtils.dbMode) { saveToDb(); if (theWholeSoc == null) return; cw = new ExperimentINIWriter(theWholeSoc); } else cw = new ExperimentINIWriter(getComponents(), getNodes(), this);
generateCompleteSociety();   List components = getComponents(); for (int i = 0, n = components.size(); i < n; i++) { BaseComponent soc = (BaseComponent) components.get(i); soc.modifyComponentData(completeSociety); }  ExperimentINIWriter cw = new ExperimentINIWriter(completeSociety);
  public void dumpINIFiles() {    ExperimentINIWriter cw = null;    if (DBUtils.dbMode) {      saveToDb();      if (theWholeSoc == null)        return;      cw = new ExperimentINIWriter(theWholeSoc);    } else      cw = new ExperimentINIWriter(getComponents(), getNodes(), this);    File resultDir = getResultDirectory();    // if user didn't specify results directory, save in local directory    if (resultDir == null) {      resultDir = new File(".");    }    Trial trial = getTrials()[0];    String dirname = resultDir.getAbsolutePath() + File.separatorChar +       getExperimentName() + File.separatorChar +      trial.getShortName() + File.separatorChar +      "INIFiles-dump";    File f = null;    try {      f = new File(dirname);      // guarantee that directories exist      if (!f.exists() && !f.mkdirs() && !f.exists()) 	f = new File(".");    } catch (Exception e) {      JOptionPane.showMessageDialog(null, "Couldn't create results directory: " + e, "Can't create directory", JOptionPane.ERROR_MESSAGE);      if(log.isErrorEnabled()) {        log.error("Couldn't create results directory: ", e);      }    }    if (f != null) {      try {	JOptionPane.showMessageDialog(null, "Writing ini file to " + f.getAbsolutePath() + "...");	//	System.out.println("Writing ini files to " + f.getAbsolutePath() + "...");	cw.writeConfigFiles(f);      } catch (Exception e) {        if(log.isErrorEnabled()) {          log.error("Couldn't write ini files: ", e);        }      }    }  }