Check if the readObject is doing multiple external call beyond the basic readByte, readBoolean, etc..
@param m
@param classContext
@return
@throws CFGBuilderException
@throws DataflowAnalysisException
961852
private boolean hasCustomReadObject(Method m, ClassContext classContext,List<String> classesToIgnore)
            throws CFGBuilderException, DataflowAnalysisException {
        ConstantPoolGen cpg = classContext.getConstantPoolGen();
        CFG cfg = classContext.getCFG(m);
        int count = 0;
        for (Iterator<Location> i = cfg.locationIterator(); i.hasNext(); ) {
            Location location = i.next();
            Instruction inst = location.getHandle().getInstruction();
            //ByteCode.printOpCode(inst,cpg);
            if(inst instanceof InvokeInstruction) {
                InvokeInstruction invoke = (InvokeInstruction) inst;
                if (!READ_DESERIALIZATION_METHODS.contains(invoke.getMethodName(cpg))
                        && !classesToIgnore.contains(invoke.getClassName(cpg))) {
                    count +=1;
                }
            }
        }
        return count > 3;
    }
634096
@Override
    public void visitClassContext(ClassContext classContext) {
        try {
            stack = new OpcodeStack();
            nodeCreations = new HashMap<>();
            nodeStores = new HashMap<>();
            super.visitClassContext(classContext);
        } finally {
            stack = null;
            nodeCreations = null;
            nodeStores = null;
        }
    }
1077892
@Override
    public void visitClassContext(ClassContext classContext) {
        try {
            branchTargets = new BitSet();
            catchTargets = new BitSet();
            stack = new OpcodeStack();
            super.visitClassContext(classContext);
        } finally {
            branchTargets = null;
            catchTargets = null;
            stack = null;
        }
    }
80273
@Override
    public void visitClassContext(ClassContext classContext) {
        try {
            classVersion = classContext.getJavaClass().getMajor();
            if (classVersion >= Const.MAJOR_1_4) {
                stack = new OpcodeStack();
                super.visitClassContext(classContext);
            }
        } finally {
            stack = null;
        }
    }
871233
@Override
    public void visitClassContext(ClassContext classContext) {
        try {
            if ((invocationHandlerClass != null) && classContext.getJavaClass().implementationOf(invocationHandlerClass)) {
                return;
            }
            iConst0Looped = new BitSet();
            stack = new OpcodeStack();
            super.visitClassContext(classContext);
        } catch (ClassNotFoundException cnfe) {
            bugReporter.reportMissingClass(cnfe);
        } finally {
            iConst0Looped = null;
            stack = null;
        }
    }
656733
private ObjectStreamClass readEnumDesc() throws IOException,
            ClassNotFoundException {
        byte tc = nextTC();
        switch (tc) {
            case TC_CLASSDESC:
                return readEnumDescInternal();
            case TC_REFERENCE:
                return (ObjectStreamClass) readCyclicReference();
            case TC_NULL:
                return null;
            default:
                throw corruptStream(tc);
        }
    }
1031708
@Override
    public void visitClassContext(ClassContext classContext) {
        try {
            clsContext = classContext;
            JavaClass cls = classContext.getJavaClass();
            if (cls.isInterface())
                return;
            superClasses = cls.getSuperClasses();
            cls.accept(this);
        } catch (ClassNotFoundException cnfe) {
            bugReporter.reportMissingClass(cnfe);
        } finally {
            clsContext = null;
            superClasses = null;
        }
    }
1335325
@Override
    public void visitClassContext(final ClassContext classContext) {
        try {
            stack = new OpcodeStack();
            memberCollections = new HashMap<>();
            memberSourceLineAnnotations = new HashMap<>();
            super.visitClassContext(classContext);
        } finally {
            stack = null;
            memberCollections = null;
            memberSourceLineAnnotations = null;
        }
    }
620236
private void readChunk() throws IOException {
    if (mDataReader == null) {
      mDataReader = mDataReaderFactory.create(mPos, mLength - mPos);
    }

    if (mCurrentChunk != null && mCurrentChunk.readableBytes() == 0) {
      mCurrentChunk.release();
      mCurrentChunk = null;
    }
    if (mCurrentChunk == null) {
      mCurrentChunk = mDataReader.readChunk();
    }
  }
512733
@Override
    public void visitClassContext(ClassContext classContext) {

        if (cloneClass == null) {
            return;
        }

        try {
            cls = classContext.getJavaClass();
            if (cls.implementationOf(cloneClass)) {
                clsName = cls.getClassName();
                stack = new OpcodeStack();
                super.visitClassContext(classContext);
            }
        } catch (ClassNotFoundException cnfe) {
            bugReporter.reportMissingClass(cnfe);
        } finally {
            cls = null;
            stack = null;
        }
    }
