implements the visitor to find the constructors defined in getWatchedConstructors() and the method calls in getWatchedClassMethods()

@param seen
the opcode of the currently parsed instruction
547114
@Override
    public void sawOpcode(int seen) {
        Integer tosIsSyncColReg = null;
        try {
            stack.precomputation(this);

            if (seen == Const.INVOKESPECIAL) {
                tosIsSyncColReg = checkConstructors();
            } else if (seen == Const.INVOKESTATIC) {
                tosIsSyncColReg = checkStaticCreations();
            } else if ((seen == Const.INVOKEVIRTUAL) || (seen == Const.INVOKEINTERFACE)) {
                tosIsSyncColReg = checkSelfReturningMethods();
            } else if (isAStore(seen)) {
                dealWithStoring(seen);
            } else if (isALoad(seen)) {
                int reg = RegisterUtils.getALoadReg(this, seen);
                RegisterInfo cri = suspectLocals.get(Integer.valueOf(reg));
                if ((cri != null) && !cri.getIgnore()) {
                    tosIsSyncColReg = Integer.valueOf(reg);
                }
            } else if (((seen == Const.PUTFIELD) || (seen == Const.ARETURN)) && (stack.getStackDepth() > 0)) {
                OpcodeStack.Item item = stack.getStackItem(0);
                suspectLocals.remove(item.getUserValue());
            }

            if (!suspectLocals.isEmpty()) {
                if (isStandardInvoke(seen)) {
                    String sig = getSigConstantOperand();
                    int argCount = SignatureUtils.getNumParameters(sig);
                    if (stack.getStackDepth() >= argCount) {
                        for (int i = 0; i < argCount; i++) {
                            OpcodeStack.Item item = stack.getStackItem(i);
                            RegisterInfo cri = suspectLocals.get(item.getUserValue());
                            if (cri != null) {
                                if (SignatureUtils.similarPackages(SignatureUtils.getPackageName(SignatureUtils.stripSignature(getClassConstantOperand())),
                                        SignatureUtils.getPackageName(SignatureUtils.stripSignature(this.getClassName())), 2)) {
                                    cri.setPriority(LOW_PRIORITY);
                                } else {
                                    cri.setIgnore();
                                }
                            }
                        }
                    }
                } else if (seen == Const.MONITORENTER) {
                    // Assume if synchronized blocks are used then something
                    // tricky is going on.
                    // There is really no valid reason for this, other than
                    // folks who use
                    // synchronized blocks tend to know what's going on.
                    if (stack.getStackDepth() > 0) {
                        OpcodeStack.Item item = stack.getStackItem(0);
                        suspectLocals.remove(item.getUserValue());
                    }
                } else if ((seen == Const.AASTORE) && (stack.getStackDepth() > 0)) {
                    OpcodeStack.Item item = stack.getStackItem(0);
                    suspectLocals.remove(item.getUserValue());
                }
            }

            reportTroublesomeLocals();
        } finally {
            TernaryPatcher.pre(stack, seen);
            stack.sawOpcode(this, seen);
            TernaryPatcher.post(stack, seen);
            if ((tosIsSyncColReg != null) && (stack.getStackDepth() > 0)) {
                OpcodeStack.Item item = stack.getStackItem(0);
                item.setUserValue(tosIsSyncColReg);
            }
        }
    }
635755
private void processWatcher(MethodSpec.Builder createdMethodBuilder, ExecutableElement method) {
    Watch watch = method.getAnnotation(Watch.class);

    String exposedMethodName = exposeExistingJavaMethodToJs(method);
    String watcherTriggerMethodName = addNewMethodToProto();

    MethodSpec.Builder watcherMethodBuilder = MethodSpec
        .methodBuilder(watcherTriggerMethodName)
        .addModifiers(Modifier.PUBLIC)
        .addAnnotation(JsMethod.class)
        .returns(Object.class);

    String[] valueSplit = watch.value().split("\\.");

    String currentExpression = "";
    for (int i = 0; i < valueSplit.length - 1; i++) {
      currentExpression += valueSplit[i];
      watcherMethodBuilder.addStatement("if ($L == null) return null", currentExpression);
      currentExpression += ".";
    }

    watcherMethodBuilder.addStatement("return $L", watch.value());

    componentExposedTypeBuilder.addMethod(watcherMethodBuilder.build());

    createdMethodBuilder
        .addStatement("vue().$L(p.$L, p.$L, $T.of($L, $L))", "$watch",
            watcherTriggerMethodName, exposedMethodName, WatchOptions.class, watch.isDeep(),
            watch.isImmediate());
  }
