class FastDexTrapTightener extends BodyTransformer {

  public FastDexTrapTightener(Singletons.Global g) {
  }

  public static FastDexTrapTightener v() {
    return soot.G.v().soot_toDex_FastDexTrapTightener();
  }

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

  private boolean isDexInstruction(Unit unit) {
    if (unit instanceof IdentityStmt) {
      IdentityStmt is = (IdentityStmt) unit;
      return !(is.getRightOp() instanceof ThisRef || is.getRightOp() instanceof ParameterRef);
    }
    return true;
  }

}

    for (Iterator<Trap> trapIt = b.getTraps().snapshotIterator(); trapIt.hasNext();) {
      Trap t = trapIt.next();

      Unit beginUnit;
      while (!isDexInstruction(beginUnit = t.getBeginUnit()) && t.getBeginUnit() != t.getEndUnit()) {
        t.setBeginUnit(b.getUnits().getSuccOf(beginUnit));
      }

      // If the trap is empty, we remove it
      if (t.getBeginUnit() == t.getEndUnit()) {
        trapIt.remove();
      }
    }
  
<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