if(log.isDebugEnabled()) {
if(log.isErrorEnabled()) {
  public String getUniqueExperimentName(String originalName,                                        boolean allowExistingName) {    String name = null;    while (true) {      name = (String) JOptionPane.showInputDialog(this, "Enter Experiment Name",                                                  "Experiment Name",                                                  JOptionPane.QUESTION_MESSAGE,                                                  null, null,                                                  originalName);      if (name == null) return null;      if (name.equals(originalName) && allowExistingName)        return name;      // if name is unique in CSMART      if (!experimentNames.contains(name)) {        // ensure that name is not in the database        boolean inDatabase = false;        // if can't reach database, just assume that name is ok        try {          inDatabase = ExperimentDB.isExperimentNameInDatabase(name);        } catch (RuntimeException e) {          if(log.isDebugEnabled()) {            log.error("RuntimeException", e);          }        }        if (inDatabase) {          int answer = JOptionPane.showConfirmDialog(this,                     "This name is in the database; use an unique name",                                                 "Experiment Name Not Unique",						 JOptionPane.OK_CANCEL_OPTION,						 JOptionPane.ERROR_MESSAGE);          if (answer != JOptionPane.OK_OPTION) return null;        } else          break; // have unique name      } else {        int answer = JOptionPane.showConfirmDialog(this,						 "Use an unique name",						 "Experiment Name Not Unique",						 JOptionPane.OK_CANCEL_OPTION,						 JOptionPane.ERROR_MESSAGE);        if (answer != JOptionPane.OK_OPTION) return null;      }    }    return name;  }