@Override
  public void visitMaxs(int maxStack, int maxLocals) {
    try {
      if (myCheckReturnLabel != null) {
        int var = maxLocals + 1; // next index for synthetic variable that holds return value
        mv.visitLabel(myCheckReturnLabel);
        mv.visitVarInsn(Opcodes.ASTORE, var);

        Label checked = new Label();
        addPatternTest(myMethodPattern.patternIndex, checked, var);
        String message = MessageFormat.format("Return value of method {0}.{1} annotated as @{2} does not match pattern {3}",
                                              myClassName, myMethodName, myMethodPattern.annotation, myMethodPattern.pattern);
        addPatternAssertion(message, true);
        mv.visitLabel(checked);
        mv.visitLocalVariable(RETURN_VALUE_NAME, PatternInstrumenter.JAVA_LANG_STRING, null, myCheckReturnLabel, checked, var);
        mv.visitVarInsn(Opcodes.ALOAD, var);
        mv.visitInsn(Opcodes.ARETURN);
      }

      super.visitMaxs(maxStack, maxLocals);
    }
    catch (Throwable e) {
      myInstrumenter.registerError(myMethodName, "visitMaxs", e);
    }
  }
@Override
  public void visitMaxs(int maxStack, int maxLocals)