484232
@Override
    public void sawOpcode(int seen) {
        boolean markAsValid = false;

        try {
            stack.precomputation(this);

            int pc = getPC();
            for (CodeException ex : exceptions) {
                if (pc == ex.getEndPC()) {
                    if (OpcodeUtils.isReturn(seen)) {
                        addCatchBlock(ex.getHandlerPC(), Integer.MAX_VALUE);
                    } else if ((seen == Const.GOTO) || (seen == Const.GOTO_W)) {
                        addCatchBlock(ex.getHandlerPC(), this.getBranchTarget());
                    } else {
                        addCatchBlock(ex.getHandlerPC(), Integer.MAX_VALUE);
                    }
                } else if (pc == ex.getHandlerPC()) {
                    removePreviousHandlers(pc);
                }
            }

            Iterator<CatchInfo> it = catchInfos.iterator();
            while (it.hasNext()) {
                try {
                    CatchInfo catchInfo = it.next();
                    if (pc == catchInfo.getStart()) {
                        if (!updateExceptionRegister(catchInfo, seen, pc)) {
                            it.remove();
                        }
                        break;
                    } else if (pc > catchInfo.getFinish()) {
                        it.remove();
                        break;
                    } else if ((pc > catchInfo.getStart()) && (pc <= catchInfo.getFinish())) {
                        if (seen == Const.INVOKESPECIAL) {
                            if (Values.CONSTRUCTOR.equals(getNameConstantOperand())) {
                                String className = getClassConstantOperand();
                                JavaClass exClass = Repository.lookupClass(className);
                                if (exClass.instanceOf(throwableClass)) {
                                    String sig = getSigConstantOperand();
                                    if ((sig.indexOf("Exception") >= 0) || (sig.indexOf("Throwable") >= 0) || (sig.indexOf("Error") >= 0)) {
                                        markAsValid = true;
                                        break;
                                    }
                                    if (exClass.instanceOf(assertionClass)) {
                                        // just ignore LEST for AssertionErrors
                                        markAsValid = true;
                                        break;
                                    }
                                }
                            } else if (isPossibleExBuilder(catchInfo.getRegister())) {
                                markAsValid = true;
                            }
                        } else if (seen == Const.INVOKEVIRTUAL) {
                            String methodName = getNameConstantOperand();
                            if ("initCause".equals(methodName) || "addSuppressed".equals(methodName)) {
                                if (stack.getStackDepth() > 1) {
                                    String className = getClassConstantOperand();
                                    JavaClass exClass = Repository.lookupClass(className);
                                    if (exClass.instanceOf(throwableClass)) {
                                        OpcodeStack.Item itm = stack.getStackItem(1);
                                        int reg = itm.getRegisterNumber();
                                        if (reg >= 0) {
                                            exReg.put(Integer.valueOf(reg), Boolean.TRUE);
                                        }
                                        markAsValid = true; // Fixes javac generated code
                                    }
                                }
                            } else if ((("getTargetException".equals(methodName) || "getCause".equals(methodName))
                                    && "java/lang/reflect/InvocationTargetException".equals(getClassConstantOperand()))
                                    || "java/io/UncheckedIOException".equals(getClassConstantOperand())) {
                                markAsValid = true;
                            } else if (isPossibleExBuilder(catchInfo.getRegister())) {
                                markAsValid = true;
                            }
                        } else if ((seen == Const.INVOKEINTERFACE) || (seen == Const.INVOKESTATIC)) {
                            if (isPossibleExBuilder(catchInfo.getRegister())) {
                                markAsValid = true;
                            }
                        } else if (seen == Const.ATHROW) {
                            if (stack.getStackDepth() > 0) {
                                OpcodeStack.Item itm = stack.getStackItem(0);
                                if ((itm.getRegisterNumber() != catchInfo.getRegister()) && (itm.getUserValue() == null)) {
                                    if (!isPre14Class(itm.getJavaClass())) {
                                        int priority = getPrevOpcode(1) == Const.MONITOREXIT ? LOW_PRIORITY : NORMAL_PRIORITY;
                                        bugReporter.reportBug(new BugInstance(this, BugType.LEST_LOST_EXCEPTION_STACK_TRACE.name(), priority).addClass(this)
                                                .addMethod(this).addSourceLine(this));
                                    }
                                    it.remove();
                                    break;
                                }
                            }
                            if (catchInfo.getFinish() == Integer.MAX_VALUE) {
                                catchInfo.setFinish(pc);
                            }

                        } else if (OpcodeUtils.isAStore(seen)) {
                            if (lastWasExitPoint) {
                                // crazy jdk6 finally block injection -- shut
                                // off detection
                                catchInfos.clear();
                                break;
                            }

                            if (stack.getStackDepth() > 0) {
                                OpcodeStack.Item itm = stack.getStackItem(0);
                                int reg = RegisterUtils.getAStoreReg(this, seen);
                                exReg.put(Integer.valueOf(reg), (Boolean) itm.getUserValue());
                                if ((reg == catchInfo.getRegister()) && (catchInfo.getFinish() == Integer.MAX_VALUE)) {
                                    it.remove();
                                }
                            }
                        } else if (OpcodeUtils.isALoad(seen)) {
                            Boolean valid = exReg.get(Integer.valueOf(RegisterUtils.getALoadReg(this, seen)));
                            if (valid != null) {
                                markAsValid = valid.booleanValue();
                            }
                        } else if (OpcodeUtils.isReturn(seen)) {
                            removeIndeterminateHandlers(pc);
                            break;
                        }
                    }
                } catch (ClassNotFoundException cnfe) {
                    bugReporter.reportMissingClass(cnfe);
                    it.remove();
                }
            }

            lastWasExitPoint = (seen == Const.GOTO) || (seen == Const.GOTO_W) || (seen == Const.ATHROW) || OpcodeUtils.isReturn(seen);
        } finally {
            TernaryPatcher.pre(stack, seen);
            stack.sawOpcode(this, seen);
            TernaryPatcher.post(stack, seen);
            if (markAsValid && (stack.getStackDepth() > 0)) {
                OpcodeStack.Item itm = stack.getStackItem(0);
                itm.setUserValue(Boolean.TRUE);
            }
        }
    }
