looks for methods that contain a LDC opcode

@param obj
the context object of the current method
@return if the class uses LDC instructions
763449
private boolean prescreen(Method obj) {
        BitSet bytecodeSet = getClassContext().getBytecodeSet(obj);
        return (bytecodeSet != null) && ((bytecodeSet.get(Const.LDC) || (bytecodeSet.get(Const.LDC_W))));
    }
612908
@Override
    @SuppressWarnings("unchecked")
    public void visitCode(final Code obj) {
        stack.resetForMethodEntry(this);
        thisClsAccessCount = 0;
        if (Values.STATIC_INITIALIZER.equals(methodName)) {
            return;
        }

        clsAccessCount = new HashMap<>();
        super.visitCode(obj);

        if (clsAccessCount.isEmpty()) {
            return;
        }
        Map.Entry<String, BitSet>[] envies = clsAccessCount.entrySet().toArray(new Map.Entry[clsAccessCount.size()]);
        Arrays.sort(envies, ACCESS_COUNT_COMPARATOR);

        Map.Entry<String, BitSet> bestEnvyEntry = envies[0];
        int bestEnvyCount = bestEnvyEntry.getValue().cardinality();
        if (bestEnvyCount < minEnvy) {
            return;
        }

        double bestPercent = ((double) bestEnvyCount) / ((double) (bestEnvyCount + thisClsAccessCount));

        if (bestPercent > envyPercent) {
            String bestEnvy = bestEnvyEntry.getKey();
            if (implementsCommonInterface(bestEnvy)) {
                return;
            }

            if (envies.length > 1) {
                int runnerUpEnvyCount = 0;
                for (int i = 1; i < envies.length; i++) {
                    runnerUpEnvyCount += envies[i].getValue().cardinality();
                }
                if ((2 * runnerUpEnvyCount) > bestEnvyCount) {
                    return;
                }
            }

            bugReporter.reportBug(new BugInstance(this, BugType.CE_CLASS_ENVY.name(), NORMAL_PRIORITY).addClass(this).addMethod(this)
                    .addSourceLineRange(this, 0, obj.getCode().length - 1).addString(bestEnvy));
        }
    }
146854
@Override
    public void visitCode(Code obj) {
        if (collectionFields.isEmpty()) {
            return;
        }
        aliases.clear();
        String methodName = getMethodName();
        if (Values.STATIC_INITIALIZER.equals(methodName)) {
            state = State.IN_CLINIT;
        } else if (Values.CONSTRUCTOR.equals(methodName)) {
            state = State.IN_INIT;
        } else {
            state = State.IN_METHOD;
        }
        stack.resetForMethodEntry(this);
        super.visitCode(obj);
    }
1276569
public synchronized static RecordAccessor getRecordAccessorForObject(Object obj) {
    for (RecordAccessorProvider p: recordAccessorProviders) {
      RecordAccessor accessor = p.recordAccessorForObject(obj);
      if (accessor != null) {
        return accessor;
      }
    }

    throw new IllegalArgumentException("Can't build accessor for object " + obj.toString() + "!");
  }
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);
        }
    }
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;
                }
            }
        }
    }
501682
protected Integer findOrder(Object obj) {
		// Check for regular Ordered interface
		Integer order = super.findOrder(obj);
		if (order != null) {
			return order;
		}

		// Check for @Order annotation on various kinds of elements
		if (obj instanceof Class) {
			return OrderUtils.getOrder((Class) obj);
		}
		else if (obj instanceof Method) {
			Order ann = AnnotationUtils.findAnnotation((Method) obj, Order.class);
			if (ann != null) {
				return ann.value();
			}
		}
		else if (obj instanceof AnnotatedElement) {
			Order ann = AnnotationUtils.getAnnotation((AnnotatedElement) obj, Order.class);
			if (ann != null) {
				return ann.value();
			}
		}
		else if (obj != null) {
			return OrderUtils.getOrder(obj.getClass());
		}

		return null;
	}
323867
public boolean matches(Object obj) {
        if (!(obj instanceof Exception))
            return false;

        Exception exception = (Exception) obj;

        return exception.getCause() == null;
    }
141200
@Override
    public void visitCode(Code obj) {
        try {
            Method m = getMethod();
            if (m.isSynthetic()) {
                return;
            }

            if (m.isStatic() || m.isPrivate() || Values.CONSTRUCTOR.equals(m.getName())) {
                parmSigs = SignatureUtils.getParameterSlotAndSignatures(m.isStatic(), m.getSignature());
                if (!parmSigs.isEmpty() && prescreen(m)) {
                    state = State.SAW_NOTHING;
                    bugs = new HashMap<>();
                    downwardBranchTarget = -1;
                    super.visitCode(obj);
                    for (BugInfo bi : bugs.values()) {
                        bugReporter.reportBug(bi.bug);
                    }
                }
            }
        } finally {
            bugs = null;
        }
    }
1121412
@Override
    public void visitCode(Code obj) {
        Method m = getMethod();
        if (prescreen(m)) {
            if (m.isSynchronized()) {
                syncPC = 0;
            } else {
                syncPC = -1;
            }
            isStatic = m.isStatic();
            unsafeAliases.clear();
            unsafeAliases.set(0);
            branchInfo.clear();
            unsafeCallOccurred = false;
            stack.resetForMethodEntry(this);
        }
    }
