if(log.isDebugEnabled()) {
if(log.isWarnEnabled()) {
  public CSMARTGraph newGraphFromSelection() {    if (graph == null) {      if(log.isDebugEnabled()) {      log.warn("WARNING: graph is null");      }      return null;    }    // create a copy of the original graph, both nodes and edges    CSMARTGraph subgraph = new CSMARTGraph(graph, "Selected Nodes");    // clear selection in new graph    subgraph.clearSelection();    // get the selected nodes and edges from the original graph    Vector elements = graph.getSelectedElements();    if (elements == null) {      if(log.isDebugEnabled()) {        log.warn("No elements selected");      }      return null;    }    // get the names of the selected nodes    Vector nodeNames = new Vector(elements.size());    for (int i = 0; i < elements.size(); i++) {      Element element = (Element)elements.elementAt(i);      if (element instanceof Node)	nodeNames.addElement(((Node)element).getName());    }    // keep only the selected nodes    subgraph.keepNamedNodes(nodeNames);    return subgraph;  }