private void insertBeforeReturn(final MethodInfo method, final Bytecode s, final Bytecode b) throws BadBytecode {
final CodeIterator itr = method.getCodeAttribute().iterator();
itr.insert(s.get());
while (itr.hasNext()) {
final int pos = itr.next();
int opcode = itr.byteAt(pos);
if (opcode == Opcode.ARETURN) {
itr.insert(pos, b.get());
}
}
method.getCodeAttribute().computeMaxStack();