Codota Logo
IfStmt
Code IndexAdd Codota 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)

  • Common ways to obtain IfStmt
private void myMethod () {
IfStmt i =
  • Codota IconValue condition;Jimple.v().newIfStmt(condition, new FutureStmt())
  • Codota IconValue condition;Unit target;new JIfStmt(condition, target)
  • Codota IconValue condition;UnitBox target;new JIfStmt(condition, target)
  • Smart code suggestions by Codota
}
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

  • Reactive rest calls using spring rest template
  • putExtra (Intent)
  • getExternalFilesDir (Context)
  • onRequestPermissionsResult (Fragment)
  • Date (java.util)
    A specific moment in time, with millisecond precision. Values typically come from System#currentTime
  • Deque (java.util)
    A linear collection that supports element insertion and removal at both ends. The name deque is shor
  • Filter (javax.servlet)
    A filter is an object that performs filtering tasks on either the request to a resource (a servlet o
  • JCheckBox (javax.swing)
  • JTextField (javax.swing)
  • XPath (javax.xml.xpath)
    XPath provides access to the XPath evaluation environment and expressions. Evaluation of XPath Expr
Codota Logo
  • Products

    Search for Java codeSearch for JavaScript codeEnterprise
  • IDE Plugins

    IntelliJ IDEAWebStormAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimAtomGoLandRubyMineEmacsJupyter
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogCodota Academy Plugin user guide Terms of usePrivacy policyJava Code IndexJavascript Code Index
Get Codota for your IDE now