overrides the visitor reset the opcode stack

@param obj
the code object of the currently parsed method
543091
@Override
    public void visitCode(Code obj) {
        stack.resetForMethodEntry(this);
        xmlItemCount = 0;
        xmlConfidentCount = 0;
        firstPC = -1;
        super.visitCode(obj);
        if ((xmlItemCount >= lowReportingThreshold) && (xmlConfidentCount > (lowReportingThreshold >> 1))) {
            bugReporter.reportBug(new BugInstance(this, "CBX_CUSTOM_BUILT_XML",
                    (xmlItemCount >= highReportingThreshold) ? HIGH_PRIORITY : (xmlItemCount >= midReportingThreshold) ? NORMAL_PRIORITY : LOW_PRIORITY)
                            .addClass(this).addMethod(this).addSourceLine(this, firstPC));

        }
    }
336838
@Override
    public void visitAfter(JavaClass obj) {
        isListenerMethod = true;
        for (Code l : listenerCode.keySet()) {
            try {
                super.visitCode(l);
            } catch (StopOpcodeParsingException e) {
                // method already reported
            }
        }
        super.visitAfter(obj);
    }
298936
@Override
    public void visitCode(Code obj) {
        if (prescreen(getMethod())) {
            ifBlocks.clear();
            loadedRegs.clear();
            loopLocations.clear();
            stack.resetForMethodEntry(this);
            state = State.SAW_NOTHING;
            super.visitCode(obj);
        }
    }
753484
@Override
    public void visitCode(Code obj) {
        stack.resetForMethodEntry(this);
        toStringRegisters.clear();
        super.visitCode(obj);
    }
392230
@Override
    public void visitMethod(Method obj) {
        Code c = obj.getCode();
        if (c != null) {
            byte[] opcodes = c.getCode();
            if (opcodes != null) {
                trPCPos = opcodes.length - 1;
                if (!obj.getSignature().endsWith(Values.SIG_VOID)) {
                    trPCPos -= 1;
                }
                trPCPos -= TAILRECURSIONFUDGE;
                possibleTailRecursion = true;
                isStatic = obj.isStatic();
                stack.resetForMethodEntry(this);
                super.visitMethod(obj);
            }
        }
    }
620647
@Override
    public void visitCode(Code obj) {
        stack.resetForMethodEntry(this);
        userValues.clear();
        jaxbContextRegs.clear();

        if (Values.STATIC_INITIALIZER.equals(methodName) || Values.CONSTRUCTOR.equals(methodName)) {
            return;
        }

        super.visitCode(obj);
        
        for (Integer pc : jaxbContextRegs.values()) {
        	bugReporter.reportBug(new BugInstance(this, BugType.PMB_LOCAL_BASED_JAXB_CONTEXT.name(), "<clinit>".equals(getMethodName()) ? LOW_PRIORITY : NORMAL_PRIORITY)
        			.addClass(this).addMethod(this).addSourceLine(this, pc.intValue()));
        }
    }
467083
@Override
    public void visitMethod(Method obj) {
        if (!obj.isAbstract())
            return;

        String methodName = obj.getName();
        String methodSig = obj.getSignature();
        outer: for (JavaClass cls : superClasses) {
            Method[] methods = cls.getMethods();
            for (Method m : methods) {
                if (m.isPrivate() || m.isAbstract())
                    continue;
                if (methodName.equals(m.getName()) && methodSig.equals(m.getSignature())) {
                    BugInstance bug = new BugInstance(this, BugType.AOM_ABSTRACT_OVERRIDDEN_METHOD.name(), NORMAL_PRIORITY).addClass(this).addMethod(this);

                    Code code = obj.getCode();
                    if (code != null)
                        bug.addSourceLineRange(clsContext, this, 0, code.getLength() - 1);
                    bugReporter.reportBug(bug);

                    break outer;
                }
            }
        }
    }
1264293
@Override
    public void visitCode(Code obj) {
        Method method = getMethod();
        if (!method.isSynthetic() && prescreen(method)) {
            stack.resetForMethodEntry(this);
            super.visitCode(obj);
        }
    }
653885
@Override
    public void visitCode(Code obj) {
        stack.resetForMethodEntry(this);
        changedAttributes.clear();
        savedAttributes.clear();
        super.visitCode(obj);
        for (Integer pc : changedAttributes.values()) {
            bugReporter.reportBug(new BugInstance(this, BugType.SCSS_SUSPICIOUS_CLUSTERED_SESSION_SUPPORT.name(), NORMAL_PRIORITY).addClass(this)
                    .addMethod(this).addSourceLine(this, pc.intValue()));
        }
    }