1019802
@Override
    public void sawOpcode(int seen) {
        if (state == State.SAW_NOTHING) {
            if (seen == Const.INVOKESPECIAL) {
                state = State.SAW_INVOKESPECIAL;
            }
        } else if (state == State.SAW_INVOKESPECIAL) {
            handleInvokeSpecialState(seen);
        }
    }
422575
@Override
    public void sawOpcode(int seen) {
        try {
            stack.precomputation(this);

            if ((seen != Const.INVOKEVIRTUAL) || !"wait".equals(getNameConstantOperand()) || stack.getStackDepth() == 0) {
                return;
            }
            JavaClass cls = stack.getStackItem(0).getJavaClass();
            if (cls != null) {
                String clsName = cls.getClassName();
                if (concurrentAwaitClasses.contains(clsName)) {
                    bugReporter.reportBug(new BugInstance(this, BugType.SWCO_SUSPICIOUS_WAIT_ON_CONCURRENT_OBJECT.name(), NORMAL_PRIORITY).addClass(this)
                            .addMethod(this).addSourceLine(this));
                }
            }
        } catch (ClassNotFoundException cnfe) {
            bugReporter.reportMissingClass(cnfe);
        } finally {
            stack.sawOpcode(this, seen);
        }
    }
1001432
@Override
    public void sawOpcode(int seen) {
        int reg = -1;
        Object uValue = null;
        boolean sawAlias = false;
        boolean sawLoad = false;
        boolean sawNewArray = false;

        try {
            stack.precomputation(this);

            if (seen == Const.INVOKEINTERFACE) {
                String methodName = getNameConstantOperand();
                String signature = getSigConstantOperand();
                if ("size".equals(methodName) && SignatureBuilder.SIG_VOID_TO_INT.equals(signature)) {
                    if (stack.getStackDepth() > 0) {
                        OpcodeStack.Item itm = stack.getStackItem(0);
                        reg = isLocalCollection(itm);
                        if (reg >= 0) {
                            sawAlias = true;
                        }
                    }
                } else if ("get".equals(methodName) && SignatureBuilder.SIG_INT_TO_OBJECT.equals(signature)) {
                    if (stack.getStackDepth() > 1) {
                        OpcodeStack.Item itm = stack.getStackItem(1);
                        reg = isLocalCollection(itm);
                        if (reg >= 0) {
                            sawAlias = true;
                        }
                    }
                } else if (("keySet".equals(methodName) || "values".equals(methodName) || "iterator".equals(methodName) || "next".equals(methodName))
                        && (stack.getStackDepth() > 0)) {
                    OpcodeStack.Item itm = stack.getStackItem(0);
                    reg = isLocalCollection(itm);
                    if (reg >= 0) {
                        sawAlias = true;
                    }
                }
            } else if (OpcodeUtils.isIStore(seen) || OpcodeUtils.isAStore(seen)) {
                if (stack.getStackDepth() > 0) {
                    uValue = stack.getStackItem(0).getUserValue();
                    userValues.put(Integer.valueOf(RegisterUtils.getStoreReg(this, seen)), uValue);
                }
            } else if (OpcodeUtils.isILoad(seen) || OpcodeUtils.isALoad(seen)) {
                sawLoad = true;
            } else if (seen == Const.ANEWARRAY) {
                if (stack.getStackDepth() > 0) {
                    OpcodeStack.Item itm = stack.getStackItem(0);
                    uValue = itm.getUserValue();
                    sawNewArray = true;
                }
            } else if (seen == Const.IF_ICMPGE) {
                if (stack.getStackDepth() > 1) {
                    OpcodeStack.Item itm1 = stack.getStackItem(1);
                    OpcodeStack.Item itm2 = stack.getStackItem(0);
                    reg = itm1.getRegisterNumber();
                    if ((reg >= 0) && (itm1.couldBeZero())) {
                        uValue = itm2.getUserValue();
                        if (uValue != null) {
                            userValues.put(Integer.valueOf(reg), uValue);
                        }
                    }
                }
            } else if ((seen >= Const.IASTORE) && (seen <= Const.SASTORE)) {
                if (stack.getStackDepth() > 2) {
                    OpcodeStack.Item arItem = stack.getStackItem(2);
                    OpcodeStack.Item idxItem = stack.getStackItem(1);
                    OpcodeStack.Item valueItem = stack.getStackItem(0);
                    reg = isLocalCollection(arItem);
                    if ((reg >= 0) && (idxItem.getUserValue() != null) && (valueItem.getUserValue() != null)) {
                        bugReporter.reportBug(
                                new BugInstance(this, BugType.UTA_USE_TO_ARRAY.name(), NORMAL_PRIORITY).addClass(this).addMethod(this).addSourceLine(this));
                    }
                }
            } else if ((seen == Const.CHECKCAST) && (stack.getStackDepth() > 0)) {
                OpcodeStack.Item itm = stack.getStackItem(0);
                uValue = itm.getUserValue();
                if (uValue instanceof Integer) {
                    reg = ((Integer) uValue).intValue();
                    sawAlias = true;
                }
            }
        } catch (ClassNotFoundException cnfe) {
            bugReporter.reportMissingClass(cnfe);
        } finally {
            TernaryPatcher.pre(stack, seen);
            stack.sawOpcode(this, seen);
            TernaryPatcher.post(stack, seen);
            if (sawAlias) {
                if (stack.getStackDepth() > 0) {
                    OpcodeStack.Item itm = stack.getStackItem(0);
                    itm.setUserValue(Integer.valueOf(reg));
                }
            } else if (sawLoad) {
                if (stack.getStackDepth() > 0) {
                    OpcodeStack.Item itm = stack.getStackItem(0);
                    reg = itm.getRegisterNumber();
                    if (reg >= 0) {
                        uValue = userValues.get(Integer.valueOf(reg));
                        itm.setUserValue(uValue);
                    }
                }
            } else if (sawNewArray && (stack.getStackDepth() > 0)) {
                OpcodeStack.Item itm = stack.getStackItem(0);
                itm.setUserValue(uValue);
            }
        }
    }
