private void incrementIntVariable(final Variable var,
                                          final int amount) {
            if (amount == 0) {
                return;
            }

            final Class<?> clazz = var.getType().getNaturalClass();

            LocalVariable local = getLocalVariable(var);
            if (local != null && clazz == int.class) {
                mBuilder.integerIncrement(local, amount);
            }
            else {
                storeToVariable(var, new Runnable() {
                    public void run() {
                        loadFromVariable(var);

                        if (clazz == int.class) {
                            if (amount >= 0) {
                                mBuilder.loadConstant(amount);
                                mBuilder.math(Opcode.IADD);
                            }
                            else {
                                mBuilder.loadConstant(-amount);
                                mBuilder.math(Opcode.ISUB);
                            }
                        }
                        else if (clazz == long.class) {
                            if (amount >= 0) {
                                mBuilder.loadConstant((long)amount);
                                mBuilder.math(Opcode.LADD);
                            }
                            else {
                                mBuilder.loadConstant((long)-amount);
                                mBuilder.math(Opcode.LSUB);
                            }
                        }
                    }
                });
            }
        }