257198
@Override
    public ByteBuffer readBytes(int numBytes) throws IOException {
        final int appsz = applicationBufferSize();
        ByteBuf readbuf = m_ce.allocator().ioBuffer(packetBufferSize());
        CompositeByteBuf msgbb = Unpooled.compositeBuffer();

        try {
            ByteBuf clear = doUnwrap(readbuf, appsz);

            msgbb.addComponent(true, clear);
            int needed = numBytes;
            if (numBytes == NOT_AVAILABLE) {
                needed = msgbb.readableBytes() >= 4 ? validateLength(msgbb.readInt()) : NOT_AVAILABLE;
            }
            while (msgbb.readableBytes() < (needed == NOT_AVAILABLE ? 4 : needed)) {
                clear = doUnwrap(readbuf, appsz);

                msgbb.addComponent(true, clear);

                if (needed == NOT_AVAILABLE && msgbb.readableBytes() >= 4) {
                    needed = validateLength(msgbb.readInt());
                }
            }

            ByteBuffer retbb = ByteBuffer.allocate(needed);
            msgbb.readBytes(retbb);
            msgbb.discardReadComponents();

            assert !msgbb.isReadable() : "read from unblocked channel that received multiple messages?";

            return (ByteBuffer)retbb.flip();
        } finally {
            readbuf.release();
            msgbb.release();
        }
    }
793636
@Override
    public void visitClassContext(ClassContext classContext) {
        try {
            localizableFields = new HashMap<>();
            visitedBlocks = new BitSet();
            clsContext = classContext;
            clsName = clsContext.getJavaClass().getClassName();
            clsSig = SignatureUtils.classToSignature(clsName);
            JavaClass cls = classContext.getJavaClass();
            Field[] fields = cls.getFields();
            ConstantPool cp = classContext.getConstantPoolGen().getConstantPool();

            for (Field f : fields) {
                if (!f.isStatic() && !f.isVolatile() && (f.getName().indexOf(Values.SYNTHETIC_MEMBER_CHAR) < 0) && f.isPrivate()) {
                    FieldAnnotation fa = new FieldAnnotation(cls.getClassName(), f.getName(), f.getSignature(), false);
                    boolean hasExternalAnnotation = false;
                    for (AnnotationEntry entry : f.getAnnotationEntries()) {
                        ConstantUtf8 cutf = (ConstantUtf8) cp.getConstant(entry.getTypeIndex());
                        if (!cutf.getBytes().startsWith(Values.JAVA)) {
                            hasExternalAnnotation = true;
                            break;
                        }
                    }
                    localizableFields.put(f.getName(), new FieldInfo(fa, hasExternalAnnotation));
                }
            }

            if (!localizableFields.isEmpty()) {
                buildMethodFieldModifiers(classContext);
                super.visitClassContext(classContext);
                for (FieldInfo fi : localizableFields.values()) {
                    FieldAnnotation fa = fi.getFieldAnnotation();
                    SourceLineAnnotation sla = fi.getSrcLineAnnotation();
                    BugInstance bug = new BugInstance(this, BugType.FCBL_FIELD_COULD_BE_LOCAL.name(), NORMAL_PRIORITY).addClass(this).addField(fa);
                    if (sla != null) {
                        bug.addSourceLine(sla);
                    }
                    bugReporter.reportBug(bug);
                }
            }
        } finally {
            localizableFields = null;
            visitedBlocks = null;
            clsContext = null;
            methodFieldModifiers = null;
        }
    }
546362
@Override
    public void visitClassContext(final ClassContext classContext) {
        try {
            JavaClass cls = classContext.getJavaClass();
            if (!cls.isFinal()) {
                stack = new OpcodeStack();
                methodToCalledMethods = new HashMap<>();
                super.visitClassContext(classContext);

                if (!methodToCalledMethods.isEmpty()) {
                    reportChainedMethods();
                }
            }
        } finally {
            stack = null;
            methodToCalledMethods = null;
        }
    }
880737
@Override
    public void visitClassContext(final ClassContext context) {
        try {
            classContext = context;
            classContext.getJavaClass().accept(this);
        } finally {
            classContext = null;
        }
    }
529367
@Override
    public void visitClassContext(ClassContext classContext) {
        if (mapInterface != null) {
            this.clsContext = classContext;
            classContext.getJavaClass().accept(this);
        }
    }
715742
void processClass(ClassFile cf) throws ConstantPoolException {
        if (verbose) {
            out.println(Messages.get("scan.process.class", cf.getName()));
        }

        CPEntries entries = CPEntries.loadFrom(cf);

        checkSuper(cf);
        checkInterfaces(cf);
        checkClasses(cf, entries);

        for (ConstantPool.CONSTANT_Methodref_info mri : entries.methodRefs) {
            String clname = mri.getClassName();
            CONSTANT_NameAndType_info nti = mri.getNameAndTypeInfo();
            checkMethodRef(cf, clname, nti, "scan.out.usesmethod");
        }

        for (ConstantPool.CONSTANT_InterfaceMethodref_info imri : entries.intfMethodRefs) {
            String clname = imri.getClassName();
            CONSTANT_NameAndType_info nti = imri.getNameAndTypeInfo();
            checkMethodRef(cf, clname, nti, "scan.out.usesintfmethod");
        }

        for (ConstantPool.CONSTANT_Fieldref_info fri : entries.fieldRefs) {
            checkFieldRef(cf, fri);
        }

        checkFields(cf);
        checkMethods(cf);
    }
598277
@Override
    public void visitClassContext(ClassContext classContext) {
        JavaClass cls = classContext.getJavaClass();
        clsVersion = cls.getMajor();
        super.visitClassContext(classContext);
    }