+
+ public void init() {
+ //Go through the SESE's
+ for(Iterator<FlatSESEEnterNode> seseit=oooa.getAllSESEs().iterator();seseit.hasNext();) {
+ FlatSESEEnterNode fsen=seseit.next();
+ Analysis.OoOJava.ConflictGraph conflictGraph;
+ Hashtable<Taint, Set<Effect>> conflicts;
+ System.out.println("-------");
+ System.out.println(fsen);
+ System.out.println(fsen.getIsCallerSESEplaceholder());
+ System.out.println(fsen.getParent());
+
+ if (fsen.getParent()!=null) {
+ conflictGraph = oooa.getConflictGraph(fsen.getParent());
+ System.out.println("CG="+conflictGraph);
+ if (conflictGraph!=null)
+ System.out.println("Conflicts="+conflictGraph.getConflictEffectSet(fsen));
+ }
+
+ if(!fsen.getIsCallerSESEplaceholder() && fsen.getParent()!=null &&
+ (conflictGraph = oooa.getConflictGraph(fsen.getParent())) != null &&
+ (conflicts = conflictGraph.getConflictEffectSet(fsen)) != null) {
+ FlatMethod fm=fsen.getfmEnclosing();
+ ReachGraph rg=oooa.getDisjointAnalysis().getReachGraph(fm.getMethod());
+ if(cSideDebug)
+ rg.writeGraph("RCR_RG_SESE_DEBUG");
+
+ addToTraverseToDoList(fsen, rg, conflicts);
+ }
+ }
+ //Go through the stall sites
+ for(Iterator<FlatNode> codeit=oooa.getNodesWithPlans().iterator();codeit.hasNext();) {
+ FlatNode fn=codeit.next();
+ CodePlan cp=oooa.getCodePlan(fn);
+ FlatSESEEnterNode currentSESE=cp.getCurrentSESE();
+ Analysis.OoOJava.ConflictGraph graph = oooa.getConflictGraph(currentSESE);
+
+ if(graph!=null){
+ Set<Analysis.OoOJava.SESELock> seseLockSet = oooa.getLockMappings(graph);
+ Set<Analysis.OoOJava.WaitingElement> waitingElementSet =
+ graph.getStallSiteWaitingElementSet(fn, seseLockSet);
+
+ if(waitingElementSet.size()>0){
+ for (Iterator iterator = waitingElementSet.iterator(); iterator.hasNext();) {
+ Analysis.OoOJava.WaitingElement waitingElement = (Analysis.OoOJava.WaitingElement) iterator.next();
+
+ Analysis.OoOJava.ConflictGraph conflictGraph = graph;
+ Hashtable<Taint, Set<Effect>> conflicts;
+ ReachGraph rg = oooa.getDisjointAnalysis().getReachGraph(currentSESE.getmdEnclosing());
+ if(cSideDebug) {
+ rg.writeGraph("RCR_RG_STALLSITE_DEBUG");
+ }
+ if((conflictGraph != null) &&
+ (conflicts = graph.getConflictEffectSet(fn)) != null &&
+ (rg != null)){
+ addToTraverseToDoList(fn, waitingElement.getTempDesc(), rg, conflicts);
+ }
+ }
+ }
+ }
+ }
+
+ buildEffectsLookupStructure();
+ runAllTraversals();
+ }