Experiment experiment;
Experiment experiment = null;
  protected void startConsole() {    DefaultMutableTreeNode node = getSelectedNode();    Object o = node.getUserObject();    Experiment experiment;    if (o instanceof SocietyComponent) {      SocietyComponent sc = (SocietyComponent) o;      // FIXME What is the society is marked as modified? Then I need to save it      // But can this ever get called if the society is modified?      String name = "Temp Experiment for " + sc.getSocietyName();      name = experimentNames.generateName(name);      experiment = new Experiment(name,				  sc,				  new RecipeComponent[0]);      DefaultMutableTreeNode parentNode = 	(DefaultMutableTreeNode) node.getParent();      addExperimentToWorkspace(experiment, parentNode);      // can't run if experiment has unbound properties      if (experiment.hasUnboundProperties()) {        csmart.runExperimentBuilder(experiment, false);        return;      }      if (!experiment.hasConfiguration())        experiment.createDefaultConfiguration();      if (experiment.isModified()) {	// save it	final Experiment expt = experiment;	GUIUtils.timeConsumingTaskStart(organizer);	try {	  new Thread("SaveExperiment") {	    public void run() {	      expt.saveToDb(saveToDbConflictHandler); // save with new config	      GUIUtils.timeConsumingTaskEnd(organizer);	    }	  }.start();	} catch (RuntimeException re) {	  if(log.isErrorEnabled()) {	    log.error("Runtime exception saving experiment", re);	  }	  GUIUtils.timeConsumingTaskEnd(organizer);	}      } // end of block to see if experiment was modified    } else if (o instanceof Experiment) {      experiment = (Experiment) o;    } else {      return;    }    // Start up the console on the experiment    csmart.runConsole(experiment);  }