The opcode that loads a zero constant of a given type code.
@param tc   The given type code (@see ByteCode).
773294
public static int zero(int tc) {
        switch(tc) {
        case INTcode: case BYTEcode: case SHORTcode: case CHARcode:
            return iconst_0;
        case LONGcode:
            return lconst_0;
        case FLOATcode:
            return fconst_0;
        case DOUBLEcode:
            return dconst_0;
        default:
            throw new AssertionError("zero");
        }
    }
352335
private static <DeclaredT, RuntimeT> TypeCodec<DeclaredT> uncheckedCast(
      TypeCodec<RuntimeT> codec) {
    @SuppressWarnings("unchecked")
    TypeCodec<DeclaredT> result = (TypeCodec<DeclaredT>) codec;
    return result;
  }
151154
public static void info(TraceComponent tc, String msgKey) {
    if(isTracing()) SibTr.info(tc, msgKey);

  }
945731
public OrtcFactory loadOrtcFactory(String ortcType) throws InstantiationException, IllegalAccessException, ClassNotFoundException {
    OrtcFactory result = null;

    // Gets the plugin class definition
    Class<?> factoryClass = this.getClass().getClassLoader()
        .loadClass(String.format("ibt.ortc.plugins.%s.%sFactory", ortcType, ortcType));

    if (factoryClass != null) {
      // Creates an instance of the plugin class
      result = OrtcFactory.class.cast(factoryClass.newInstance());
    }

    return result;
  }
1187128
public TypeConverter addConverter(final TypeConverter tc) {
        if (tc.getSupportedTypes() != null) {
            for (final Class c : tc.getSupportedTypes()) {
                addTypedConverter(c, tc);
            }
        } else {
            untypedTypeEncoders.add(tc);
        }

        registeredConverterClasses.add(tc.getClass());
        tc.setMapper(mapper);

        return tc;
    }
146430
@Override
    public void sawOpcode(int seen) {
        int pc = 0;
        try {
            stack.precomputation(this);

            switch (state) {
                case SAW_NOTHING:
                    pc = sawOpcodeAfterNothing(seen);
                break;

                case SAW_CTOR:
                    if ((seen == Const.POP) || (seen == Const.RETURN)) {
                        bugReporter.reportBug(new BugInstance(this, BugType.SEC_SIDE_EFFECT_CONSTRUCTOR.name(), NORMAL_PRIORITY).addClass(this).addMethod(this)
                                .addSourceLine(this));
                    }
                    state = State.SAW_NOTHING;
                break;
            }
        } finally {
            TernaryPatcher.pre(stack, seen);
            stack.sawOpcode(this, seen);
            TernaryPatcher.post(stack, seen);
            if ((pc != 0) && (stack.getStackDepth() > 0)) {
                OpcodeStack.Item item = stack.getStackItem(0);
                item.setUserValue(Integer.valueOf(pc));
            }
        }
    }
928085
@Override
    public void sawOpcode(int seen) {
        boolean allConstantStrings = false;
        boolean sawConstant = false;
        try {
            stack.precomputation(this);

            if (seen == Const.ATHROW) {
                checkForWEM();
            } else if ((seen == Const.LDC) || (seen == Const.LDC_W)) {
                if (getConstantRefOperand() instanceof ConstantString) {
                    sawConstant = true;
                }
            } else if ((seen == Const.INVOKESPECIAL) && Values.CONSTRUCTOR.equals(getNameConstantOperand())) {
                String clsName = getClassConstantOperand();
                if (clsName.indexOf("Exception") < 0) {
                    return;
                }
                JavaClass exCls = Repository.lookupClass(clsName);
                if (!exCls.instanceOf(exceptionClass)) {
                    return;
                }
                String sig = getSigConstantOperand();
                List<String> argTypes = SignatureUtils.getParameterSignatures(sig);
                int stringParms = 0;
                for (int t = 0; t < argTypes.size(); t++) {
                    if (!Values.SIG_JAVA_LANG_STRING.equals(argTypes.get(t))) {
                        continue;
                    }
                    stringParms++;
                    int stackOffset = argTypes.size() - t - 1;
                    if ((stack.getStackDepth() > stackOffset) && (stack.getStackItem(stackOffset).getUserValue() == null)) {
                        return;
                    }
                }
                if (Values.SLASHED_JAVA_LANG_EXCEPTION.equals(clsName) && SignatureBuilder.SIG_THROWABLE_TO_VOID.equals(getSigConstantOperand())) {
                    bugReporter.reportBug(
                            new BugInstance(this, BugType.WEM_OBSCURING_EXCEPTION.name(), LOW_PRIORITY).addClass(this).addMethod(this).addSourceLine(this));
                }
                allConstantStrings = stringParms > 0;
            }
        } catch (ClassNotFoundException cnfe) {
            bugReporter.reportMissingClass(cnfe);
        } finally {
            TernaryPatcher.pre(stack, seen);
            stack.sawOpcode(this, seen);
            TernaryPatcher.post(stack, seen);
            if ((sawConstant || allConstantStrings) && (stack.getStackDepth() > 0)) {
                OpcodeStack.Item item = stack.getStackItem(0);
                item.setUserValue(Boolean.TRUE);
            }
        }
    }
