public Iterator<MethodOrMethodContext> iterator(Iterator<? extends MethodOrMethodContext> methods) { Set<MethodOrMethodContext> s = new HashSet<MethodOrMethodContext>(); ArrayList<MethodOrMethodContext> worklist = new ArrayList<MethodOrMethodContext>(); while (methods.hasNext()) { MethodOrMethodContext method = methods.next(); if (s.add(method)) { worklist.add(method); } } return iterator(s, worklist); }
public Iterator<MethodOrMethodContext> iterator(MethodOrMethodContext momc) { ArrayList<MethodOrMethodContext> methods = new ArrayList<MethodOrMethodContext>(); Iterator<Edge> it = cg.edgesOutOf(momc); if (filter != null) { it = filter.wrap(it); } while (it.hasNext()) { Edge e = (Edge) it.next(); methods.add(e.getTgt()); } return iterator(methods.iterator()); }
public Iterator<MethodOrMethodContext> iterator(Unit u) { ArrayList<MethodOrMethodContext> methods = new ArrayList<MethodOrMethodContext>(); Iterator<Edge> it = cg.edgesOutOf(u); if (filter != null) { it = filter.wrap(it); } while (it.hasNext()) { Edge e = (Edge) it.next(); methods.add(e.getTgt()); } return iterator(methods.iterator()); }
tn1.transitiveTargets = new HashSet<MethodOrMethodContext>(); for (Unit tn1Invoke : tn1.invokes) { Iterator<MethodOrMethodContext> targetIt = tt.iterator(tn1Invoke); while (targetIt.hasNext()) { tn1.transitiveTargets.add(targetIt.next());
HashSet read = new HashSet(); HashSet write = new HashSet(); Iterator<MethodOrMethodContext> it = tt.iterator(s); while (it.hasNext()) { SootMethod target = (SootMethod) it.next();
Iterator<MethodOrMethodContext> mayRunIt = runMethodTargets.iterator(start); // fails for some call graphs while (mayRunIt.hasNext()) { SootMethod runMethod = (SootMethod) mayRunIt.next();
tn1.transitiveTargets = new HashSet<MethodOrMethodContext>(); for (Unit tn1Invoke : tn1.invokes) { Iterator<MethodOrMethodContext> targetIt = tt.iterator(tn1Invoke); while (targetIt.hasNext()) { tn1.transitiveTargets.add(targetIt.next());
public RWSet readSet(SootMethod method, Stmt stmt) { RWSet ret = null; Iterator<MethodOrMethodContext> targets = tt.iterator(stmt); while (targets.hasNext()) { SootMethod target = (SootMethod) targets.next(); if (target.isNative()) { if (ret == null) { ret = new SiteRWSet(); } ret.setCallsNative(); } else if (target.isConcrete()) { RWSet ntr = nonTransitiveReadSet(target); if (ntr != null) { if (ret == null) { ret = new SiteRWSet(); } ret.union(ntr); } } } if (ret == null) { return ntReadSet(method, stmt); } ret.union(ntReadSet(method, stmt)); return ret; }
public RWSet writeSet(SootMethod method, Stmt stmt) { RWSet ret = null; Iterator<MethodOrMethodContext> targets = tt.iterator(stmt); while (targets.hasNext()) { SootMethod target = (SootMethod) targets.next(); if (target.isNative()) { if (ret == null) { ret = new SiteRWSet(); } ret.setCallsNative(); } else if (target.isConcrete()) { RWSet ntw = nonTransitiveWriteSet(target); if (ntw != null) { if (ret == null) { ret = new SiteRWSet(); } ret.union(ntw); } } } if (ret == null) { return ntWriteSet(method, stmt); } ret.union(ntWriteSet(method, stmt)); return ret; }
RWSet ret = new CodeBlockRWSet(); tve.setExemptTransaction(tn); Iterator<MethodOrMethodContext> targets = tt.iterator(stmt); while (!ignore && targets.hasNext()) { SootMethod target = (SootMethod) targets.next();
RWSet ret = new CodeBlockRWSet(); tve.setExemptTransaction(tn); Iterator<MethodOrMethodContext> targets = tt.iterator(stmt); while (!ignore && targets.hasNext()) { SootMethod target = (SootMethod) targets.next();
public Iterator<MethodOrMethodContext> iterator( Iterator<MethodOrMethodContext> methods ) { Set<MethodOrMethodContext> s = new HashSet<MethodOrMethodContext>(); ArrayList<MethodOrMethodContext> worklist = new ArrayList<MethodOrMethodContext>(); while( methods.hasNext() ) { MethodOrMethodContext method = methods.next(); if( s.add( method ) ) worklist.add( method ); } return iterator( s, worklist ); } private Iterator<MethodOrMethodContext> iterator( Set<MethodOrMethodContext> s, ArrayList<MethodOrMethodContext> worklist ) {
public Iterator<MethodOrMethodContext> iterator( Iterator<MethodOrMethodContext> methods ) { Set<MethodOrMethodContext> s = new HashSet<MethodOrMethodContext>(); ArrayList<MethodOrMethodContext> worklist = new ArrayList<MethodOrMethodContext>(); while( methods.hasNext() ) { MethodOrMethodContext method = methods.next(); if( s.add( method ) ) worklist.add( method ); } return iterator( s, worklist ); } private Iterator<MethodOrMethodContext> iterator( Set<MethodOrMethodContext> s, ArrayList<MethodOrMethodContext> worklist ) {
public Iterator<MethodOrMethodContext> iterator( Unit u ) { ArrayList<MethodOrMethodContext> methods = new ArrayList<MethodOrMethodContext>(); Iterator it = cg.edgesOutOf( u ); if( filter != null ) it = filter.wrap( it ); while( it.hasNext() ) { Edge e = (Edge) it.next(); methods.add( e.getTgt() ); } return iterator( methods.iterator() ); } public Iterator<MethodOrMethodContext> iterator( MethodOrMethodContext momc ) {
public Iterator<MethodOrMethodContext> iterator( MethodOrMethodContext momc ) { ArrayList<MethodOrMethodContext> methods = new ArrayList<MethodOrMethodContext>(); Iterator it = cg.edgesOutOf( momc ); if( filter != null ) it = filter.wrap( it ); while( it.hasNext() ) { Edge e = (Edge) it.next(); methods.add( e.getTgt() ); } return iterator( methods.iterator() ); } public Iterator<MethodOrMethodContext> iterator( Iterator<MethodOrMethodContext> methods ) {
public Iterator<MethodOrMethodContext> iterator( MethodOrMethodContext momc ) { ArrayList<MethodOrMethodContext> methods = new ArrayList<MethodOrMethodContext>(); Iterator it = cg.edgesOutOf( momc ); if( filter != null ) it = filter.wrap( it ); while( it.hasNext() ) { Edge e = (Edge) it.next(); methods.add( e.getTgt() ); } return iterator( methods.iterator() ); } public Iterator<MethodOrMethodContext> iterator( Iterator<MethodOrMethodContext> methods ) {
public Iterator<MethodOrMethodContext> iterator( Unit u ) { ArrayList<MethodOrMethodContext> methods = new ArrayList<MethodOrMethodContext>(); Iterator it = cg.edgesOutOf( u ); if( filter != null ) it = filter.wrap( it ); while( it.hasNext() ) { Edge e = (Edge) it.next(); methods.add( e.getTgt() ); } return iterator( methods.iterator() ); } public Iterator<MethodOrMethodContext> iterator( MethodOrMethodContext momc ) {
public RWSet writeSet( SootMethod method, Stmt stmt ) { RWSet ret = null; Iterator<MethodOrMethodContext> targets = tt.iterator( stmt ); while( targets.hasNext() ) { SootMethod target = (SootMethod) targets.next(); if( target.isNative() ) { if( ret == null ) ret = new SiteRWSet(); ret.setCallsNative(); } else if( target.isConcrete() ) { RWSet ntw = nonTransitiveWriteSet(target); if( ntw != null ) { if( ret == null ) ret = new SiteRWSet(); ret.union( ntw ); } } } if( ret == null ) return ntWriteSet( method, stmt ); ret.union( ntWriteSet( method, stmt ) ); return ret; }
public RWSet readSet( SootMethod method, Stmt stmt ) { RWSet ret = null; Iterator<MethodOrMethodContext> targets = tt.iterator( stmt ); while( targets.hasNext() ) { SootMethod target = (SootMethod) targets.next(); if( target.isNative() ) { if( ret == null ) ret = new SiteRWSet(); ret.setCallsNative(); } else if( target.isConcrete() ) { RWSet ntr = nonTransitiveReadSet(target); if( ntr != null ) { if( ret == null ) ret = new SiteRWSet(); ret.union( ntr ); } } } if( ret == null ) return ntReadSet( method, stmt ); ret.union( ntReadSet( method, stmt ) ); return ret; }
public RWSet writeSet( SootMethod method, Stmt stmt ) { RWSet ret = null; Iterator<MethodOrMethodContext> targets = tt.iterator( stmt ); while( targets.hasNext() ) { SootMethod target = (SootMethod) targets.next(); if( target.isNative() ) { if( ret == null ) ret = new SiteRWSet(); ret.setCallsNative(); } else if( target.isConcrete() ) { RWSet ntw = nonTransitiveWriteSet(target); if( ntw != null ) { if( ret == null ) ret = new SiteRWSet(); ret.union( ntw ); } } } if( ret == null ) return ntWriteSet( method, stmt ); ret.union( ntWriteSet( method, stmt ) ); return ret; }