1139135
@Override
    public void sawOpcode(int seen) {
        try {
            stack.precomputation(this);

            switch (state) {
                case SAW_NOTHING:
                    if (seen == Const.ICONST_0) {
                        state = State.SAW_CONSTANT_0;
                    } else if ((seen >= Const.ICONST_1) && (seen <= Const.ICONST_5)) {
                        state = State.SAW_CONSTANT;
                    } else if ((seen == Const.LDC) || (seen == Const.LDC_W)) {
                        Constant c = getConstantRefOperand();
                        if (c instanceof ConstantInteger) {
                            state = State.SAW_CONSTANT;
                        }
                    }
                break;

                case SAW_CONSTANT_0:
                case SAW_CONSTANT:
                    switch (seen) {
                        case Const.AALOAD:
                            if ("main".equals(this.getMethodName())) {
                                break;
                            }
                            //$FALL-THROUGH$
                        case Const.IALOAD:
                        case Const.LALOAD:
                        case Const.FALOAD:
                        case Const.DALOAD:
                            // case BALOAD: byte and char indexing seems prevalent, and
                            // case CALOAD: usually harmless so ignore
                        case Const.SALOAD:
                            if (stack.getStackDepth() > 1) {
                                OpcodeStack.Item item = stack.getStackItem(1);
                                if (!isArrayFromUbiquitousMethod(item)) {
                                    if (state == State.SAW_CONSTANT_0) {
                                        iConst0Looped.set(getPC());
                                    } else {
                                        bugReporter.reportBug(new BugInstance(this, BugType.CLI_CONSTANT_LIST_INDEX.name(), NORMAL_PRIORITY).addClass(this)
                                                .addMethod(this).addSourceLine(this));
                                    }
                                }
                            }
                        break;

                        case Const.INVOKEVIRTUAL:
                            if (Values.SLASHED_JAVA_UTIL_LIST.equals(getClassConstantOperand())) {
                                String methodName = getNameConstantOperand();
                                if ("get".equals(methodName)) {
                                    if (state == State.SAW_CONSTANT_0) {
                                        iConst0Looped.set(getPC());
                                    } else {
                                        bugReporter.reportBug(new BugInstance(this, BugType.CLI_CONSTANT_LIST_INDEX.name(), NORMAL_PRIORITY).addClass(this)
                                                .addMethod(this).addSourceLine(this));
                                    }
                                }
                            }
                        break;
                        default:
                        break;
                    }
                    state = State.SAW_NOTHING;
                break;
            }

            if (((seen >= Const.IFEQ) && (seen <= Const.GOTO)) || (seen == Const.GOTO_W)) {
                int branchTarget = this.getBranchTarget();
                for (int bugPC = iConst0Looped.nextSetBit(0); bugPC >= 0; bugPC = iConst0Looped.nextSetBit(bugPC + 1)) {
                    if (branchTarget < bugPC) {
                        if ((bugPC - branchTarget) < max_iConst0LoopDistance) {
                            bugReporter.reportBug(new BugInstance(this, BugType.CLI_CONSTANT_LIST_INDEX.name(), NORMAL_PRIORITY).addClass(this).addMethod(this)
                                    .addSourceLine(this, bugPC));
                        }
                        iConst0Looped.clear(bugPC);
                    }
                }
            }
        } finally {
            stack.sawOpcode(this, seen);
        }
    }
