m_destinationFilename = ((CSVResultListener)exp.getResultListener()).getOutputFile().toString();
m_destinationFilename = ((CSVResultListener)exp.getResultListener()).outputFileName();
  public boolean setExperiment(Experiment exp) {        m_userHasBeenAskedAboutConversion = false;    m_Exp = null; // hold off until we are sure we want conversion    m_SaveBut.setEnabled(true);    if (exp.getResultListener() instanceof DatabaseResultListener) {      m_ResultsDestinationCBox.setSelectedItem(DEST_DATABASE_TEXT);      m_ResultsDestinationPathLabel.setText("URL:");      m_destinationDatabaseURL = ((DatabaseResultListener)exp.getResultListener()).getDatabaseURL();      m_ResultsDestinationPathTField.setText(m_destinationDatabaseURL);      m_BrowseDestinationButton.setEnabled(true);    } else if (exp.getResultListener() instanceof InstancesResultListener) {      m_ResultsDestinationCBox.setSelectedItem(DEST_ARFF_TEXT);      m_ResultsDestinationPathLabel.setText("Filename:");      m_destinationFilename = ((InstancesResultListener)exp.getResultListener()).getOutputFile().toString();      m_ResultsDestinationPathTField.setText(m_destinationFilename);      m_BrowseDestinationButton.setEnabled(true);    } else if (exp.getResultListener() instanceof CSVResultListener) {      m_ResultsDestinationCBox.setSelectedItem(DEST_CSV_TEXT);      m_ResultsDestinationPathLabel.setText("Filename:");      m_destinationFilename = ((CSVResultListener)exp.getResultListener()).getOutputFile().toString();      m_ResultsDestinationPathTField.setText(m_destinationFilename);      m_BrowseDestinationButton.setEnabled(true);    } else {      // unrecognised result listener       System.out.println("SimpleSetup incompatibility: unrecognised result destination");      if (userWantsToConvert()) {	m_ResultsDestinationCBox.setSelectedItem(DEST_ARFF_TEXT);	m_ResultsDestinationPathLabel.setText("Filename:");	m_destinationFilename = "-";	m_ResultsDestinationPathTField.setText(m_destinationFilename);	m_BrowseDestinationButton.setEnabled(true);      } else {	return false;      }    }    m_ResultsDestinationCBox.setEnabled(true);    m_ResultsDestinationPathLabel.setEnabled(true);    m_ResultsDestinationPathTField.setEnabled(true);    if (exp.getResultProducer() instanceof CrossValidationResultProducer) {      CrossValidationResultProducer cvrp = (CrossValidationResultProducer) exp.getResultProducer();      m_numFolds = cvrp.getNumFolds();      m_ExperimentParameterTField.setText("" + m_numFolds);            if (cvrp.getSplitEvaluator() instanceof ClassifierSplitEvaluator) {	m_ExpClassificationRBut.setSelected(true);	m_ExpRegressionRBut.setSelected(false);      } else if (cvrp.getSplitEvaluator() instanceof RegressionSplitEvaluator) {	m_ExpClassificationRBut.setSelected(false);	m_ExpRegressionRBut.setSelected(true);      } else {	// unknown split evaluator	System.out.println("SimpleSetup incompatibility: unrecognised split evaluator");	if (userWantsToConvert()) {	  m_ExpClassificationRBut.setSelected(true);	  m_ExpRegressionRBut.setSelected(false);	} else {	  return false;	}      }      m_ExperimentTypeCBox.setSelectedItem(TYPE_CROSSVALIDATION_TEXT);    } else if (exp.getResultProducer() instanceof RandomSplitResultProducer) {      RandomSplitResultProducer rsrp = (RandomSplitResultProducer) exp.getResultProducer();      if (rsrp.getRandomizeData()) {	m_ExperimentTypeCBox.setSelectedItem(TYPE_RANDOMSPLIT_TEXT);      } else {	m_ExperimentTypeCBox.setSelectedItem(TYPE_FIXEDSPLIT_TEXT);      }      if (rsrp.getSplitEvaluator() instanceof ClassifierSplitEvaluator) {	m_ExpClassificationRBut.setSelected(true);	m_ExpRegressionRBut.setSelected(false);      } else if (rsrp.getSplitEvaluator() instanceof RegressionSplitEvaluator) {	m_ExpClassificationRBut.setSelected(false);	m_ExpRegressionRBut.setSelected(true);      } else {	// unknown split evaluator	System.out.println("SimpleSetup incompatibility: unrecognised split evaluator");	if (userWantsToConvert()) {	  m_ExpClassificationRBut.setSelected(true);	  m_ExpRegressionRBut.setSelected(false);	} else {	  return false;	}      }      m_trainPercent = rsrp.getTrainPercent();      m_ExperimentParameterTField.setText("" + m_trainPercent);          } else {      // unknown experiment type      System.out.println("SimpleSetup incompatibility: unrecognised resultProducer");      if (userWantsToConvert()) {	m_ExperimentTypeCBox.setSelectedItem(TYPE_CROSSVALIDATION_TEXT);	m_ExpClassificationRBut.setSelected(true);	m_ExpRegressionRBut.setSelected(false);      } else {	return false;      }    }    m_ExperimentTypeCBox.setEnabled(true);    m_ExperimentParameterLabel.setEnabled(true);    m_ExperimentParameterTField.setEnabled(true);    m_ExpClassificationRBut.setEnabled(true);    m_ExpRegressionRBut.setEnabled(true);        if (exp.getRunLower() == 1) {      m_numRepetitions = exp.getRunUpper();      m_NumberOfRepetitionsTField.setText("" + m_numRepetitions);    } else {      // unsupported iterations      System.out.println("SimpleSetup incompatibility: runLower is not 1");      if (userWantsToConvert()) {	exp.setRunLower(1);	if (m_ExperimentTypeCBox.getSelectedItem() == TYPE_FIXEDSPLIT_TEXT) {	  exp.setRunUpper(1);	  m_NumberOfRepetitionsTField.setEnabled(false);	  m_NumberOfRepetitionsTField.setText("1");	} else {	  exp.setRunUpper(10);	  m_numRepetitions = 10;	  m_NumberOfRepetitionsTField.setText("" + m_numRepetitions);	}	      } else {	return false;      }    }    m_NumberOfRepetitionsTField.setEnabled(true);    m_OrderDatasetsFirstRBut.setSelected(exp.getAdvanceDataSetFirst());    m_OrderAlgorithmsFirstRBut.setSelected(!exp.getAdvanceDataSetFirst());    m_OrderDatasetsFirstRBut.setEnabled(true);    m_OrderAlgorithmsFirstRBut.setEnabled(true);    m_NotesText.setText(exp.getNotes());    m_NotesText.setEnabled(true);    if (!exp.getUsePropertyIterator() || !(exp.getPropertyArray() instanceof Classifier[])) {      // unknown property iteration      System.out.println("SimpleSetup incompatibility: unrecognised property iteration");      if (userWantsToConvert()) {	exp.setPropertyArray(new Classifier[0]);	exp.setUsePropertyIterator(true);      } else {	return false;      }    }    m_DatasetListPanel.setExperiment(exp);    m_AlgorithmListPanel.setExperiment(exp);        m_Exp = exp;    expTypeChanged(); // recreate experiment        m_Support.firePropertyChange("", null, null);        return true;  }