public static int getHeight(AbstractInsnNode insn, MethodNode method) {
        Stack<AbstractInsnNode> branches = new Stack<AbstractInsnNode>();
        int height = 0;
        branches.push(method.instructions.get(0));
        outie: while (branches.size() > 0) {
            AbstractInsnNode current = branches.pop();
            if (current == null)
                continue;
            height += calculateChange(current);
            AbstractInsnNode next = getNext(current);
            do {
                height += calculateChange(next);
                if (next.equals(insn)) {
                    break outie;
                }
                if (next instanceof JumpInsnNode) {
                    branches.push(getNext(next));
                    branches.push(jump(((JumpInsnNode) next).label, method));
                    break;
                }
            } while ((next = getNext(next)) != null);
        }
        return height;
    }