public BugInstance addSomeSourceForTopTwoStackValues(ClassContext classContext, Method method, Location location) { int pc = location.getHandle().getPosition(); try { OpcodeStack stack = OpcodeStackScanner.getStackAt(classContext.getJavaClass(), method, pc); BugAnnotation a1 = getSomeSource(classContext, method, location, stack, 1); BugAnnotation a0 = getSomeSource(classContext, method, location, stack, 0); addOptionalUniqueAnnotations(a0, a1); } catch (UnreachableCodeException e) { if (SystemProperties.ASSERTIONS_ENABLED) { AnalysisContext.logError(e.getMessage(), e); } assert true; } return this; }
.addFoundAndExpectedType(refType, castType).addOptionalUniqueAnnotations(valueSource, source) .addSourceLine(sourceLineAnnotation)); } else if (isCast && rank < 0.9 bugReporter.reportBug(new BugInstance(this, "BC_IMPOSSIBLE_DOWNCAST_OF_TOARRAY", HIGH_PRIORITY) .addClassAndMethod(methodGen, sourceFile) .addFoundAndExpectedType(refType, castType).addOptionalUniqueAnnotations(valueSource, source) .addSourceLine(sourceLineAnnotation));
public BugInstance addSomeSourceForTopTwoStackValues(ClassContext classContext, Method method, Location location) { int pc = location.getHandle().getPosition(); try { OpcodeStack stack = OpcodeStackScanner.getStackAt(classContext.getJavaClass(), method, pc); BugAnnotation a1 = getSomeSource(classContext, method, location, stack, 1); BugAnnotation a0 = getSomeSource(classContext, method, location, stack, 0); addOptionalUniqueAnnotations(a0, a1); } catch (UnreachableCodeException e) { if (SystemProperties.ASSERTIONS_ENABLED) { AnalysisContext.logError(e.getMessage(), e); } assert true; } return this; }
.addFoundAndExpectedType(refType, castType).addOptionalUniqueAnnotations(valueSource, source) .addSourceLine(sourceLineAnnotation)); } else if (isCast && rank < 0.9 bugReporter.reportBug(new BugInstance(this, "BC_IMPOSSIBLE_DOWNCAST_OF_TOARRAY", HIGH_PRIORITY) .addClassAndMethod(methodGen, sourceFile) .addFoundAndExpectedType(refType, castType).addOptionalUniqueAnnotations(valueSource, source) .addSourceLine(sourceLineAnnotation));