congrats Icon
New! Tabnine Pro 14-day free trial
Start a free trial
Tabnine Logo
IfStmt
Code IndexAdd Tabnine to your IDE (free)

How to use
IfStmt
in
soot.jimple

Best Java code snippets using soot.jimple.IfStmt (Showing top 20 results out of 315)

origin: Sable/soot

public IfStmt newIfStmt(IfStmt s) {
 return new GIfStmt(s.getCondition(), s.getTarget());
}
origin: Sable/soot

public void caseIfStmt(IfStmt s) {
 IfStmt newStmt = (IfStmt) (oldToNew.get(s));
 newStmt.setTarget(oldToNew.get(newStmt.getTarget()));
}
origin: Sable/soot

public soot.jimple.IfStmt newIfStmt(Value op, Unit target, ASTNode location) {
 soot.jimple.IfStmt stmt = Jimple.v().newIfStmt(op, target);
 soot.tagkit.Tag tag = getTag(op);
 if(tag != null) stmt.getConditionBox().addTag(tag);
 return stmt;
}
origin: Sable/soot

if (s instanceof IfStmt) {
 IfStmt ifStmt = (IfStmt) s;
 Value cond = ifStmt.getCondition();
 Constant constant = SEvaluator.getFuzzyConstantValueOf(cond, localToConstant);
  GotoStmt gotoStmt = Jimple.v().newGotoStmt(ifStmt.getTargetBox());
  stmtToReplacement.put(ifStmt, gotoStmt);
origin: Sable/soot

 private boolean sameCondLocal(Stmt s1, Stmt s2) {
  AssignStmt as1 = (AssignStmt) s1;
  IfStmt is2 = (IfStmt) s2;
  if (is2.getCondition() instanceof BinopExpr) {
   BinopExpr bs2 = (BinopExpr) is2.getCondition();
   if (as1.getLeftOp().equals(bs2.getOp1())) {
    return true;
   }
  }
  return false;
 }
}
origin: Sable/soot

private boolean sameTarget(Stmt s1, Stmt s2) {
 IfStmt is1 = (IfStmt) s1;
 IfStmt is2 = (IfStmt) s2;
 if (is1.getTarget().equals(is2.getTarget())) {
  return true;
 }
 return false;
}
origin: Sable/soot

