if (runningNodes.size() == 1) {
boolean doAbort = false; synchronized (runningNodesLock) { if (runningNodes.size() == 1) doAbort = true; } if (doAbort) {
  public void stopNode(NodeComponent node) {    if (runningNodes.size() == 1) {      abortButton_actionPerformed();      return;    }    NodeServesClient nsc = (NodeServesClient)runningNodes.get(node);    if (nsc == null)      return;    try {      nsc.flushNodeEvents();      nsc.destroy();    } catch (Exception ex) {      System.err.println("Unable to destroy node, assuming it's dead: " + ex);      // call the method that would have been called when the       // ConsoleNodeListener received the node destroyed confirmation      nodeStopped(node);       getNodeStatusButton(node.getShortName()).setStatus(NodeStatusButton.STATUS_NO_ANSWER);    }  }