refComparisonList); } else if ( "assertFalse".equals(methodName) && "(Z)V".equals(methodSig)) { SourceLineAnnotation lastLocation = bugAccumulator.getLastBugLocation(); InstructionHandle prevHandle = location.getHandle().getPrev(); if (lastLocation != null && prevHandle != null && lastLocation.getEndBytecode() == prevHandle.getPosition()){
@Override public void visitAfter(Code code) { if(bugAccumulator.getLastBugLocation() == null && !sawExcludedNSECall && noSideEffectMethods.useless(getMethodDescriptor())) { // Do not report UC_USELESS_VOID_METHOD if something was already reported inside the current method // it's likely that UC_USELESS_VOID_METHOD is just the consequence of the previous report bugAccumulator.accumulateBug(new BugInstance(this, "UC_USELESS_VOID_METHOD", code.getCode().length > 40 ? HIGH_PRIORITY : code.getCode().length > 15 ? NORMAL_PRIORITY : LOW_PRIORITY) .addClassAndMethod(getMethodDescriptor()), this); } sawExcludedNSECall = false; bugAccumulator.reportAccumulatedBugs(); }
refComparisonList); } else if ( "assertFalse".equals(methodName) && "(Z)V".equals(methodSig)) { SourceLineAnnotation lastLocation = bugAccumulator.getLastBugLocation(); InstructionHandle prevHandle = location.getHandle().getPrev(); if (lastLocation != null && prevHandle != null && lastLocation.getEndBytecode() == prevHandle.getPosition()){
@Override public void visitAfter(Code code) { if(bugAccumulator.getLastBugLocation() == null && !sawExcludedNSECall && noSideEffectMethods.useless(getMethodDescriptor())) { // Do not report UC_USELESS_VOID_METHOD if something was already reported inside the current method // it's likely that UC_USELESS_VOID_METHOD is just the consequence of the previous report bugAccumulator.accumulateBug(new BugInstance(this, "UC_USELESS_VOID_METHOD", code.getCode().length > 40 ? HIGH_PRIORITY : code.getCode().length > 15 ? NORMAL_PRIORITY : LOW_PRIORITY) .addClassAndMethod(getMethodDescriptor()), this); } sawExcludedNSECall = false; bugAccumulator.reportAccumulatedBugs(); }