997430
@Override
    public void sawOpcode(int seen) {
        stack.precomputation(this);

        switch (seen) {
            case Const.INVOKESTATIC: {
                String className = getClassConstantOperand();
                for (Backports backport : BACKPORTS) {
                    if (className.startsWith(backport.getPathPrefix())) {
                        if (clsVersion >= backport.getMinimumJDK()) {
                            reportBug(backport.getLibrary());
                            break;
                        }
                    }
                }
            }
            break;

            case Const.INVOKESPECIAL: {
                String className = getClassConstantOperand();
                String methodName = getNameConstantOperand();
                for (Backports backport : BACKPORTS) {
                    if (Values.CONSTRUCTOR.equals(methodName) && className.startsWith(backport.getPathPrefix()) && (clsVersion >= backport.getMinimumJDK())) {
                        reportBug(backport.getLibrary());
                        break;
                    }
                }
            }
            break;

            default:
            break;
        }
    }
311948
@Override
    public void sawOpcode(int seen) {

        FinallyBlockInfo fbi = fbInfo.get(0);

        if (getPC() < fbi.startPC) {
            return;
        }

        if (getPC() == fbi.startPC) {
            if (OpcodeUtils.isAStore(seen)) {
                fbi.exReg = RegisterUtils.getAStoreReg(this, seen);
            } else {
                removeEarliestFinallyBlock();
                sawOpcode(seen);
                return;
            }
            return;
        }

        if (seen == Const.MONITORENTER) {
            fbi.monitorCount++;
        } else if (seen == Const.MONITOREXIT) {
            fbi.monitorCount--;
            if (fbi.monitorCount < 0) {
                removeEarliestFinallyBlock();
                sawOpcode(seen);
                return;
            }
        }

        if ((seen == Const.ATHROW) && (loadedReg == fbi.exReg)) {
            removeEarliestFinallyBlock();
            sawOpcode(seen);
            return;
        } else if (OpcodeUtils.isALoad(seen)) {
            loadedReg = RegisterUtils.getALoadReg(this, seen);
        } else {
            loadedReg = -1;
        }

        if (OpcodeUtils.isReturn(seen) || (seen == Const.ATHROW)) {
            bugReporter.reportBug(new BugInstance(this, BugType.AFBR_ABNORMAL_FINALLY_BLOCK_RETURN.name(), NORMAL_PRIORITY).addClass(this).addMethod(this)
                    .addSourceLine(this));
            removeEarliestFinallyBlock();
        } else if (OpcodeUtils.isStandardInvoke(seen)) {
            try {
                JavaClass cls = Repository.lookupClass(getClassConstantOperand());
                Method m = findMethod(cls, getNameConstantOperand(), getSigConstantOperand());
                if (m != null) {
                    ExceptionTable et = m.getExceptionTable();
                    if ((et != null) && (et.getLength() > 0) && !catchBlockInFinally(fbi)) {
                        bugReporter.reportBug(new BugInstance(this, BugType.AFBR_ABNORMAL_FINALLY_BLOCK_RETURN.name(), LOW_PRIORITY).addClass(this)
                                .addMethod(this).addSourceLine(this));
                        removeEarliestFinallyBlock();
                    }
                }
            } catch (ClassNotFoundException cnfe) {
                bugReporter.reportMissingClass(cnfe);
            }
        }
    }
