+ addRelationToLattice(md, methodLattice, srcNode, dstNode);
+
+ // second, take a look at all nodes that are reachable from the source
+ // node
+ recursiveVisitNodes(md, srcNode, dstNode);
+
+ }
+
+ }
+
+ }
+
+ private void addRelationToLattice(MethodDescriptor md, SSJavaLattice<String> methodLattice,
+ FlowNode srcNode, FlowNode dstNode) {
+ if ((srcNode.getDescTuple().size() > 1 && dstNode.getDescTuple().size() > 1)
+ && srcNode.getDescTuple().get(0).equals(dstNode.getDescTuple().get(0))) {
+ // value flow between fields: we don't need to add a binary relation
+ // for this case
+
+ VarDescriptor varDesc = (VarDescriptor) srcNode.getDescTuple().get(0);
+ ClassDescriptor varClassDesc = varDesc.getType().getClassDesc();
+
+ extractRelationFromFieldFlows(varClassDesc, srcNode, dstNode, 1);
+ return;
+ }
+
+ // add a new binary relation of dstNode < srcNode
+
+ String srcSymbol = getSymbol(0, srcNode);
+ String dstSymbol = getSymbol(0, dstNode);
+
+ methodLattice.addRelationHigherToLower(srcSymbol, dstSymbol);
+
+ if (srcNode.isParameter() && dstNode.isParameter()) {
+ propagateRelationToCaller(md, srcNode, dstNode);
+ }
+ }
+
+ private SSJavaLattice<String> getMethodLattice(MethodDescriptor md) {
+
+ if (!md2lattice.containsKey(md)) {
+ md2lattice.put(md, new SSJavaLattice<String>(SSJavaLattice.TOP, SSJavaLattice.BOTTOM));
+ }
+ return md2lattice.get(md);
+ }
+
+ private void propagateRelationToCaller(MethodDescriptor calleeMethodDesc, FlowNode srcNode,
+ FlowNode newVisitNode) {
+
+ FlowGraph calleeFlowGraph = getFlowGraph(calleeMethodDesc);
+
+ int higherLocIdxCallee = calleeFlowGraph.getParamIdx(srcNode.getDescTuple());
+ int lowerLocIdxCallee = calleeFlowGraph.getParamIdx(newVisitNode.getDescTuple());
+
+ System.out.println(" ssjava.getDependents(md)=" + ssjava.getDependents(calleeMethodDesc));
+ Iterator<MethodDescriptor> depsItr = ssjava.getDependents(calleeMethodDesc).iterator();
+ while (depsItr.hasNext()) {
+ MethodDescriptor callerMethodDesc = depsItr.next();
+
+ SSJavaLattice<String> callerMethodLattice = md2lattice.get(callerMethodDesc);