implements the visitor to look for any non-immutable typed parameters are assignable to the return type. If found, the method is parsed.

@param obj
the context object of the currently parsed code block
965626
@Override
    public void visitCode(Code obj) {
        try {
            possibleParmRegs.clear();
            Method m = getMethod();
            String methodSignature = m.getSignature();
            String retSignature = SignatureUtils.getReturnSignature(methodSignature);
            JavaClass returnClass = null;
            int[] parmRegs = null;

            if (retSignature.startsWith(Values.SIG_QUALIFIED_CLASS_PREFIX) && !knownImmutables.contains(retSignature)) {
                List<String> parmTypes = SignatureUtils.getParameterSignatures(methodSignature);
                for (int p = 0; p < parmTypes.size(); p++) {
                    String parmSignature = parmTypes.get(p);
                    if (parmSignature.startsWith(Values.SIG_QUALIFIED_CLASS_PREFIX) && !knownImmutables.contains(parmSignature)) {
                        if (returnClass == null) {
                            returnClass = Repository.lookupClass(SignatureUtils.trimSignature(retSignature));
                            parmRegs = RegisterUtils.getParameterRegisters(m);
                        }

                        if (parmRegs != null) {
                            JavaClass parmClass = Repository.lookupClass(SignatureUtils.stripSignature(parmSignature));
                            if (parmClass.instanceOf(returnClass)) {
                                possibleParmRegs.put(Integer.valueOf(parmRegs[p]), new ParmUsage());
                            }
                        }
                    }
                }

                if (!possibleParmRegs.isEmpty()) {
                    try {
                        stack.resetForMethodEntry(this);
                        super.visitCode(obj);
                        for (ParmUsage pu : possibleParmRegs.values()) {
                            if ((pu.returnPC >= 0) && (pu.alteredPC >= 0) && (pu.returnPC > pu.alteredPC)) {
                                bugReporter.reportBug(new BugInstance(this, BugType.CFS_CONFUSING_FUNCTION_SEMANTICS.name(), NORMAL_PRIORITY).addClass(this)
                                        .addMethod(this).addSourceLine(this, pu.returnPC).addSourceLine(this, pu.alteredPC));
                            }
                        }
                    } catch (StopOpcodeParsingException e) {
                        // no parm regs left
                    }
                }
            }
        } catch (ClassNotFoundException cnfe) {
            bugReporter.reportMissingClass(cnfe);
        }
    }
1323473
@Override
    public void visitCode(Code obj) {
        if (prescreen(obj, getMethod())) {
            stack.resetForMethodEntry(this);
            catchInfos.clear();
            exceptions = collectExceptions(obj.getExceptionTable());
            exReg.clear();
            lastWasExitPoint = false;
            super.visitCode(obj);
        }
    }
1196158
@Override
    public void visitMethod(final Method obj) {
        try {

            if (obj.isSynthetic()) {
                return;
            }

            Code code = obj.getCode();
            if (code == null) {
                return;
            }

            // There really is no valid relationship between reportLimit and
            // code
            // length, but it is good enough. If the method is small, don't
            // bother
            if (code.getCode().length < (2 * reportLimit)) {
                return;
            }

            BitSet exceptionNodeTargets = new BitSet();

            CFG cfg = classContext.getCFG(obj);
            int branches = 0;
            Iterator<BasicBlock> bbi = cfg.blockIterator();
            while (bbi.hasNext()) {
                BasicBlock bb = bbi.next();
                Iterator<Edge> iei = cfg.outgoingEdgeIterator(bb);
                int lastSwitchTargetBlockLabel = Integer.MIN_VALUE;
                while (iei.hasNext()) {
                    Edge e = iei.next();
                    int edgeType = e.getType();
                    if ((edgeType != EdgeTypes.FALL_THROUGH_EDGE) && (edgeType != EdgeTypes.RETURN_EDGE) && (edgeType != EdgeTypes.UNKNOWN_EDGE)) {
                        if ((edgeType == EdgeTypes.UNHANDLED_EXCEPTION_EDGE) || (edgeType == EdgeTypes.HANDLED_EXCEPTION_EDGE)) {
                            int nodeTarget = e.getTarget().getLabel();
                            if (!exceptionNodeTargets.get(nodeTarget)) {
                                exceptionNodeTargets.set(nodeTarget);
                                branches++;
                            }
                        } else if ((edgeType == EdgeTypes.SWITCH_EDGE) || (edgeType == EdgeTypes.SWITCH_DEFAULT_EDGE)) {
                            int nodeTarget = e.getTarget().getLabel();
                            if (nodeTarget != lastSwitchTargetBlockLabel) {
                                branches++;
                            }
                            lastSwitchTargetBlockLabel = nodeTarget;
                        } else {
                            branches++;
                        }
                    }
                }
            }

            if (branches > reportLimit) {

                int priority = (branches > (reportLimit * 2) ? HIGH_PRIORITY : NORMAL_PRIORITY);
                BugInstance bug = new BugInstance(this, BugType.CC_CYCLOMATIC_COMPLEXITY.name(), priority).addClass(this).addMethod(this)
                        .addSourceLine(classContext, this, 0).addInt(branches);

                bugReporter.reportBug(bug);
            }
        } catch (CFGBuilderException cbe) {
            bugReporter.logError("Failure examining basic blocks for method " + classContext.getJavaClass().getClassName() + '.' + obj.getName()
                    + " in Cyclomatic Complexity detector", cbe);
        }
    }