587520
@Override
    public void visitMethod(Method obj) {
        stack.resetForMethodEntry(this);
        enumRegs.clear();
        super.visitMethod(obj);
    }
1088163
@Override
    public void visitCode(final Code obj) {
        if (sourceLines == null) {
            return;
        }

        if (isAbstract) {
            return;
        }

        if (Values.STATIC_INITIALIZER.equals(methodName) || Values.CONSTRUCTOR.equals(methodName)) {
            return;
        }

        int methodStart = srcLineAnnotation.getStartLine() - 2;
        int methodLine = methodStart;
        String line;
        while ((methodLine >= 0) && (methodLine < sourceLines.length)) {
            line = sourceLines[methodLine];
            if (line.indexOf(methodName) >= 0) {
                break;
            }
            methodLine--;
        }

        if (methodLine < 0) {
            return;
        }

        for (int i = methodLine; i <= methodStart; i++) {
            if ((i < 0) || (i >= sourceLines.length)) {
                return;
            }
            line = sourceLines[i];
            if (line.indexOf("final") >= 0) {
                return;
            }
        }

        changedParms = new BitSet();
        super.visitCode(obj);

        BugInstance bi = null;
        for (int i = 0; i < firstLocalReg; i++) {
            if (changedParms.get(i)) {
                changedParms.clear(i);
                continue;
            }

            String parmName = getRegisterName(obj, i);
            if (bi == null) {
                bi = new BugInstance(this, BugType.FP_FINAL_PARAMETERS.name(), LOW_PRIORITY).addClass(this).addMethod(this).addSourceLine(this, 0);
                bugReporter.reportBug(bi);
            }
            bi.addString(parmName);
        }
        changedParms = null;
    }
41101
@Override
    public void visitCode(Code obj) {
        try {
            stack.resetForMethodEntry(this);
            reportedType = ImmutabilityType.UNKNOWN;
            super.visitCode(obj);
        } catch (StopOpcodeParsingException e) {
            // report type is immutable
        }
    }
347180
@Override
    public void visitMethod(Method obj) {
        if (sawDateClass) {
            try {
                super.visitMethod(obj);
                currentMethod = obj;
                currentLockDataFlow = getClassContext().getLockDataflow(currentMethod);
                currentCFG = getClassContext().getCFG(currentMethod);
            } catch (CFGBuilderException e) {
                reporter.logError("Synchronization check in Static Calendar Detector caught an error.", e);
            } catch (DataflowAnalysisException e) {
                reporter.logError("Synchronization check in Static Calendar Detector caught an error.", e);
            }
        }
    }
551276
@Override
    public void visitCode(Code obj) {

        stack.resetForMethodEntry(this);
        localSpecialObjects.clear();
        sawTernary = false;
        super.visitCode(obj);

        for (Integer pc : localSpecialObjects.values()) {
            bugReporter.reportBug(
                    makeLocalBugInstance().addClass(this).addMethod(this).addSourceLine(this, pc.intValue()));
        }
    }
287635
@Override
    public void visitCode(Code obj) {
        collectionGroups.clear();
        groupToIterator.clear();
        loops.clear();
        buildVariableEndScopeMap();

        super.visitCode(obj);
    }
42359
@Override
    public void visitCode(Code obj) {
        try {
            lnTable = obj.getLineNumberTable();
            if (lnTable != null) {
                state = State.SEEN_NOTHING;
                invokePC = -1;
                returnType = null;
                super.visitCode(obj);
            }
        } finally {
            lnTable = null;
        }
    }
1261160
@Override
    public void visitCode(Code obj) {

        Method m = getMethod();
        if ((!m.isStatic() || !Values.STATIC_INITIALIZER.equals(m.getName())) && (!m.getName().contains("enum constant"))) { // a findbugs thing!!
            byte[] code = obj.getCode();
            if (code.length >= UNJITABLE_CODE_LENGTH) {
                bugReporter.reportBug(new BugInstance(this, BugType.UJM_UNJITABLE_METHOD.name(), NORMAL_PRIORITY).addClass(this).addMethod(this)
                        .addString("Code Bytes: " + code.length));
            }
        }
    }