1) changes on the definitely written analysis: it only takes care about locations...
[IRC.git] / Robust / src / Analysis / SSJava / SSJavaAnalysis.java
index fb1376330ce1704563d39494679e8a8920bf9bee..28635cab814d01d53f614bb8b247b91a15a33f41 100644 (file)
@@ -97,16 +97,16 @@ public class SSJavaAnalysis {
     this.mapSharedLocation2DescriptorSet = new Hashtable<Location, Set<Descriptor>>();
     this.linearTypeCheckMethodSet = new HashSet<MethodDescriptor>();
     this.bf = bf;
-    trustWorthyMDSet = new HashSet<MethodDescriptor>();
+    this.trustWorthyMDSet = new HashSet<MethodDescriptor>();
   }
 
   public void doCheck() {
     doMethodAnnotationCheck();
     // computeLinearTypeCheckMethodSet();
     // doLinearTypeCheck();
-    // if (state.SSJAVADEBUG) {
-    // debugPrint();
-    // }
+    if (state.SSJAVADEBUG) {
+      debugPrint();
+    }
     parseLocationAnnotation();
     // doFlowDownCheck();
     doDefinitelyWrittenCheck();
@@ -450,8 +450,10 @@ public class SSJavaAnalysis {
     ClassDescriptor cd = md.getClassDesc();
     // if a method requires to be annotated, class containg that method also
     // requires to be annotated
-    annotationRequireClassSet.add(cd);
-    annotationRequireSet.add(md);
+    if (!isSSJavaUtil(cd)) {
+      annotationRequireClassSet.add(cd);
+      annotationRequireSet.add(md);
+    }
   }
 
   public Set<MethodDescriptor> getAnnotationRequireSet() {
@@ -504,4 +506,11 @@ public class SSJavaAnalysis {
   public void setMethodContainingSSJavaLoop(MethodDescriptor methodContainingSSJavaLoop) {
     this.methodContainingSSJavaLoop = methodContainingSSJavaLoop;
   }
+
+  public boolean isSSJavaUtil(ClassDescriptor cd) {
+    if (cd.getSymbol().equals("SSJAVA")) {
+      return true;
+    }
+    return false;
+  }
 }