+ // copy nodes/edges from the parent method/class if possible
+ SSJavaLattice<String> lattice = skeletonLattice.clone();
+
+ Descriptor parentDesc = getParent(desc);
+ if (parentDesc != null) {
+ SSJavaLattice<String> parentLattice = infer.getLattice(parentDesc);
+
+ Map<String, Set<String>> parentMap = parentLattice.getTable();
+ Set<String> parentKeySet = parentMap.keySet();
+ for (Iterator iterator = parentKeySet.iterator(); iterator.hasNext();) {
+ String parentKey = (String) iterator.next();
+ Set<String> parentValueSet = parentMap.get(parentKey);
+ for (Iterator iterator2 = parentValueSet.iterator(); iterator2.hasNext();) {
+ String value = (String) iterator2.next();
+ lattice.put(parentKey, value);
+ }
+ }
+
+ Set<String> parentSharedLocSet = parentLattice.getSharedLocSet();
+ for (Iterator iterator = parentSharedLocSet.iterator(); iterator.hasNext();) {
+ String parentSharedLoc = (String) iterator.next();
+ lattice.addSharedLoc(parentSharedLoc);
+ }
+ }
+
+ // ////