class FieldInstruction extends DexlibAbstractInstruction {

  public FieldInstruction(Instruction instruction, int codeAdress) {
    super(instruction, codeAdress);
  }

  /**
   * Return a static SootFieldRef for a dexlib FieldReference.
   *
   * @param item
   *          the dexlib FieldReference.
   */
  protected SootFieldRef getStaticSootFieldRef(FieldReference fref) {
    return getSootFieldRef(fref, true);
  }

  /**
   * Return a SootFieldRef for a dexlib FieldReference.
   *
   * @param item
   *          the dexlib FieldReference.
   */
  protected SootFieldRef getSootFieldRef(FieldReference fref) {
    return getSootFieldRef(fref, false);
  }

  /**
   * Return a SootFieldRef for a dexlib FieldReference.
   *
   * @param item
   *          the dexlib FieldReference.
   * @param isStatic
   *          if the FieldRef should be static
   */
  private SootFieldRef getSootFieldRef(FieldReference fref, boolean isStatic) {
    String className = dottedClassName(fref.getDefiningClass());
    SootClass sc = SootResolver.v().makeClassRef(className);
    return Scene.v().makeFieldRef(sc, fref.getName(), DexType.toSoot(fref.getType()), isStatic);
  }

  /**
   * Check if the field type equals the type of the value that will be stored in the field. A cast expression has to be
   * introduced for the unequal case.
   *
   * @return assignment statement which hold a cast or not depending on the types of the operation
   */
  protected AssignStmt getAssignStmt(DexBody body, Local sourceValue, ConcreteRef instanceField) {
    AssignStmt assign;
    // Type targetType = getTargetType(body);
    // if(targetType != UnknownType.v() && targetType != sourceValue.getType() && ! (targetType instanceof RefType)) {
    // CastExpr castExpr = Jimple.v().newCastExpr(sourceValue, targetType);
    // Local local = body.generateLocal(targetType);
    // assign = Jimple.v().newAssignStmt(local, castExpr);
    // body.add(assign);
    // beginUnit = assign;
    // assign = Jimple.v().newAssignStmt(instanceField, local);
    // }
    // else {
    assign = Jimple.v().newAssignStmt(instanceField, sourceValue);
    // }
    return assign;
  }

  @Override
  boolean isUsedAsFloatingPoint(DexBody body, int register) {
    return sourceRegister() == register && isFloatLike(getTargetType(body));
  }

  /**
   * Return the source register for this instruction.
   */
  private int sourceRegister() {<FILL_FUNCTION_BODY>}

  /**
   * Return the target type for put instructions.
   *
   * Putters should override this.
   *
   * @param body
   *          the body containing this instruction
   */
  protected Type getTargetType(DexBody body) {
    return UnknownType.v();
  }

  @Override
  public Set<Type> introducedTypes() {
    Set<Type> types = new HashSet<Type>();
    // Aput instructions don't have references
    if (!(instruction instanceof ReferenceInstruction)) {
      return types;
    }

    ReferenceInstruction i = (ReferenceInstruction) instruction;

    FieldReference field = (FieldReference) i.getReference();

    types.add(DexType.toSoot(field.getType()));
    types.add(DexType.toSoot(field.getDefiningClass()));
    return types;
  }
}

    // I hate smali's API ..
    if (instruction instanceof Instruction23x) {
      return ((Instruction23x) instruction).getRegisterA();
    } else if (instruction instanceof Instruction22c) {
      return ((Instruction22c) instruction).getRegisterA();
    } else if (instruction instanceof Instruction21c) {
      return ((Instruction21c) instruction).getRegisterA();
    } else {
      throw new RuntimeException("Instruction is not a instance, array or static op");
    }
  
<methods>public void <init>(org.jf.dexlib2.iface.instruction.Instruction, int) ,public org.jf.dexlib2.iface.instruction.Instruction getInstruction() ,public int getLineNumber() ,public soot.Unit getUnit() ,public Set<soot.Type> introducedTypes() ,public abstract void jimplify(soot.dexpler.DexBody) ,public void setLineNumber(int) <variables>protected final non-sealed int codeAddress,protected final non-sealed org.jf.dexlib2.iface.instruction.Instruction instruction,protected int lineNumber,protected soot.Unit unit