class IdentityCastEliminator extends BodyTransformer {

  public IdentityCastEliminator(Singletons.Global g) {
  }

  public static IdentityCastEliminator v() {
    return G.v().soot_jimple_toolkits_scalar_IdentityCastEliminator();
  }

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

    for (Iterator<Unit> unitIt = b.getUnits().iterator(); unitIt.hasNext();) {
      Unit curUnit = unitIt.next();
      if (curUnit instanceof AssignStmt) {
        final AssignStmt assignStmt = (AssignStmt) curUnit;
        final Value leftOp = assignStmt.getLeftOp();
        final Value rightOp = assignStmt.getRightOp();
        if (leftOp instanceof Local && rightOp instanceof CastExpr) {
          final CastExpr ce = (CastExpr) rightOp;
          final Value castOp = ce.getOp();

          // If this a cast such as a = (X) a, we can remove the whole line.
          // Otherwise, if only the types match, we can replace the typecast
          // with a normal assignment.
          if (castOp.getType() == ce.getCastType()) {
            if (leftOp == castOp) {
              unitIt.remove();
            } else {
              assignStmt.setRightOp(castOp);
            }
          }
        }
      }
    }
  
<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