CodeAttribute codeAttribute = methodInfo.getCodeAttribute();
if (codeAttribute != null) {
CodeIterator iterator = codeAttribute.iterator();
while (iterator.hasNext()) {
int index = iterator.next();
int op = iterator.byteAt(index);
if (op == opcode && (removeIndex < 0 || removeIndex == ++currentIndex)) {
for (int i = 0; i <= index; i++) {
iterator.writeByte(Opcode.NOP, i);
}
removed++;