code: @Override
      public void sawOpcode(int seen) {
          switch (state) {
              case SEEN_NOTHING:
                  if ((seen == Const.INVOKEINTERFACE) || (seen == Const.INVOKEVIRTUAL)) {
                      String sig = getSigConstantOperand();
                      String returnSig = SignatureUtils.getReturnSignature(sig);
                      if (returnSig.startsWith(Values.SIG_QUALIFIED_CLASS_PREFIX)) {
                          String clsName = getClassConstantOperand();
                          if (!Values.SLASHED_JAVA_LANG_OBJECT.equals(clsName) && !Values.SLASHED_JAVA_LANG_CLASS.equals(clsName)) {
                              returnType = SignatureUtils.trimSignature(returnSig);
                              invokePC = getPC();
                              state = State.SEEN_INVOKE;
                          }
                      }
                  }
              break;
  
              case SEEN_INVOKE:
                  if (seen == Const.POP) {
                      state = State.SEEN_POP;
                  } else {
                      state = State.SEEN_NOTHING;
                      returnType = null;
                  }
              break;
  
              case SEEN_POP:
                  if (((seen >= Const.ACONST_NULL) && (seen <= Const.DCONST_1)) || (seen == Const.GETFIELD)) {
                      state = State.SEEN_POP;
                  } else if ((seen == Const.INVOKESTATIC) || (seen == Const.GETSTATIC)) {
                      if (getClassConstantOperand().equals(returnType) && (lnTable.getSourceLine(invokePC) == lnTable.getSourceLine(getPC()))) {
                          bugReporter.reportBug(new BugInstance(this, BugType.NIR_NEEDLESS_INSTANCE_RETRIEVAL.name(), NORMAL_PRIORITY).addClass(this)
                                  .addMethod(this).addSourceLine(this));
                      }
                      state = State.SEEN_NOTHING;
                      returnType = null;
                  } else {
                      state = State.SEEN_NOTHING;
                      returnType = null;
                  }
              break;
  
              default:
                  state = State.SEEN_NOTHING;
                  returnType = null;
              break;
          }
      }
docs: overrides the interface to find accesses of static variables off of an instance immediately fetched from a method call.
  
  @param seen
  the opcode of the currently visited instruction