class DexNullInstanceofTransformer extends BodyTransformer {

  public static DexNullInstanceofTransformer v() {
    return new DexNullInstanceofTransformer();
  }

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

}

    for (Iterator<Unit> unitIt = b.getUnits().snapshotIterator(); unitIt.hasNext();) {
      Unit u = unitIt.next();
      if (u instanceof AssignStmt) {
        AssignStmt assignStmt = (AssignStmt) u;
        if (assignStmt.getRightOp() instanceof InstanceOfExpr) {
          InstanceOfExpr iof = (InstanceOfExpr) assignStmt.getRightOp();

          // If the operand of the "instanceof" expression is null or
          // the zero constant, we replace the whole operation with
          // its outcome "false"
          if (iof.getOp() == NullConstant.v()) {
            assignStmt.setRightOp(IntConstant.v(0));
          }
          if (iof.getOp() instanceof IntConstant && ((IntConstant) iof.getOp()).value == 0) {
            assignStmt.setRightOp(IntConstant.v(0));
          }
        }
      }
    }
  
<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