class ConditionalBranchFolder extends BodyTransformer {
  private static final Logger logger = LoggerFactory.getLogger(ConditionalBranchFolder.class);

  public ConditionalBranchFolder(Singletons.Global g) {
  }

  public static ConditionalBranchFolder v() {
    return G.v().soot_jimple_toolkits_scalar_ConditionalBranchFolder();
  }

  @Override
  protected void internalTransform(Body body, String phaseName, Map<String, String> options) {<FILL_FUNCTION_BODY>} // foldBranches
}

    StmtBody stmtBody = (StmtBody) body;

    if (Options.v().verbose()) {
      logger.debug("[" + stmtBody.getMethod().getName() + "] Folding conditional branches...");
    }

    int numTrue = 0, numFalse = 0;
    Chain<Unit> units = stmtBody.getUnits();
    for (Iterator<Unit> it = units.snapshotIterator(); it.hasNext();) {
      Unit stmt = it.next();
      if (stmt instanceof IfStmt) {
        IfStmt ifs = (IfStmt) stmt;
        // check for constant-valued conditions
        Value cond = Evaluator.getConstantValueOf(ifs.getCondition());
        if (cond != null) {
          assert (cond instanceof IntConstant);
          if (((IntConstant) cond).value == 1) {
            // if condition always true, convert if to goto
            units.swapWith(stmt, Jimple.v().newGotoStmt(ifs.getTarget()));
            numTrue++;
          } else {
            // if condition is always false, just remove it
            assert (((IntConstant) cond).value == 0);// only true/false
            units.remove(stmt);
            numFalse++;
          }
        }
      }
    }

    if (Options.v().verbose()) {
      logger.debug(
          "[" + stmtBody.getMethod().getName() + "]     Folded " + numTrue + " true, " + numFalse + " conditional branches");
    }
  
<methods>public non-sealed void <init>() ,public final void transform(soot.Body, java.lang.String, Map<java.lang.String,java.lang.String>) ,public final void transform(soot.Body, java.lang.String) ,public final void transform(soot.Body) <variables>private static final Map<java.lang.String,java.lang.String> enabledOnlyMap