assign.setLeftOp(newLocal); retStmt.setOp(newLocal);
Value origLHS = origCalc.getLeftOp(); origCalc.setLeftOp(l);
Unit u = Util.findLastIdentityUnit(jb, assign); units.insertAfter(assignStmt, u); assign.setLeftOp(newlocal);
@Override protected void internalTransform(Body b, String phaseName, Map<String, String> options) { // Some apps reference static fields as instance fields. We need to fix // this for not breaking the client analysis. for (Iterator<Unit> unitIt = b.getUnits().iterator(); unitIt.hasNext();) { Stmt s = (Stmt) unitIt.next(); if (s.containsFieldRef() && s instanceof AssignStmt) { FieldRef ref = s.getFieldRef(); // Make sure that the target class has already been loaded if (isTypeLoaded(ref.getFieldRef().type())) { try { if (ref instanceof InstanceFieldRef) { SootField fld = ref.getField(); if (fld != null && fld.isStatic()) { AssignStmt assignStmt = (AssignStmt) s; if (assignStmt.getLeftOp() == ref) { assignStmt.setLeftOp(Jimple.v().newStaticFieldRef(ref.getField().makeRef())); } else if (assignStmt.getRightOp() == ref) { assignStmt.setRightOp(Jimple.v().newStaticFieldRef(ref.getField().makeRef())); } } } } catch (ConflictingFieldRefException ex) { // That field is broken, just don't touch it } } } } }
assign.setLeftOp(newlocal);
assign.setLeftOp(newlocal);
stmt.setLeftOp(this.uv.visit(lhs, tlhs, stmt)); } else if (lhs instanceof FieldRef) { tlhs = ((FieldRef) lhs).getFieldRef().type();
Value origLHS = origCalc.getLeftOp(); origCalc.setLeftOp(l);
Value origLHS = origCalc.getLeftOp(); origCalc.setLeftOp(l);
assign.setLeftOp(newlocal);
assign.setLeftOp(newlocal);
assign.setLeftOp(newlocal);
assign.setLeftOp(newlocal);