It turned out that finder.search methods generates incorrect output.
Will find not only some INVOKESPECIAL opcodes but will return InstructionHandle arrays in form:
So instead of returning x matching opcode(s) it returns x+1 matching opcodes in one IntructionHandle array. This generates problem when invoking finder.search("invokespecial return") which will throw
because of situation, that after return there is no more instruction (so InstructionHandler too) to get. It occurs especially for default constructors as they bytecode is like:
Error exists because of erroneous instruction(line 230 in InstructionFinder.java, method search()):
There should be no "+1" part because:
(which is one line above)
returns index AFTER match.
So bug generally (I didn't tested properly) could be repaired with replacing erroneous line with: