if (communityNames == null || communityNames.size() == 0)
if (communityNames == null || communityNames.size() == 0) { if (log.isDebugEnabled()) { log.debug("selectComms got none"); }  JOptionPane.showMessageDialog(null, "No Communities defined for this Experiment.");
  private String selectCommunityToDisplay() {    // This version shows all communities anywhere    //    ArrayList communityNames = CommunityDBUtils.getCommunities();    // But I think I only want those in this experiment    ArrayList communityNames = CommunityDBUtils.getCommunitiesForExperiment(experiment.getCommAsbID());    if (communityNames == null || communityNames.size() == 0)      return null;    JComboBox cb =       new JComboBox(communityNames.toArray(new String[communityNames.size()]));    cb.setEditable(false);    JPanel panel = new JPanel();    panel.add(new JLabel("Select Community:"));    panel.add(cb);    int result =      JOptionPane.showConfirmDialog(null, panel, "Community",                                    JOptionPane.OK_CANCEL_OPTION,                                    JOptionPane.PLAIN_MESSAGE);    if (result != JOptionPane.OK_OPTION)      return null;    String communityName = (String)cb.getSelectedItem();    communityName = communityName.trim();    if (communityName.length() == 0)      return null;    return communityName;  }