code: @Override
      public void sawOpcode(int seen) {
          ImmutabilityType seenImmutable = null;
          try {
              stack.precomputation(this);
  
              switch (seen) {
                  case Const.INVOKESTATIC: {
                      String className = getClassConstantOperand();
                      String methodName = getNameConstantOperand();
  
                      if (IMMUTABLE_PRODUCING_METHODS.contains(className + '.' + methodName)) {
                          seenImmutable = ImmutabilityType.IMMUTABLE;
                          break;
                      }
                  }
                  //$FALL-THROUGH$
                  case Const.INVOKEINTERFACE:
                  case Const.INVOKESPECIAL:
                  case Const.INVOKEVIRTUAL: {
                      String className = getClassConstantOperand();
                      String methodName = getNameConstantOperand();
                      String signature = getSigConstantOperand();
  
                      MethodInfo mi = Statistics.getStatistics().getMethodStatistics(className, methodName, signature);
                      seenImmutable = mi.getImmutabilityType();
                      if (seenImmutable == ImmutabilityType.UNKNOWN) {
                          seenImmutable = null;
                      }
                  }
                  break;
  
                  case Const.ARETURN: {
                      processARreturn();
                      break;
                  }
                  default:
                  break;
              }
  
          } finally {
              stack.sawOpcode(this, seen);
              if ((seenImmutable != null) && (stack.getStackDepth() > 0)) {
                  OpcodeStack.Item item = stack.getStackItem(0);
                  item.setUserValue(seenImmutable);
              }
          }
      }
docs: overrides the visitor to look for calls to static methods that are known to return immutable collections It records those variables, and documents if
  what the method returns is one of those objects.