311899
@Override
    public void sawOpcode(int seen) {
        try {
            switch (state) {
                case SAW_NOTHING:
                    sawOpcodeAfterNothing(seen);
                break;

                case SAW_EQUALS:
                    sawOpcodeAfterEquals(seen);
                break;

                case SAW_IFEQ:
                    sawOpcodeAfterBranch(seen);
                break;
            }

            processLoad(seen);
            processLoop(seen);
        } finally {
            stack.sawOpcode(this, seen);
        }

    }
1010391
@Override
    public void sawOpcode(int seen) {
        try {
            stack.precomputation(this);

            if ((seen == Const.CHECKCAST) && (stack.getStackDepth() > 0)) {
                OpcodeStack.Item item = stack.getStackItem(0);
                if (item.getRegisterNumber() == 1) {
                    String thisCls = getClassName();
                    String equalsCls = getClassConstantOperand();
                    if (!thisCls.equals(equalsCls)) {
                        JavaClass thisJavaClass = getClassContext().getJavaClass();
                        JavaClass equalsJavaClass = Repository.lookupClass(equalsCls);
                        boolean inheritance = thisJavaClass.instanceOf(equalsJavaClass) || equalsJavaClass.instanceOf(thisJavaClass);

                        BugInstance bug = new BugInstance(this, BugType.NSE_NON_SYMMETRIC_EQUALS.name(), inheritance ? LOW_PRIORITY : NORMAL_PRIORITY)
                                .addClass(this).addMethod(this).addSourceLine(this).addString(equalsCls);
                        Map<String, BugInstance> bugs = possibleBugs.get(thisCls);
                        if (bugs == null) {
                            bugs = new HashMap<>();
                            possibleBugs.put(thisCls, bugs);
                        }
                        bugs.put(equalsCls, bug);
                    }
                }
            }
        } catch (ClassNotFoundException cnfe) {
            bugReporter.reportMissingClass(cnfe);
        } finally {
            stack.sawOpcode(this, seen);
        }
    }
