Source:
private boolean handleMethodInvocation(Instruction instruction) { boolean isStatic = instruction.opcode == Opcodes.INVOKESTATIC; int arity = isStatic ? instruction.arity() : (instruction.arity() + 1); ProgramState.Pop pop = programState.unstackValue(arity); Preconditions.checkState(pop.values.size() == arity, "Arguments mismatch for INVOKE"); SymbolicValue returnSV = constraintManager.createSymbolicValue(instruction); String signature = instruction.fieldOrMethod.completeSignature(); MethodBehavior methodInvokedBehavior = behaviorCache.get(signature); if (methodInvokedBehavior != null && methodInvokedBehavior.isComplete()) { List<SymbolicValue> stack = pop.values; if (!isStatic) { stack = stack.subList(1, stack.size()); } List<SymbolicValue> arguments = Lists.reverse(stack); methodInvokedBehavior .happyPathYields() .forEach(yield -> yield.statesAfterInvocation(arguments, Collections.emptyList(), pop.state, () -> returnSV).forEach(ps -> { checkerDispatcher.methodYield = yield; checkerDispatcher.addTransition(ps); checkerDispatcher.methodYield = null; })); methodInvokedBehavior .exceptionalPathYields() .forEach(yield -> { Type exceptionType = yield.exceptionType(); yield.statesAfterInvocation( arguments, Collections.emptyList(), pop.state, () -> constraintManager.createExceptionalSymbolicValue(exceptionType)).forEach(ps -> { ps.storeExitValue(); enqueueExceptionHandlers(exceptionType, ps); }); }); return !methodInvokedBehavior.yields().isEmpty(); } programState = pop.state; if (instruction.hasReturnValue()) { programState = programState.stackValue(returnSV); programState = setDoubleOrLong(returnSV, instruction.isLongOrDoubleValue()); } return false; }

Target:
private boolean handleMethodInvocation(Instruction instruction) { boolean isStatic = instruction.opcode == Opcodes.INVOKESTATIC; int arity = isStatic ? instruction.arity() : (instruction.arity() + 1); ProgramState.Pop pop = programState.unstackValue(arity); Preconditions.checkState(pop.values.size() == arity, "Arguments mismatch for INVOKE"); SymbolicValue returnSV = constraintManager.createSymbolicValue(instruction); String signature = instruction.fieldOrMethod.completeSignature(); MethodBehavior methodInvokedBehavior = behaviorCache.get(signature); if (methodInvokedBehavior != null && methodInvokedBehavior.isComplete()) { List<SymbolicValue> stack = pop.values; if (!isStatic) { stack = stack.subList(1, stack.size()); } List<SymbolicValue> arguments = Lists.reverse(stack); methodInvokedBehavior .happyPathYields() .forEach(yield -> yield.statesAfterInvocation(arguments, Collections.emptyList(), pop.state, () -> returnSV).forEach(ps -> { checkerDispatcher.methodYield = yield; checkerDispatcher.addTransition(ps); checkerDispatcher.methodYield = null; })); methodInvokedBehavior .exceptionalPathYields() .forEach(yield -> { org.sonar.plugins.java.api.semantic.Type exceptionType = yield.exceptionType(); yield.statesAfterInvocation( arguments, Collections.emptyList(), pop.state, () -> constraintManager.createExceptionalSymbolicValue(exceptionType)).forEach(ps -> { ps.storeExitValue(); enqueueExceptionHandlers(exceptionType, ps); }); }); return !methodInvokedBehavior.yields().isEmpty(); } programState = pop.state; if (instruction.hasReturnValue()) { programState = programState.stackValue(returnSV); programState = setDoubleOrLong(returnSV, instruction.isLongOrDoubleValue()); } return false; }