code: private boolean isDangling(Node node)
  	{
  		if (!result.contains(node)) return false;
  		if (ST.contains(node)) return false;
  
  		boolean hasIncoming = false;
  
  		for (Edge edge : node.getUpstream())
  		{
  			if (result.contains(edge))
  			{
  				hasIncoming = true;
  				break;
  			}
  		}
  
  		boolean hasOutgoing = false;
  
  		for (Edge edge : node.getDownstream())
  		{
  			if (result.contains(edge))
  			{
  				hasOutgoing = true;
  				break;
  			}
  		}
  
  		if (hasIncoming && hasOutgoing) return false;
  
  		boolean hasParent = false;
  
  		for (Node parent : node.getUpperEquivalent())
  		{
  			if (result.contains(parent))
  			{
  				hasParent = true;
  				break;
  			}
  		}
  
  		if (hasParent && (hasIncoming || hasOutgoing)) return false;
  
  		boolean hasChild = false;
  
  		for (Node child : node.getLowerEquivalent())
  		{
  			if (result.contains(child))
  			{
  				hasChild = true;
  				break;
  			}
  		}
  
  		return !(hasChild && (hasIncoming || hasOutgoing || hasParent));
  	}
docs: Checks if the node is dangling.
  @param node Node to check
  @return true if dangling