public IterableSet(Collection<T> c) { super(); addAll(c); }
public void add_CatchBody(IterableSet<AugmentedStmt> newCatchBody, SootClass except) { if (catchList == null) { catchList = new LinkedList<IterableSet<AugmentedStmt>>(); catchList.addLast(catchBody); catch2except = new HashMap<IterableSet<AugmentedStmt>, SootClass>(); catch2except.put(catchBody, exception); } body.addAll(newCatchBody); catchList.addLast(newCatchBody); catch2except.put(newCatchBody, except); }
public Object clone() { IterableSet<T> s = new IterableSet<T>(); s.addAll(this); return s; }
public void add_ExceptionSet(Object node, IterableSet s) { IterableSet fullSet = node2ExceptionSet.get(node); if (fullSet == null) { fullSet = new IterableSet(); node2ExceptionSet.put(node, fullSet); } fullSet.addAll(s); }
public void refresh_CatchBody(ExceptionFinder ef) { if (catchBody != null) { body.removeAll(catchBody); } catchBody = ef.get_CatchBody(handlerAugmentedStmt); body.addAll(catchBody); }
public void analyseInvokeExpr(InvokeExpr ie) { curExceptionSet.addAll(ie.getMethod().getExceptions()); }
public IterableSet get_NaturalExits() { IterableSet c = new IterableSet(); IterableSet ifChain = body2childChain.get(ifBody); if (ifChain.isEmpty() == false) { c.addAll(((SETNode) ifChain.getLast()).get_NaturalExits()); } IterableSet elseChain = body2childChain.get(elseBody); if (elseChain.isEmpty() == false) { c.addAll(((SETNode) elseChain.getLast()).get_NaturalExits()); } return c; }
private boolean verify_ESuccs(AugmentedStmt as, IterableSet ref) { IterableSet esuccs = new IterableSet(); esuccs.addAll(as.csuccs); esuccs.removeAll(as.bsuccs); // System.out.println("ESUCCS are:"+esuccs); // System.out.println("ref are:"+ref); return esuccs.equals(ref); }
passingSet.addAll(get_ExceptionSet(cit.next()));
private boolean checkProtectionArea(AugmentedStmt as, DefinitionStmt s) { IterableSet esuccs = new IterableSet(); esuccs.addAll(as.csuccs); esuccs.removeAll(as.bsuccs); // esuccs contains the exception sucessors of as // System.out.println("ESUCCS are:"+esuccs); Iterator it = esuccs.iterator(); while (it.hasNext()) { // going through each exception sucessor AugmentedStmt tempas = (AugmentedStmt) it.next(); Stmt temps = tempas.get_Stmt(); if (temps instanceof GotoStmt) { Unit target = ((GotoStmt) temps).getTarget(); if (target != s) { // System.out.println("DID NOT Match indirectly"); return false; } else { // System.out.println("Matched indirectly"); } } else { if (temps != s) { // System.out.println("DID NOT Match directly"); return false; } else { // System.out.println("Matched directly"); } } } return true; }
worklist.addAll(monitorEnterSet);
labeledBlockBody.addAll(child.get_Body());
children.addAll(childOrdering);
public void find(DavaBody body, AugmentedStmtGraph asg, SETNode SET) throws RetriggerAnalysisException { Dava.v().log("ExceptionFinder::find()"); for (ExceptionNode en : body.get_ExceptionFacts()) { if (body.get_SynchronizedBlockFacts().contains(en)) { continue; } IterableSet<AugmentedStmt> fullBody = new IterableSet<AugmentedStmt>(); for (IterableSet<AugmentedStmt> is : en.get_CatchList()) { fullBody.addAll(is); } fullBody.addAll(en.get_TryBody()); if (SET.nest(new SETTryNode(fullBody, en, asg, body)) == false) { throw new RetriggerAnalysisException(); } } }
node_list.addAll(cal);