1056165
@Override
    public void visitCode(final Code obj) {
        try {
            if (methodSignatureIsConstrained) {
                return;
            }

            if (obj.getCode() == null) {
                return;
            }
            Method m = getMethod();

            if (m.isSynthetic()) {
                return;
            }

            if (m.getName().startsWith("access$")) {
                return;
            }

            methodIsStatic = m.isStatic();
            parmCount = m.getArgumentTypes().length;

            if (parmCount == 0) {
                return;
            }

            parameterDefiners.clear();
            usedParameters.clear();
            stack.resetForMethodEntry(this);

            if (buildParameterDefiners()) {
                try {
                    super.visitCode(obj);
                    reportBugs();
                } catch (StopOpcodeParsingException e) {
                    // no more possible parameter definers
                }
            }
        } catch (ClassNotFoundException cnfe) {
            bugReporter.reportMissingClass(cnfe);
        }
    }
942575
@Override
    public void visitCode(Code obj) {
        stack.resetForMethodEntry(this);
        localClassTypes.clear();
        super.visitCode(obj);
    }
1221287
public static Object invokeMethod(final Object obj, final String methodName, final Class<?>[] parameterTypes,
			final Object[] args) {
		Method method = getAccessibleMethod(obj, methodName, parameterTypes);
		if (method == null) {
			throw new IllegalArgumentException("Could not find method [" + methodName + "] on target [" + obj + "]");
		}

		try {
			return method.invoke(obj, args);
		} catch (Exception e) {
			throw convertReflectionExceptionToUnchecked(e);
		}
	}
166474
@Override
    public void visitCode(Code obj) {
        Method m = getMethod();
        if (!m.isStatic() && "clone".equals(m.getName()) && SIG_VOID_TO_OBJECT.equals(m.getSignature())) {
            super.visitCode(obj);
        }
    }
402604
@Override
    public void visitCode(Code obj) {
        try {
            for (JavaClass inf : guiInterfaces) {
                Method[] methods = inf.getMethods();
                for (Method m : methods) {
                    if (m.getName().equals(methodName) && m.getSignature().equals(methodSig)) {
                        listenerCode.put(obj, this.getMethod());
                        return;
                    }
                }
            }
            isListenerMethod = false;
            super.visitCode(obj);
        } catch (StopOpcodeParsingException e) {
            // method already reported
        }
    }
1246507
@Override
    public void visitCode(Code obj) {
        state = State.SAW_NOTHING;
        stack.resetForMethodEntry(this);
        super.visitCode(obj);
    }
