changes: building field/method hierarchy graph + inserting combination nodes at the...
[IRC.git] / Robust / src / Analysis / SSJava / LocationInfo.java
index 12f8d38bceb200e8fdc4d1e8aab8f10c80e60eb7..c7cedcdf125833000d9fdda5f8989107bc5b01b0 100644 (file)
@@ -53,9 +53,15 @@ public class LocationInfo {
     }
     mapLocSymbolToRelatedInferLocSet.get(locSymbol).add(
         new Pair<Descriptor, Descriptor>(enclosingDesc, desc));
+
+    addMapLocSymbolToDescSet(locSymbol, desc);
   }
 
   public Set<Pair<Descriptor, Descriptor>> getRelatedInferLocSet(String locSymbol) {
+
+    if (!mapLocSymbolToRelatedInferLocSet.containsKey(locSymbol)) {
+      mapLocSymbolToRelatedInferLocSet.put(locSymbol, new HashSet<Pair<Descriptor, Descriptor>>());
+    }
     return mapLocSymbolToRelatedInferLocSet.get(locSymbol);
   }
 
@@ -78,7 +84,7 @@ public class LocationInfo {
 
       newInferLoc.addLocation(loc);
       mapDescToInferCompositeLocation.put(desc, newInferLoc);
-      addMapLocSymbolToDescSet(desc.getSymbol(), desc);
+      // addMapLocSymbolToDescSet(desc.getSymbol(), desc);
       addMapLocSymbolToRelatedInferLoc(desc.getSymbol(), enclosingDesc, desc);
     }
     return mapDescToInferCompositeLocation.get(desc);