630229
@Override
    public void sawOpcode(int seen) {
        if (seenReturn && seenTransferOfControl && seenStateChange) {
            return;
        }

        if (DEBUG) {
            System.out.println(stack);
            System.out.println(getPC() + " : " + Const.getOpcodeName(seen));
        }

        if ((seen == Const.INVOKEVIRTUAL || seen == Const.INVOKEINTERFACE) && "add".equals(getNameConstantOperand())
                && "(Ljava/lang/Object;)Z".equals(getSigConstantOperand()) && stack.getStackDepth() >= 2) {
            OpcodeStack.Item it0 = stack.getStackItem(0);
            int r0 = it0.getRegisterNumber();
            OpcodeStack.Item it1 = stack.getStackItem(1);
            int r1 = it1.getRegisterNumber();
            if (r0 == r1 && r0 > 0) {
                bugReporter.reportBug(new BugInstance(this, "IL_CONTAINER_ADDED_TO_ITSELF", NORMAL_PRIORITY).addClassAndMethod(
                        this).addSourceLine(this));
            }
        }

        if ((seen == Const.INVOKEVIRTUAL || seen == Const.INVOKESPECIAL || seen == Const.INVOKEINTERFACE || seen == Const.INVOKESTATIC)
                && getNameConstantOperand().equals(getMethodName())
                && getSigConstantOperand().equals(getMethodSig())
                && (seen == Const.INVOKESTATIC) == getMethod().isStatic()
                && (seen == Const.INVOKESPECIAL) == (getMethod().isPrivate() && !getMethod().isStatic() || Const.CONSTRUCTOR_NAME.equals(getMethodName()))) {
            Type arguments[] = getMethod().getArgumentTypes();
            // stack.getStackDepth() >= parameters
            int parameters = arguments.length;
            if (!getMethod().isStatic()) {
                parameters++;
            }
            XMethod xMethod = XFactory.createReferencedXMethod(this);
            if (DEBUG) {
                System.out.println("IL: Checking...");
                System.out.println(xMethod);
                System.out.println("vs. " + getClassName() + "." + getMethodName() + " : " + getMethodSig());

            }
            if (xMethod.getClassName().replace('.', '/').equals(getClassName()) || seen == Const.INVOKEINTERFACE) {
                // Invocation of same method
                // Now need to see if parameters are the same
                int firstParameter = 0;
                if (Const.CONSTRUCTOR_NAME.equals(getMethodName())) {
                    firstParameter = 1;
                }

                // match1 should be true if it is any call to the exact same
                // method
                // and no state has been change.
                // if match1 is true, the method may not always perform
                // a recursive infinite loop, but this particular method call is
                // an infinite
                // recursive loop

                boolean match1 = !seenStateChange;
                for (int i = firstParameter; match1 && i < parameters; i++) {
                    OpcodeStack.Item it = stack.getStackItem(parameters - 1 - i);
                    if (!it.isInitialParameter() || it.getRegisterNumber() != i) {
                        match1 = false;
                    }
                }

                boolean sameMethod = seen == Const.INVOKESTATIC || Const.CONSTRUCTOR_NAME.equals(getNameConstantOperand());
                if (!sameMethod) {
                    // Have to check if first parmeter is the same
                    // know there must be a this argument
                    if (DEBUG) {
                        System.out.println("Stack is " + stack);
                    }
                    OpcodeStack.Item p = stack.getStackItem(parameters - 1);
                    if (DEBUG) {
                        System.out.println("parameters = " + parameters + ", Item is " + p);
                    }
                    String sig = p.getSignature();
                    sameMethod = p.isInitialParameter() && p.getRegisterNumber() == 0 && sig.equals("L" + getClassName() + ";");

                }

                // match2 and match3 are two different ways of seeing if the
                // call site
                // postdominates the method entry.

                // technically, we use (!seenTransferOfControl || !seenReturn &&
                // largestBranchTarget < getPC())
                // as a check that the call site postdominates the method entry.
                // If those are true,
                // and sameMethod is true, we have a guaranteed IL.

                boolean match2 = sameMethod && !seenTransferOfControl;
                boolean match3 = sameMethod && !seenReturn && largestBranchTarget < getPC();
                if (match1 || match2 || match3) {
                    if (DEBUG) {
                        System.out.println("IL: " + sameMethod + " " + match1 + " " + match2 + " " + match3);
                    }
                    //                    int priority = HIGH_PRIORITY;
                    //                    if (!match1 && !match2 && seenThrow)
                    //                        priority = NORMAL_PRIORITY;
                    //                    if (seen == Const.INVOKEINTERFACE)
                    //                        priority = NORMAL_PRIORITY;
                    bugReporter.reportBug(new BugInstance(this, "IL_INFINITE_RECURSIVE_LOOP", HIGH_PRIORITY).addClassAndMethod(
                            this).addSourceLine(this));
                }
            }
        }

        switch (seen) {
        case Const.ARETURN:
        case Const.IRETURN:
        case Const.LRETURN:
        case Const.RETURN:
        case Const.DRETURN:
        case Const.FRETURN:
            seenReturn = true;
            seenTransferOfControl = true;
            break;
        case Const.ATHROW:
            //            seenThrow = true;
            seenTransferOfControl = true;
            break;
        case Const.PUTSTATIC:
        case Const.PUTFIELD:
        case Const.IASTORE:
        case Const.AASTORE:
        case Const.DASTORE:
        case Const.FASTORE:
        case Const.LASTORE:
        case Const.SASTORE:
        case Const.CASTORE:
        case Const.BASTORE:
            seenStateChange = true;
            break;
        case Const.INVOKEVIRTUAL:
        case Const.INVOKESPECIAL:
        case Const.INVOKEINTERFACE:
        case Const.INVOKESTATIC:
            if ("print".equals(getNameConstantOperand()) || "println".equals(getNameConstantOperand())
                    || "log".equals(getNameConstantOperand()) || "toString".equals(getNameConstantOperand())) {
                break;
            }
            seenStateChange = true;
            break;
        default:
            break;
        }
    }