if (cycle_body.contains(asg.get_AugStmt(condition.getTarget())) == false) {
 condition.setCondition(ConditionFlipper.flip((ConditionExpr) condition.getCondition()));
origin: Sable/soot

 units.insertAfter(jgs, u);
 JGotoStmt jumper = new JGotoStmt((Unit) ifs.getTarget());
 units.insertAfter(jumper, jgs);
 ifs.setTarget((Unit) jumper);
 javafy(((IfStmt) s).getConditionBox());
} else if (s instanceof ThrowStmt) {
 javafy(((ThrowStmt) s).getOpBox());
origin: Sable/soot

 ((IfStmt) s).setTarget(b.succ.elementAt(1).getHeadJStmt());
} else {
 ((IfStmt) s).setTarget(b.succ.firstElement().getHeadJStmt());
origin: jayhorn/jayhorn

/**
 * Creates a new jimple IfStmt and adds all tags from createdFrom to this
 * statement.
 * 
 * @param condition
 * @param target
 * @param createdFrom
 * @return
 */
protected Unit ifStmtFor(Value condition, Unit target, Host createdFrom) {
  IfStmt stmt = Jimple.v().newIfStmt(condition, target);
  stmt.addAllTagsOf(createdFrom);
  return stmt;
}
origin: Sable/soot

@Override
public void caseIfStmt(IfStmt s) {
 result = result.add(mightThrow(s.getCondition()));
}
origin: Sable/soot

AugmentedStmt succIf = asg.get_AugStmt(ifs.getTarget()), succElse = (AugmentedStmt) as.bsuccs.get(0);
origin: Sable/soot

ifstmt.setTarget(u);
origin: Sable/soot

@Override
public void caseIfStmt(IfStmt stmt) {
 Stmt target = stmt.getTarget();
 exprV.setOrigStmt(stmt);
 exprV.setTargetForOffset(target);
 stmt.getCondition().apply(exprV);
}
origin: Sable/soot

public void caseIfStmt(IfStmt stmt) {
 this.handleBinopExpr((BinopExpr) stmt.getCondition(), stmt, BooleanType.v());
}
origin: Sable/soot

private void transformBody(Body b, Stmt next) {
 // change target of stmts 0 and 1 to target of stmt 5
 // remove stmts 2, 3, 4, 5
 Stmt newTarget = null;
 Stmt oldTarget = null;
 if (sameGoto) {
  newTarget = ((IfStmt) stmtSeq[5]).getTarget();
 } else {
  newTarget = next;
  oldTarget = ((IfStmt) stmtSeq[5]).getTarget();
 }
 ((IfStmt) stmtSeq[0]).setTarget(newTarget);
 ((IfStmt) stmtSeq[1]).setTarget(newTarget);
 for (int i = 2; i <= 5; i++) {
  b.getUnits().remove(stmtSeq[i]);
 }
 if (!sameGoto) {
  b.getUnits().insertAfter(Jimple.v().newGotoStmt(oldTarget), stmtSeq[1]);
 }
}
origin: secure-software-engineering/FlowDroid

/**
 * Eliminates all loops of length 0 (if a goto <if a>)
 * 
 * @param body The body from which to eliminate the self-loops
 */
protected void eliminateSelfLoops(Body body) {
  // Get rid of self-loops
  for (Iterator<Unit> unitIt = body.getUnits().iterator(); unitIt.hasNext();) {
    Unit u = unitIt.next();
    if (u instanceof IfStmt) {
      IfStmt ifStmt = (IfStmt) u;
      if (ifStmt.getTarget() == ifStmt)
        unitIt.remove();
    }
  }
}
origin: Sable/soot

units.insertBefore(Jimple.v().newAssignStmt(Jimple.v().newStaticFieldRef(classCacher.makeRef()), l), target);
ifStmt.setTarget(target);
return l;
origin: Sable/soot

body.getUnits().add(ifStmt);
Util.addLnPosTags(ifStmt.getConditionBox(), assertStmt.cond().position());
Util.addLnPosTags(ifStmt, assertStmt.position());
origin: Sable/soot

public void caseIfStmt(IfStmt stmt) {
 String varName = printValueAssignment(stmt.getCondition(), "condition");
 Unit target = stmt.getTarget();
 vtp.suggestVariableName("target");
 String targetName = vtp.getLastAssignedVarName();
 p.println("Unit " + targetName + "=" + nameOfJumpTarget(target) + ";");
 printStmt(stmt, varName, targetName);
}
soot.jimpleIfStmt

Most used methods

  • getTarget
  • getCondition
  • setTarget
  • addAllTagsOf
  • getConditionBox
  • getTargetBox
  • setCondition
    condition must be soot.jimple.ConditionExpr

Popular in Java

  • Reading from database using SQL prepared statement
  • onRequestPermissionsResult (Fragment)
  • getResourceAsStream (ClassLoader)
  • getSupportFragmentManager (FragmentActivity)
  • Kernel (java.awt.image)
  • SortedMap (java.util)
    A map that has its keys ordered. The sorting is according to either the natural ordering of its keys
  • CountDownLatch (java.util.concurrent)
    A synchronization aid that allows one or more threads to wait until a set of operations being perfor
  • SSLHandshakeException (javax.net.ssl)
    The exception that is thrown when a handshake could not be completed successfully.
  • ServletException (javax.servlet)
    Defines a general exception a servlet can throw when it encounters difficulty.
  • Option (scala)
  • 14 Best Plugins for Eclipse
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimAtomGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyStudentsTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now