public Body add(soot.jimple.Stmt stmt) { if(list != null) { list.add(stmt); list = null; } stmt.addTag(currentSourceRangeTag()); soot.PatchingChain<Unit> chain = (soot.PatchingChain<Unit>)chains.peek(); if(stmt instanceof IdentityStmt && chain.size() != 0) { IdentityStmt idstmt = (IdentityStmt) stmt; if(!(idstmt.getRightOp() instanceof CaughtExceptionRef)) { soot.Unit s = chain.getFirst(); while(s instanceof IdentityStmt) s = chain.getSuccOf((soot.jimple.Stmt)s); if(s != null) { chain.insertBefore(stmt, (soot.jimple.Stmt)s); return this; } } } chain.add(stmt); return this; }
units.insertBefore(first, units.getFirst()); } else { first = (Unit) units.getSuccOf(first);
final Unit first = precedingFirstNotIdentity == null ? units.getFirst() : precedingFirstNotIdentity; final Unit firstReorderingUnit = units.getSuccOf(first);
units.insertBefore(list, units.getFirst());
/** * Constructs a graph for the blocks found by partitioning the * the units in a {@link ClassicCompleteUnitGraph}. * * @param unitGraph A {@link ClassicCompleteUnitGraph} built from * <tt>body</tt>. The <tt>CompleteBlockGraph</tt> constructor uses * the passed <tt>graph</tt> to split the body into * blocks. */ public ClassicCompleteBlockGraph(ClassicCompleteUnitGraph unitGraph) { super(unitGraph); // Adjust the heads and tails to match the old CompleteBlockGraph. Unit entryPoint = (Unit) (getBody().getUnits().getFirst()); List newHeads = new ArrayList(1); for (Iterator blockIt = getBlocks().iterator(); blockIt.hasNext(); ) { Block b = (Block) blockIt.next(); if (b.getHead() == entryPoint) { newHeads.add(b); break; } } mHeads = Collections.unmodifiableList(newHeads); mTails = Collections.EMPTY_LIST; } }
/** * Constructs a graph for the blocks found by partitioning the * the units in a {@link ClassicCompleteUnitGraph}. * * @param unitGraph A {@link ClassicCompleteUnitGraph} built from * <tt>body</tt>. The <tt>CompleteBlockGraph</tt> constructor uses * the passed <tt>graph</tt> to split the body into * blocks. */ public ClassicCompleteBlockGraph(ClassicCompleteUnitGraph unitGraph) { super(unitGraph); // Adjust the heads and tails to match the old CompleteBlockGraph. Unit entryPoint = (Unit) (getBody().getUnits().getFirst()); List newHeads = new ArrayList(1); for (Iterator blockIt = getBlocks().iterator(); blockIt.hasNext(); ) { Block b = (Block) blockIt.next(); if (b.getHead() == entryPoint) { newHeads.add(b); break; } } mHeads = Collections.unmodifiableList(newHeads); mTails = Collections.EMPTY_LIST; } }
if (!meth.isConcrete()) continue; Body body = meth.retrieveActiveBody(); Stmt s = (Stmt)body.getUnits().getFirst(); while (s instanceof IdentityStmt){ s = (Stmt)body.getUnits().getSuccOf(s); if (!meth.isConcrete()) continue; Body body = meth.retrieveActiveBody(); Stmt s = (Stmt)body.getUnits().getFirst(); while (s instanceof IdentityStmt){ s = (Stmt)body.getUnits().getSuccOf(s);
if (!meth.isConcrete()) continue; Body body = meth.retrieveActiveBody(); Stmt s = (Stmt)body.getUnits().getFirst(); while (s instanceof IdentityStmt){ s = (Stmt)body.getUnits().getSuccOf(s); if (!meth.isConcrete()) continue; Body body = meth.retrieveActiveBody(); Stmt s = (Stmt)body.getUnits().getFirst(); while (s instanceof IdentityStmt){ s = (Stmt)body.getUnits().getSuccOf(s);
startPoints.addLast(body.getUnits().getFirst());
startPoints.addLast(body.getUnits().getFirst());
Unit head = units.getFirst(); unitGraph = new CompleteUnitGraph(sootBody);
for (SootMethod ep : Scene.v().getEntryPoints()) { if (ep.isConcrete()) { problem.getInitialSeeds().add(ep.getActiveBody().getUnits().getFirst());
units.insertBefore( list, units.getFirst() );
units.insertBefore( list, units.getFirst() );