1231233
public BytecodeVariable defineVariable(Variable v, boolean initFromStack) {
        return defineVariable(v, v.getOriginType(), initFromStack);
    }
1165031
public static void dump(TraceComponent tc, String msg) {
    if(isTracing()) SibTr.dump(tc, msg);
  }
788553
@Override
    public void sawOpcode(int seen) {
        if (seen == Const.PUTFIELD) {
            OpcodeStack stack = getStack();
            if (stack.getStackDepth() > 0) {
                int reg = stack.getStackItem(0).getRegisterNumber();
                if ((reg >= 0) && (reg < firstLocalRegister)) {
                    clearSpecialField(getNameConstantOperand());
                }
            }
        }
        super.sawOpcode(seen);
    }
310524
public void if_tcmplt(TypeMirror type, String target) throws IOException
    {
        pushType(type);
        if_tcmplt(target);
        popType();
    }
480362
int setMaxInactToZero(String sessId, String appName) {
        final boolean trace = TraceComponent.isAnyTracingEnabled();

        int rc = -1;
        while (rc == -1) {
            if (trace && tc.isDebugEnabled())
                tcInvoke(tcSessionMetaCache, "get", sessId);

            ArrayList<?> oldValue = sessionMetaCache.get(sessId);

            if (trace && tc.isDebugEnabled())
                tcReturn(tcSessionMetaCache, "get", oldValue);

            SessionInfo sessionInfo = oldValue == null ? null : new SessionInfo(oldValue).clone();
            if (sessionInfo == null || sessionInfo.getMaxInactiveTime() == 0) {
                rc = 0;
            } else {
                sessionInfo.setMaxInactiveTime(0);
                ArrayList<Object> newValue = sessionInfo.getArrayList();

                if (trace && tc.isDebugEnabled())
                    tcInvoke(tcSessionMetaCache, "replace", sessId, oldValue, newValue);

                if (sessionMetaCache.replace(sessId, oldValue, newValue))
                    rc = 1;

                if (trace && tc.isDebugEnabled())
                    tcReturn(tcSessionMetaCache, "replace", rc == 1);
            }
        }

        return rc;
    }