861929
@edu.umd.cs.findbugs.annotations.SuppressFBWarnings(value = "FCBL_FIELD_COULD_BE_LOCAL", justification = "False positives occur when state is maintained across callbacks")
    @Override
    public void visitCode(Code obj) {
        try {
            Method m = getMethod();
            if (m.isPublic() && !m.isSynthetic() && "clone".equals(m.getName()) && (m.getArgumentTypes().length == 0)) {

                String returnClsName = m.getReturnType().getSignature();
                returnClsName = SignatureUtils.stripSignature(returnClsName);
                if (!clsName.equals(returnClsName)) {
                    if (Values.DOTTED_JAVA_LANG_OBJECT.equals(returnClsName)) {
                        bugReporter.reportBug(
                                new BugInstance(this, BugType.CU_CLONE_USABILITY_OBJECT_RETURN.name(), NORMAL_PRIORITY).addClass(this).addMethod(this));
                    } else {
                        JavaClass clonedClass = Repository.lookupClass(returnClsName);
                        if (!cls.instanceOf(clonedClass)) {
                            bugReporter.reportBug(
                                    new BugInstance(this, BugType.CU_CLONE_USABILITY_MISMATCHED_RETURN.name(), HIGH_PRIORITY).addClass(this).addMethod(this));
                        }
                    }
                }

                ExceptionTable et = m.getExceptionTable();

                if ((et != null) && (et.getLength() > 0)) {

                    throwsCNFE = false;
                    if (prescreen(m)) {
                        stack.resetForMethodEntry(this);
                        super.visitCode(obj);
                    }

                    if (!throwsCNFE) {
                        bugReporter.reportBug(new BugInstance(this, BugType.CU_CLONE_USABILITY_THROWS.name(), NORMAL_PRIORITY).addClass(this).addMethod(this));
                    }
                }
            }
        } catch (ClassNotFoundException cnfe) {
            bugReporter.reportMissingClass(cnfe);
        }
    }
1171648
public static Method[] getAllMethod(Object obj) {
        if (obj == null) {
            return null;
        }
        Class<?> clazz = obj.getClass();
        try {
            return clazz.getDeclaredMethods();
        } catch (SecurityException e) {
            e.printStackTrace();
        }
        return null;
    }
947692
def iscode(obj):
    
    return inspect.iscode(obj) or isinstance(obj, Code3) or isinstance(obj, Code2)
593186
@Override
    public void visitCode(Code obj) {
        stack.resetForMethodEntry(this);
        Method m = getMethod();
        if (Values.CONSTRUCTOR.equals(m.getName())) {
            for (String parmSig : SignatureUtils.getParameterSignatures(m.getSignature())) {
                if (SignatureUtils.classToSignature(SLF4J_LOGGER).equals(parmSig) || SignatureUtils.classToSignature(LOG4J_LOGGER).equals(parmSig)
                        || SignatureUtils.classToSignature(LOG4J2_LOGGER).equals(parmSig) || SignatureUtils.classToSignature(COMMONS_LOGGER).equals(parmSig)) {
                    bugReporter.reportBug(new BugInstance(this, BugType.LO_SUSPECT_LOG_PARAMETER.name(), NORMAL_PRIORITY).addClass(this).addMethod(this));
                }
            }
        }

        isStaticInitializer = Values.STATIC_INITIALIZER.equals(m.getName());
        super.visitCode(obj);
    }
897395
public boolean assertValidPkForDelete(ClassDescriptor cld, Object obj)
    {
        if(!ProxyHelper.isProxy(obj))
        {
            FieldDescriptor fieldDescriptors[] = cld.getPkFields();
            int fieldDescriptorSize = fieldDescriptors.length;
            for(int i = 0; i < fieldDescriptorSize; i++)
            {
                FieldDescriptor fd = fieldDescriptors[i];
                Object pkValue = fd.getPersistentField().get(obj);
                if (representsNull(fd, pkValue))
                {
                    return false;
                }
            }
        }
        return true;
    }
535273
@Override
    public void visitMethod(Method obj) {
        LocalVariableTable lvt = obj.getLocalVariableTable();
        if (lvt != null) {
            LocalVariable[] lvs = lvt.getLocalVariableTable();
            for (LocalVariable lv : lvs) {
                if (checkConfusedName(lv.getName(), lv.getSignature())) {
                    bugReporter.reportBug(new BugInstance(this, BugType.CNC_COLLECTION_NAMING_CONFUSION.name(), NORMAL_PRIORITY).addClass(this)
                            .addString(lv.getName()).addSourceLine(this.clsContext, this, lv.getStartPC()));
                }
            }
        }
    }
898102
private boolean lookupMemo(Class<?> objectType, Object obj) throws IOException {
		if(!this.useMemo)
			return false;
		if(!objectType.isPrimitive()) {
			int hash = valueCompare ? obj.hashCode() : System.identityHashCode(obj);
			if(memo.containsKey(hash) && (valueCompare ? memo.get(hash).obj.equals(obj) : memo.get(hash).obj == obj)) { // same object or value
				int memo_index = memo.get(hash).index;
				if(memo_index <= 0xff) {
					out.write(Opcodes.BINGET);
					out.write((byte) memo_index);
				} else {
					out.write(Opcodes.LONG_BINGET);
					byte[] index_bytes = PickleUtils.integer_to_bytes(memo_index);
					out.write(index_bytes, 0, 4);
				}
				return true;
			}
		}
		return false;
	}