268364
@Override
    public void sawOpcode(final int seen) {
        if (stage == Stage.FIND_LOOP_STAGE) {
            sawOpcodeLoop(seen);
        } else {
            sawOpcodeBug(seen);
        }
    }
869684
private void processWatchers(MethodSpec.Builder createdMethodBuilder) {
    createdMethodBuilder.addStatement("Proto p = __proto__");
    getMethodsWithAnnotation(component, Watch.class)
        .forEach(method -> processWatcher(createdMethodBuilder, method));
  }
863100
@Override
    public void sawOpcode(int seen) {
        try {
            stack.precomputation(this);

            int pc = getPC();
            CodeException ex = catchHandlerPCs.get(Integer.valueOf(pc));
            if (ex != null) {
                int endPC;
                if ((seen == Const.GOTO) || (seen == Const.GOTO_W)) {
                    endPC = this.getBranchTarget();
                } else {
                    endPC = Integer.MAX_VALUE;
                }
                ConstantPool pool = getConstantPool();
                ConstantClass ccls = (ConstantClass) pool.getConstant(ex.getCatchType());
                String catchSig = ccls.getBytes(pool);
                CatchInfo ci = new CatchInfo(ex.getHandlerPC(), endPC, catchSig);
                catchInfos.add(ci);
            }

            updateEndPCsOnCatchRegScope(catchInfos, pc, seen);
            removeFinishedCatchBlocks(catchInfos, pc);

            if (seen == Const.ATHROW) {
                processThrow();
            } else if ((seen == Const.IRETURN) && isBooleanMethod && !hasValidFalseReturn && (stack.getStackDepth() > 0)) {
                processBooleanReturn();
            }

        } finally {
            stack.sawOpcode(this, seen);
        }
    }
36083
@Override
    public void sawOpcode(int seen) {
        String strCon = null;

        try {
            stack.precomputation(this);

            if (seen == Const.INVOKESPECIAL) {
                String clsName = getClassConstantOperand();
                if (SignatureUtils.isPlainStringConvertableClass(clsName)) {
                    String methodName = getNameConstantOperand();
                    String methodSig = getSigConstantOperand();
                    if (Values.CONSTRUCTOR.equals(methodName) && XML_SIG_BUILDER.withReturnType("V").toString().equals(methodSig) && (stack.getStackDepth() > 0)) {
                        OpcodeStack.Item itm = stack.getStackItem(0);
                        strCon = (String) itm.getConstant();
                    }
                }
            } else if (seen == Const.INVOKEVIRTUAL) {
                String clsName = getClassConstantOperand();
                if (SignatureUtils.isPlainStringConvertableClass(clsName)) {
                    String methodName = getNameConstantOperand();
                    String methodSig = getSigConstantOperand();
                    if ("append".equals(methodName) && XML_SIG_BUILDER.withReturnType(clsName).toString().equals(methodSig) && (stack.getStackDepth() > 0)) {
                        OpcodeStack.Item itm = stack.getStackItem(0);
                        strCon = (String) itm.getConstant();
                    }
                }
            }

            if (strCon != null) {
                strCon = strCon.trim();
                if (strCon.length() == 0) {
                    return;
                }

                for (XMLPattern pattern : xmlPatterns) {
                    Matcher m = pattern.getPattern().matcher(strCon);
                    if (m.matches()) {
                        xmlItemCount++;
                        if (pattern.isConfident()) {
                            xmlConfidentCount++;
                        }
                        if ((firstPC < 0) && (xmlConfidentCount > 0)) {
                            firstPC = getPC();
                        }
                        break;
                    }
                }
            }
        } finally {
            stack.sawOpcode(this, seen);
        }
    }
