Experiment experimentCopy = experiment.copy(this, context);
final Experiment experimentCopy = experiment.copy(this, context);    if (experiment.isInDatabase()) { experimentCopy.setCloned(false); GUIUtils.timeConsumingTaskStart(organizer); try { new Thread("DuplicateExperiment") { public void run() { experimentCopy.saveToDb(); GUIUtils.timeConsumingTaskEnd(organizer); } }.start(); } catch (RuntimeException re) { System.out.println("Runtime exception duplicating experiment: " + re); re.printStackTrace(); GUIUtils.timeConsumingTaskEnd(organizer); } }
  public Experiment copyExperiment(Experiment experiment, Object context) {    // context is the tree node of the folder containing the experiment    // Fixme: if make Experiment hold everything in properties, then can    // use the Component copy method    Experiment experimentCopy = experiment.copy(this, context);    if (context == null)      // add copy as sibling of original      workspace.setSelection(addExperimentToWorkspace(experimentCopy,			       (DefaultMutableTreeNode)findNode(experiment).getParent()));    else      workspace.setSelection(addExperimentToWorkspace(experimentCopy, 			       (DefaultMutableTreeNode)context));    return experimentCopy;  }