464993
public void writeUTF8Const(String value)
    throws IOException
  {
    ConstantPool pool =  _javaClass.getConstantPool();
    Utf8Constant entry = pool.getUTF8(value);

    if (entry != null)
      writeShort(entry.getIndex());
    else
      throw new NullPointerException(L.l("utf8 constant {0} does not exist", value));
  }
299821
public static void exception (TraceComponent tc, Exception e) {
    exception(null, tc, (Throwable)e);
  }
429205
public void init(TCPConnectionContext tsc, ConnectionLink link, VirtualConnection vc, HttpChannelConfig hcc) {
        if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled()) {
            Tr.debug(tc, "Initializing ISC: " + this);
        }
        super.init(tsc, hcc);
        setBodyRC(HttpISCBodyReadCallback.getRef());
        this.myLink = (HttpInboundLink) link;
        if (link instanceof H2HttpInboundLinkWrap) {
            super.setH2Connection(true);
            super.setPushPromise(((H2HttpInboundLinkWrap) link).isPushPromise());
        }
        setVC(vc);
        vc.getStateMap().put(CallbackIDs.CALLBACK_HTTPISC, this);
        // during discrimination, this is skipped so do it now
        getRequestImpl().initScheme();
    }
1230272
@Override
    public void sawOpcode(int seen) {
        ImmutabilityType imType = null;

        try {
            stack.precomputation(this);

            switch (seen) {
                case Const.INVOKESTATIC:
                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);
                    imType = mi.getImmutabilityType();

                    if (seen == Const.INVOKEINTERFACE) {
                        Integer collectionOffset = MODIFYING_METHODS.get(new QMethod(methodName, signature));
                        if ((collectionOffset != null) && CollectionUtils.isListSetMap(className) && (stack.getStackDepth() > collectionOffset.intValue())) {
                            OpcodeStack.Item item = stack.getStackItem(collectionOffset.intValue());
                            ImmutabilityType type = (ImmutabilityType) item.getUserValue();

                            if ((type == ImmutabilityType.IMMUTABLE)
                                    || ((type == ImmutabilityType.POSSIBLY_IMMUTABLE) && (reportedType != ImmutabilityType.POSSIBLY_IMMUTABLE))) {
                                bugReporter.reportBug(new BugInstance(this, BugType.MUC_MODIFYING_UNMODIFIABLE_COLLECTION.name(),
                                        (type == ImmutabilityType.IMMUTABLE) ? HIGH_PRIORITY : NORMAL_PRIORITY).addClass(this).addMethod(this)
                                                .addSourceLine(this));
                                if (type == ImmutabilityType.IMMUTABLE) {
                                    throw new StopOpcodeParsingException();
                                }

                                reportedType = type;
                            }
                        }
                    }
                }
                break;
                default:
                break;
            }
        } catch (ClassNotFoundException cnfe) {
            bugReporter.reportMissingClass(cnfe);
        } finally {
            stack.sawOpcode(this, seen);
            if ((imType != null) && (stack.getStackDepth() > 0)) {
                OpcodeStack.Item item = stack.getStackItem(0);
                item.setUserValue(imType);
            }

        }
    }