+
+ private class WeaklyConectedHRGroup {
+ HashSet<Taint> connectedHRs;
+ int id;
+
+ public WeaklyConectedHRGroup() {
+ connectedHRs = new HashSet<Taint>();
+ id = -1; //this will be later modified
+ }
+
+ public void add(ArrayList<Taint> list) {
+ for(Taint t: list) {
+ this.add(t);
+ }
+ }
+
+ public void add(Taint t) {
+ connectedHRs.add(t);
+ WeaklyConectedHRGroup oldGroup = connectedHRHash.get(t);
+ connectedHRHash.put(t, this); //put new group into hash
+ //If the taint was already in another group, move all its buddies over.
+ if(oldGroup != this && oldGroup != null) {
+ Iterator<Taint> it = oldGroup.connectedHRs.iterator();
+ Taint relatedTaint;
+
+ while((relatedTaint = it.next()) != null && !connectedHRs.contains(relatedTaint)) {
+ this.add(relatedTaint);
+ }
+ }
+ }
+
+ }
+
+ //This is a class that stores all the effects for an affected allocation site
+ //across ALL taints. The structure is a hashtable of EffectGroups (see above) hashed
+ //by a Taint. This way, I can keep EffectsGroups so I can reuse most to all of my old code
+ //and allows for easier tracking of effects. In addition, a hashtable (keyed by the string
+ //of the field access) keeps track of an ArrayList of taints of SESEblocks that conflict on that
+ //field.