code: @Override
      public void visitCode(Code obj) {
          if (collectionFields.isEmpty()) {
              return;
          }
          aliases.clear();
          String methodName = getMethodName();
          if (Values.STATIC_INITIALIZER.equals(methodName)) {
              state = State.IN_CLINIT;
          } else if (Values.CONSTRUCTOR.equals(methodName)) {
              state = State.IN_INIT;
          } else {
              state = State.IN_METHOD;
          }
          stack.resetForMethodEntry(this);
          super.visitCode(obj);
      }
docs: implements the visitor to set the state based on the type of method being parsed
  
  @param obj
  the context object of the currently parsed code block