X-Git-Url: http://plrg.eecs.uci.edu/git/?p=IRC.git;a=blobdiff_plain;f=Robust%2Fsrc%2FAnalysis%2FSSJava%2FBuildLattice.java;h=61a083274e84e97c7968442d8bc6d5d502d343f8;hp=7a38272d4fd3d67c84a9bac1a92868f5f7aeb002;hb=99040b5e3460f3e28210e6b672bc8b46545a775e;hpb=cbc13efe1afc46ef542fde526361b4911d3da0e1 diff --git a/Robust/src/Analysis/SSJava/BuildLattice.java b/Robust/src/Analysis/SSJava/BuildLattice.java index 7a38272d..61a08327 100644 --- a/Robust/src/Analysis/SSJava/BuildLattice.java +++ b/Robust/src/Analysis/SSJava/BuildLattice.java @@ -276,6 +276,7 @@ public class BuildLattice { if (hNode.isCombinationNode()) { Set combineSkeletonNodeSet = hierarchyGraph.getCombineSetByCombinationNode(hNode); + aboveSet.addAll(hierarchyGraph .getFirstNodeOfCombinationNodeChainSet(combineSkeletonNodeSet)); SCNode = scGraph.getCombinationNode(combineSkeletonNodeSet); @@ -288,9 +289,16 @@ public class BuildLattice { SCNode = aboveSet.iterator().next(); } - numNonSharedNodes = hierarchyGraph.countNonSharedNode(hNode, aboveSet); + // update above set w.r.t the hierarchy graph with SC nodes + // because the skeleton nodes in the origianl hierarchy graph may merged to a new node + Set endSet = new HashSet(); + for (Iterator iterator2 = aboveSet.iterator(); iterator2.hasNext();) { + HNode aboveNode = (HNode) iterator2.next(); + endSet.add(scGraph.getCurrentHNode(aboveNode)); + } + numNonSharedNodes = hierarchyGraph.countNonSharedNode(hNode, endSet); - System.out.println(" node=" + hNode + " above=" + aboveSet + " distance=" + System.out.println(" node=" + hNode + " above=" + endSet + " distance=" + numNonSharedNodes + " SCNode=" + SCNode); } @@ -326,6 +334,7 @@ public class BuildLattice { private String recur_getNewLocation(SSJavaLattice lattice, String cur, Set endSet, int dist, boolean isShared) { + System.out.println("H"); Set connectedSet = lattice.get(cur); if (connectedSet == null) { connectedSet = new HashSet();