- // but there is no such a case.
-
- // Set<HNode> outNodeSet = simpleGraph.getOutgoingNodeSet(node);
- // Set<String> belowSkeletonLocNameSet = new HashSet<String>();
- // for (Iterator iterator2 = outNodeSet.iterator(); iterator2.hasNext();) {
- // HNode outNode = (HNode) iterator2.next();
- // if (outNode.isSkeleton()) {
- // belowSkeletonLocNameSet.add(scGraph.getCurrentHNode(outNode).getName());
- // }
- // }
- // String newLocName = "ILOC" + (seed++);
- // lattice.insertNewLocationBetween(lattice.getTopItem(), belowSkeletonLocNameSet,
- // newLocName);
- // locSummary.addMapHNodeNameToLocationName(node.getName(), newLocName);
+ int sizeIncomingNode = simpleGraph.getIncomingNodeSet(node).size();
+
+ if (sizeIncomingNode == 0) {
+ // this node will be directly connected to the TOP location
+ // start adding the following nodes from this node
+
+ Set<HNode> endNodeSetFromSimpleGraph =
+ simpleGraph.getDirectlyReachableSkeletonCombinationNodeFrom(node, null);
+
+ Set<HNode> endCombNodeSet = new HashSet<HNode>();
+ for (Iterator iterator3 = endNodeSetFromSimpleGraph.iterator(); iterator3.hasNext();) {
+ HNode endNode = (HNode) iterator3.next();
+ endCombNodeSet.add(getCombinationNodeInSCGraph(desc, endNode));
+ }
+
+ HNode startNode = topNode;
+ visited.add(startNode);
+ if (endCombNodeSet.size() > 0) {
+ // follows the straight line up to another skeleton/combination node
+ // endCombNodeSet = removeTransitivelyReachToNode(desc, node, endCombNodeSet);
+ recurDFSNormalNode(desc, lattice, startNode, endCombNodeSet, visited,
+ mapIntermediateLoc, 1, locSummary, node);
+ }
+
+ }