LocalVariableSorter.visitFrame() logic is incorrect
The method visitFrame() in LocalVariableSorter will include types of newly added
local variables in the output frame it generates. But this doesn't necessarily
make sense because the frame could be for a jump target to which the code jumped
from an instruction prior to the adding of the local variable.
A simple example of this is an exception handler. Suppose I add a new local
variable in the middle of a long try{} block. It would not be correct for the
frame before the exception handler to contain the type of the newly added local
variable, because the exception handler also covers the part of the try{} block
before the new local variable was added.
In fact I don't think it is possible for LocalVariableSorter to know what value
to put in the frame at the position corresponding to a newly added local
variable. It may be appropriate to put the type of the newly added local
variable or it may be appropriate to put TOP. I think the right solution is to
allow the user to override it or specify it.