583597
private void visitInvoke(InvokeInstruction obj) {
        assert obj != null;
        try {
            TaintMethodConfig methodConfig = getMethodConfig(obj);
            ObjectType realInstanceClass = (methodConfig == null) ?
                    null : methodConfig.getOutputTaint().getRealInstanceClass();
            Taint taint = getMethodTaint(methodConfig);
            assert taint != null;
            if (FindSecBugsGlobalConfig.getInstance().isDebugTaintState()) {
                taint.setDebugInfo(obj.getMethodName(cpg) + "()"); //TODO: Deprecated debug info
            }
            taint.addSource(new UnknownSource(UnknownSourceType.RETURN,taint.getState()).setSignatureMethod(obj.getClassName(cpg).replace(".","/")+"."+obj.getMethodName(cpg)+obj.getSignature(cpg)));
            if (taint.isUnknown()) {
                taint.addLocation(getTaintLocation(), false);
            }
            taintMutableArguments(methodConfig, obj);
            transferTaintToMutables(methodConfig, taint); // adds variable index to taint too
            Taint taintCopy = new Taint(taint);
            // return type is not always the instance type
            taintCopy.setRealInstanceClass(realInstanceClass);

            TaintFrame tf = getFrame();

            int stackDepth = tf.getStackDepth();
            int nbParam = getNumWordsConsumed(obj);
            List<Taint> parameters = new ArrayList<>(nbParam);
            for(int i=0;i<Math.min(stackDepth,nbParam);i++) {
                parameters.add(new Taint(tf.getStackValue(i)));
            }

            modelInstruction(obj, getNumWordsConsumed(obj), getNumWordsProduced(obj), taintCopy);

            for(TaintFrameAdditionalVisitor visitor : visitors) {
                try {
                    visitor.visitInvoke(obj, methodGen, getFrame() , parameters, cpg);
                }
                catch (Throwable e) {
                    LOG.log(Level.SEVERE,"Error while executing "+visitor.getClass().getName(),e);
                }
            }

        } catch (Exception e) {
            String className = ClassName.toSlashedClassName(obj.getReferenceType(cpg).toString());
            String methodName = obj.getMethodName(cpg);
            String signature = obj.getSignature(cpg);

            throw new RuntimeException("Unable to call " + className + '.' + methodName + signature, e);
        }
    }
742494
@Override
    public void visitCode(Code obj) {
        queryLocations.clear();
        loops.clear();
        super.visitCode(obj);
        for (Integer qLoc : queryLocations) {
            for (LoopLocation lLoc : loops) {
                if (lLoc.isInLoop(qLoc.intValue())) {
                    bugReporter.reportBug(new BugInstance(this, BugType.SIL_SQL_IN_LOOP.name(), NORMAL_PRIORITY).addClass(this).addMethod(this)
                            .addSourceLine(this, qLoc.intValue()));
                    break;
                }
            }
        }
    }
349083
@Override
    public void visitMethod(Method obj) {
        if (localizableFields.isEmpty()) {
            return;
        }

        try {

            cfg = clsContext.getCFG(obj);
            cpg = cfg.getMethodGen().getConstantPool();
            BasicBlock bb = cfg.getEntry();
            Set<String> uncheckedFields = new HashSet<>(localizableFields.keySet());
            visitedBlocks.clear();
            checkBlock(bb, uncheckedFields);
        } catch (CFGBuilderException cbe) {
            localizableFields.clear();
        } finally {
            cfg = null;
            cpg = null;
        }
    }
1374643
public static <T> T invokeMethod(final Object obj, final String methodName, final Object[] args,
			final Class<?>[] parameterTypes) {
		Method method = getMethod(obj.getClass(), methodName, parameterTypes);
		if (method == null) {
			throw new IllegalArgumentException("Could not find method [" + methodName + "] with parameter types:"
					+ ObjectUtil.toPrettyString(parameterTypes) + " on class [" + obj.getClass() + ']');
		}
		return invokeMethod(obj, method, args);
	}
441380
@Override
    public void visitCode(final Code obj) {
        Method m = getMethod();
        if (prescreen(m)) {
            sawListSize = false;

            stack.resetForMethodEntry(this);
            state = State.SAW_NOTHING;
            stage = Stage.FIND_LOOP_STAGE;
            super.visitCode(obj);

            if (sawListSize && !possibleForLoops.isEmpty()) {
                stack.resetForMethodEntry(this);
                state = State.SAW_NOTHING;
                stage = Stage.FIND_BUG_STAGE;
                super.visitCode(obj);
            }
        }
    }
45905
public boolean matches(Object obj) {
        if (!(obj instanceof Throwable))
            return false;

        Throwable throwable = (Throwable) obj;

        String foundMessage = throwable.getMessage();

        return expectedMessageMatcher.matches(foundMessage);
    }
1264293
@Override
    public void visitCode(Code obj) {
        Method method = getMethod();
        if (!method.isSynthetic() && prescreen(method)) {
            stack.resetForMethodEntry(this);
            super.visitCode(obj);
        }
    }
1187677
@Override
    public void visitCode(Code obj) {
        stack.resetForMethodEntry(this);
        regValueType.clear();
        state = State.SEEN_NOTHING;
        loopStart = -1;
        loopEnd = -1;
        super.visitCode(obj);
    }