test_class.file: modules/x-gsn/src/main/java/org/openiot/gsn/utils/graph/TestGraph.java
test_class.identifier: TestGraph
test_case.body: @Test
  	public void testRemoveNode() throws NodeNotExistsExeption{
  		Graph<String> graph = new Graph<String>();
  		graph.addNode("n1");
  		graph.addNode("n2");
  		graph.addNode("n3");
  		graph.addNode("n4");
  		graph.addNode("n5");
  		graph.addNode("n6");
  		graph.addEdge("n2", "n3");
  		graph.addEdge("n3", "n4");
  		graph.addEdge("n1", "n5");
  		graph.addEdge("n2", "n6");
  		printGraph(graph, "testRemoveNode1");
  		graph.removeNode("n4");
  		assertNull(graph.findNode("n2"));
  		assertNotNull(graph.findNode("n6"));
  		printGraph(graph, "testRemoveNode2");
  	}
test_case.class_method_signature: TestGraph.testRemoveNode()
test_case.full_signature: @Test public void testRemoveNode()
test_case.identifier: testRemoveNode
test_case.invocations: addNode addNode addNode addNode addNode addNode addEdge addEdge addEdge addEdge printGraph removeNode assertNull findNode assertNotNull findNode printGraph
test_case.modifiers: @Test public
test_case.parameters: ()
test_case.return: void
test_case.signature: void testRemoveNode()
focal_class.declarator: nodes
focal_class.modifier: private
focal_class.original_string: private ArrayList<Node<T>> nodes;
focal_class.type: ArrayList<Node<T>>
focal_class.var_name: nodes
focal_class.declarator: rootNodes
focal_class.modifier: private
focal_class.original_string: private ArrayList<Node<T>> rootNodes;
focal_class.type: ArrayList<Node<T>>
focal_class.var_name: rootNodes
focal_class.file: modules/x-gsn/src/main/java/org/openiot/gsn/utils/graph/Graph.java
focal_class.identifier: Graph
focal_class.interfaces: implements Serializable
focal_class.class_method_signature: Graph.Graph()
focal_class.full_signature: public  Graph()
focal_class.identifier: Graph
focal_class.modifiers: public
focal_class.parameters: ()
focal_class.signature:  Graph()
focal_class.class_method_signature: Graph.getDescendingNodes(Node<T> node)
focal_class.full_signature: public List<Node<T>> getDescendingNodes(Node<T> node)
focal_class.identifier: getDescendingNodes
focal_class.modifiers: public
focal_class.parameters: (Node<T> node)
focal_class.return: List<Node<T>>
focal_class.signature: List<Node<T>> getDescendingNodes(Node<T> node)
focal_class.class_method_signature: Graph.getNodesByDFSSearch()
focal_class.full_signature: public List<T> getNodesByDFSSearch()
focal_class.identifier: getNodesByDFSSearch
focal_class.modifiers: public
focal_class.parameters: ()
focal_class.return: List<T>
focal_class.signature: List<T> getNodesByDFSSearch()
focal_class.class_method_signature: Graph.getAscendingNodes(Node<T> node)
focal_class.full_signature: private List<Node<T>> getAscendingNodes(Node<T> node)
focal_class.identifier: getAscendingNodes
focal_class.modifiers: private
focal_class.parameters: (Node<T> node)
focal_class.return: List<Node<T>>
focal_class.signature: List<Node<T>> getAscendingNodes(Node<T> node)
focal_class.class_method_signature: Graph.rdfs(Node<T> node, ArrayList<Node<T>> list)
focal_class.full_signature: private void rdfs(Node<T> node, ArrayList<Node<T>> list)
focal_class.identifier: rdfs
focal_class.modifiers: private
focal_class.parameters: (Node<T> node, ArrayList<Node<T>> list)
focal_class.return: void
focal_class.signature: void rdfs(Node<T> node, ArrayList<Node<T>> list)
focal_class.class_method_signature: Graph.nodesAffectedByRemoval(Node<T> node)
focal_class.full_signature: public List<Node<T>> nodesAffectedByRemoval(Node<T> node)
focal_class.identifier: nodesAffectedByRemoval
focal_class.modifiers: public
focal_class.parameters: (Node<T> node)
focal_class.return: List<Node<T>>
focal_class.signature: List<Node<T>> nodesAffectedByRemoval(Node<T> node)
focal_class.class_method_signature: Graph.hasCycle()
focal_class.full_signature: public boolean hasCycle()
focal_class.identifier: hasCycle
focal_class.modifiers: public
focal_class.parameters: ()
focal_class.return: boolean
focal_class.signature: boolean hasCycle()
focal_class.class_method_signature: Graph.isNodeInCycle(Node<T> node)
focal_class.full_signature: private boolean isNodeInCycle(Node<T> node)
focal_class.identifier: isNodeInCycle
focal_class.modifiers: private
focal_class.parameters: (Node<T> node)
focal_class.return: boolean
focal_class.signature: boolean isNodeInCycle(Node<T> node)
focal_class.class_method_signature: Graph.addNode(T object)
focal_class.full_signature: public Node<T> addNode(T object)
focal_class.identifier: addNode
focal_class.modifiers: public
focal_class.parameters: (T object)
focal_class.return: Node<T>
focal_class.signature: Node<T> addNode(T object)
focal_class.class_method_signature: Graph.addEdge(T startObject, T endObject)
focal_class.full_signature: public void addEdge(T startObject, T endObject)
focal_class.identifier: addEdge
focal_class.modifiers: public
focal_class.parameters: (T startObject, T endObject)
focal_class.return: void
focal_class.signature: void addEdge(T startObject, T endObject)
focal_class.class_method_signature: Graph.findRootNode(Node<T> startNode)
focal_class.full_signature: public Node<T> findRootNode(Node<T> startNode)
focal_class.identifier: findRootNode
focal_class.modifiers: public
focal_class.parameters: (Node<T> startNode)
focal_class.return: Node<T>
focal_class.signature: Node<T> findRootNode(Node<T> startNode)
focal_class.class_method_signature: Graph.removeNode(T object)
focal_class.full_signature: public boolean removeNode(T object)
focal_class.identifier: removeNode
focal_class.modifiers: public
focal_class.parameters: (T object)
focal_class.return: boolean
focal_class.signature: boolean removeNode(T object)
focal_class.class_method_signature: Graph.findNode(T object)
focal_class.full_signature: public Node<T> findNode(T object)
focal_class.identifier: findNode
focal_class.modifiers: public
focal_class.parameters: (T object)
focal_class.return: Node<T>
focal_class.signature: Node<T> findNode(T object)
focal_class.class_method_signature: Graph.dfs(Node<T> node, List<Node<T>> list)
focal_class.full_signature: private void dfs(Node<T> node, List<Node<T>> list)
focal_class.identifier: dfs
focal_class.modifiers: private
focal_class.parameters: (Node<T> node, List<Node<T>> list)
focal_class.return: void
focal_class.signature: void dfs(Node<T> node, List<Node<T>> list)
focal_class.class_method_signature: Graph.resetVisitingStatus()
focal_class.full_signature: private void resetVisitingStatus()
focal_class.identifier: resetVisitingStatus
focal_class.modifiers: private
focal_class.parameters: ()
focal_class.return: void
focal_class.signature: void resetVisitingStatus()
focal_class.class_method_signature: Graph.getNodes()
focal_class.full_signature: public ArrayList<Node<T>> getNodes()
focal_class.identifier: getNodes
focal_class.modifiers: public
focal_class.parameters: ()
focal_class.return: ArrayList<Node<T>>
focal_class.signature: ArrayList<Node<T>> getNodes()
focal_class.class_method_signature: Graph.getRootNodes()
focal_class.full_signature: public ArrayList<Node<T>> getRootNodes()
focal_class.identifier: getRootNodes
focal_class.modifiers: public
focal_class.parameters: ()
focal_class.return: ArrayList<Node<T>>
focal_class.signature: ArrayList<Node<T>> getRootNodes()
focal_class.class_method_signature: Graph.toString()
focal_class.full_signature: @Override public String toString()
focal_class.identifier: toString
focal_class.modifiers: @Override public
focal_class.parameters: ()
focal_class.return: String
focal_class.signature: String toString()
focal_method.body: public boolean removeNode(T object) throws NodeNotExistsExeption {
  		Node<T> node = findNode(object);
  		if (node == null)
  			throw new NodeNotExistsExeption(object == null ? "null" : object.toString());
  
  		List<Node<T>> ascendingNodes = getAscendingNodes(node);
  		for (Node<T> ascendingNode : ascendingNodes) {
  			ArrayList<Edge<T>> outputEdges = ascendingNode.getOutputEdges();
  			ArrayList<Node<T>> nodesToRemove = new ArrayList<Node<T>>(
  					outputEdges.size());
  			for (Edge<T> edge : outputEdges) {
  				nodesToRemove.add(edge.getEndNode());
  			}
  			for (Node<T> node2 : nodesToRemove) {
  				ascendingNode.removeEdge(node2);
  			}
  
  			nodes.remove(ascendingNode);
  			rootNodes.remove(ascendingNode);
  		}
  		nodes.remove(node);
  		rootNodes.remove(node);
  
  		for (Node<T> remainedNode : nodes) {
  			if (remainedNode.getInputEdges().isEmpty()
  					&& rootNodes.contains(remainedNode) == false)
  				rootNodes.add(remainedNode);
  		}
  		return true;
  	}
focal_method.class_method_signature: Graph.removeNode(T object)
focal_method.full_signature: public boolean removeNode(T object)
focal_method.identifier: removeNode
focal_method.invocations: findNode toString getAscendingNodes getOutputEdges size add getEndNode removeEdge remove remove remove remove isEmpty getInputEdges contains add
focal_method.modifiers: public
focal_method.parameters: (T object)
focal_method.return: boolean
focal_method.signature: boolean removeNode(T object)