632912
@Override
    public void sawOpcode(int seen) {
        switch (state) {
            case SAW_NOTHING:
                if (OpcodeUtils.isALoad(seen)) {
                    register1_1 = RegisterUtils.getALoadReg(this, seen);
                    state = State.SAW_LOAD1_1;
                }
            break;

            case SAW_LOAD1_1:
                if (OpcodeUtils.isALoad(seen)) {
                    register1_2 = RegisterUtils.getALoadReg(this, seen);
                }

                if (register1_2 > -1) {
                    state = State.SAW_LOAD1_2;
                } else {
                    state = State.SAW_NOTHING;
                }
            break;

            case SAW_LOAD1_2:
                if (seen == Const.INVOKEVIRTUAL) {
                    String cls = getDottedClassConstantOperand();
                    if (dateClasses.contains(cls)) {
                        String methodName = getNameConstantOperand();
                        if ("equals".equals(methodName) || "after".equals(methodName) || "before".equals(methodName)) {
                            state = State.SAW_CMP1;
                        }
                    }
                }
                if (state != State.SAW_CMP1) {
                    state = State.SAW_NOTHING;
                }
            break;

            case SAW_CMP1:
                if (seen == Const.IFNE) {
                    state = State.SAW_IFNE;
                } else {
                    state = State.SAW_NOTHING;
                }
            break;

            case SAW_IFNE:
                if (OpcodeUtils.isALoad(seen)) {
                    register2_1 = RegisterUtils.getALoadReg(this, seen);
                }

                if (register2_1 > -1) {
                    state = State.SAW_LOAD2_1;
                } else {
                    state = State.SAW_NOTHING;
                }
            break;

            case SAW_LOAD2_1:
                if (OpcodeUtils.isALoad(seen)) {
                    register2_2 = RegisterUtils.getALoadReg(this, seen);
                }

                if ((register2_2 > -1)
                        && (((register1_1 == register2_1) && (register1_2 == register2_2)) || ((register1_1 == register2_2) && (register1_2 == register2_1)))) {
                    state = State.SAW_LOAD2_2;
                } else {
                    state = State.SAW_NOTHING;
                }
            break;

            case SAW_LOAD2_2:
                if (seen == Const.INVOKEVIRTUAL) {
                    String cls = getDottedClassConstantOperand();
                    if (dateClasses.contains(cls)) {
                        String methodName = getNameConstantOperand();
                        if ("equals".equals(methodName) || "after".equals(methodName) || "before".equals(methodName)) {
                            state = State.SAW_CMP2;
                        }
                    }
                }
                if (state != State.SAW_CMP2) {
                    state = State.SAW_NOTHING;
                }
            break;

            case SAW_CMP2:
                if (seen == Const.IFEQ) {
                    bugReporter.reportBug(new BugInstance("DDC_DOUBLE_DATE_COMPARISON", NORMAL_PRIORITY).addClassAndMethod(this).addSourceLine(this));
                }
                state = State.SAW_NOTHING;
            break;

            default:
            break;
        }
    }
706635
@Override
    public void sawOpcode(int seen) {

        if ((seen == Const.INVOKEINTERFACE) || (seen == Const.INVOKEVIRTUAL) || (seen == Const.INVOKESPECIAL) || (seen == Const.INVOKESTATIC)) {
            String clsName = getClassConstantOperand();
            String mName = getNameConstantOperand();
            String methodInfo = clsName + ':' + mName;
            String thisMethodInfo = (clsName.equals(getClassName())) ? (mName + ':' + methodSig) : "0";

            if (expensiveCalls.contains(methodInfo) || expensiveThisCalls.contains(thisMethodInfo)) {
                if (isListenerMethod) {
                    bugReporter.reportBug(new BugInstance(this, BugType.SG_SLUGGISH_GUI.name(), NORMAL_PRIORITY).addClass(this)
                            .addMethod(this.getClassContext().getJavaClass(), listenerCode.get(this.getCode())));
                } else {
                    expensiveThisCalls.add(getMethodName() + ':' + getMethodSig());
                }
                throw new StopOpcodeParsingException();
            }
        }
    }