it2 = new Item("I", new Integer(dbc.getIntConstant()));
it2 = new Item("I", dbc.getIntConstant());
 	public void sawOpcode(DismantleBytecode dbc, int seen) { 		int register; 		String signature; 		Item it, it2, it3; 		Constant cons; 		if (dbc.isRegisterStore())  			setLastUpdate(dbc.getRegisterOperand(), dbc.getPC()); 		mergeJumps(dbc); 		needToMerge = true; 		switch (seen) { 		case ICONST_1: 			convertJumpToOneZeroState = 1; 			break; 		case GOTO: 			if (convertJumpToOneZeroState == 1 && dbc.getBranchOffset() == 4)  				convertJumpToOneZeroState = 2; 			else  				convertJumpToOneZeroState = 0; 			break; 		case ICONST_0: 			if (convertJumpToOneZeroState == 2) 				convertJumpToOneZeroState = 3; 			else convertJumpToOneZeroState = 0; 			break; 			default:convertJumpToOneZeroState = 0; 				 		} 		switch (seen) { 		case ICONST_0: 			convertJumpToZeroOneState = 1; 			break; 		case GOTO: 			if (convertJumpToZeroOneState == 1 && dbc.getBranchOffset() == 4)  				convertJumpToZeroOneState = 2; 			else  				convertJumpToZeroOneState = 0; 			break; 		case ICONST_1: 			if (convertJumpToZeroOneState == 2) 				convertJumpToZeroOneState = 3; 			else convertJumpToZeroOneState = 0; 			break; 		default:convertJumpToZeroOneState = 0; 		} 		try 		{	 		switch (seen) {	 			case ALOAD:	 				pushByLocalObjectLoad(dbc, dbc.getRegisterOperand());	 			break;	 				 			case ALOAD_0:	 			case ALOAD_1:	 			case ALOAD_2:	 			case ALOAD_3:	 				pushByLocalObjectLoad(dbc, seen - ALOAD_0);	 			break;	 				 			case DLOAD:	 				pushByLocalLoad("D", dbc.getRegisterOperand());	 			break;	 				 			case DLOAD_0:	 			case DLOAD_1:	 			case DLOAD_2:	 			case DLOAD_3:	 				pushByLocalLoad("D", seen - DLOAD_0);	 			break;	 			case FLOAD:	 				pushByLocalLoad("F", dbc.getRegisterOperand());	 			break;	 				 			case FLOAD_0:	 			case FLOAD_1:	 			case FLOAD_2:	 			case FLOAD_3:	 				pushByLocalLoad("F", seen - FLOAD_0);	 			break;	 			case ILOAD:	 				pushByLocalLoad("I", dbc.getRegisterOperand());	 			break;	 				 			case ILOAD_0:	 			case ILOAD_1:	 			case ILOAD_2:	 			case ILOAD_3:	 				pushByLocalLoad("I", seen - ILOAD_0);	 			break;	 			case LLOAD:	 				pushByLocalLoad("J", dbc.getRegisterOperand());	 			break;	 				 			case LLOAD_0:	 			case LLOAD_1:	 			case LLOAD_2:	 			case LLOAD_3:	 				pushByLocalLoad("J", seen - LLOAD_0);	 			break;	 				 				 			case GETSTATIC:					{					FieldAnnotation field = FieldAnnotation.fromReferencedField(dbc);	 				Item i = new Item(dbc.getSigConstantOperand(), field);	 				if (field.getFieldName().equals("separator") && field.getClassName().equals("java.io.File")) {	 					i.setSpecialKind(Item.FILE_SEPARATOR_STRING);	 				}	 					 				push(i);					break;					}	 				 			case LDC:	 			case LDC_W:				case LDC2_W:	 				cons = dbc.getConstantRefOperand();	 				pushByConstant(dbc, cons);				break;								case INSTANCEOF:					pop();					push(new Item("I"));				break;				case IFEQ:	 			case IFNE:	 			case IFLT:	 			case IFLE:	 			case IFGT:	 			case IFGE:	 			case IFNONNULL:	 			case IFNULL:				seenTransferOfControl = true; 				{ 					Item top = pop(); 					 					// if we see a test comparing a special negative value with 0, 					// reset all other such values on the opcode stack					if (top.valueCouldBeNegative() 							&& (seen == IFLT || seen == IFLE || seen == IFGT || seen == IFGE)) {						int specialKind = top.getSpecialKind();						for(Item item : stack) if (item.getSpecialKind() == specialKind) item.setSpecialKind(0);						for(Item item : lvValues) if (item.getSpecialKind() == specialKind) item.setSpecialKind(0);														} 				} 				addJumpValue(dbc.getBranchTarget());				 			break;	 			case LOOKUPSWITCH:	 		 			 			case TABLESWITCH:					seenTransferOfControl = true;	 				pop();	 				addJumpValue(dbc.getBranchTarget());	 				int pc = dbc.getBranchOffset() - dbc.getBranchTarget();	 				for(int offset : dbc.getSwitchOffsets())	 					addJumpValue(offset+pc);	 				 			break;	 			case ARETURN:	 			case DRETURN:	 			case FRETURN:	 			 			case IRETURN:	 			case LRETURN:	 								seenTransferOfControl = true;	 				pop();	 			break;	 			case MONITORENTER:	 			case MONITOREXIT:	 			case POP:	 			case PUTSTATIC:	 				pop();	 			break;	 				 			case IF_ACMPEQ:	 			case IF_ACMPNE:	 			case IF_ICMPEQ:	 			case IF_ICMPNE:	 			case IF_ICMPLT:	 			case IF_ICMPLE:	 			case IF_ICMPGT:	 			case IF_ICMPGE:	 									seenTransferOfControl = true;	 				pop(2);	 				addJumpValue(dbc.getBranchTarget());					break;											 			case POP2:	 				it = pop();	 				if (it.getSize() == 1) pop();	 				break;	 			case PUTFIELD:	 				pop(2);	 			break;	 				 			case IALOAD:	 			case SALOAD:	 				pop(2);	 				push(new Item("I"));	 			break;	 				 			case DUP: 	 				handleDup();	 			break;	 				 			case DUP2:	 				handleDup2();	 			break;	 				 			case DUP_X1:	 			handleDupX1();	 			break;	 				 			case DUP_X2:	 				handleDupX2();	 			break;	 			case DUP2_X1:	 					handleDup2X1();	 			break;	 				 				 			case IINC:	 				register = dbc.getRegisterOperand();	 				it = getLVValue( register );	 				it2 = new Item("I", new Integer(dbc.getIntConstant()));	 				pushByIntMath( IADD, it2, it);	 				pushByLocalStore(register);	 			break;	 			case ATHROW:					pop();					seenTransferOfControl = true;					reachOnlyByBranch = true;					break;	 			case CHECKCAST:	 			{	 				String castTo = dbc.getClassConstantOperand();	 					 				if (castTo.charAt(0) != '[') castTo = "L" + castTo + ";";	 				it = new Item(pop());	 				it.signature = castTo;	 				push(it);	 					 				break;	 					 						 			}	 			case NOP:					break;	 			case RET:	 			case RETURN:					seenTransferOfControl = true;					reachOnlyByBranch = true;					break;	 				 			case GOTO:	 			case GOTO_W:					//It is assumed that no stack items are present when					seenTransferOfControl = true;					reachOnlyByBranch = true;					addJumpValue(dbc.getBranchTarget());					stack.clear();						 			break;	 					 				 			case SWAP:	 				handleSwap();	 			break;	 				 			case ICONST_M1:	 			case ICONST_0:	 			case ICONST_1:	 			case ICONST_2:	 			case ICONST_3:	 			case ICONST_4:	 			case ICONST_5:	 				push(new Item("I", (seen-ICONST_0)));	 			break;	 				 			case LCONST_0:	 			case LCONST_1:	 				push(new Item("J", (long)(seen-LCONST_0)));	 			break;	 				 			case DCONST_0:	 			case DCONST_1:	 				push(new Item("D", (double)(seen-DCONST_0)));	 			break;	 			case FCONST_0:	 			case FCONST_1:	 			case FCONST_2:	 				push(new Item("F", (float)(seen-FCONST_0)));	 			break;	 			case ACONST_NULL:	 				push(new Item());	 			break;	 				 				 				 			case ASTORE:	 			case DSTORE:	 			case FSTORE:	 			case ISTORE:	 			case LSTORE:	 				pushByLocalStore(dbc.getRegisterOperand());	 			break;	 				 			case ASTORE_0:	 			case ASTORE_1:	 			case ASTORE_2:	 			case ASTORE_3:	 				pushByLocalStore(seen - ASTORE_0);	 			break;	 			case DSTORE_0:	 			case DSTORE_1:	 			case DSTORE_2:	 			case DSTORE_3:	 				pushByLocalStore(seen - DSTORE_0);	 			break;	 			case FSTORE_0:	 			case FSTORE_1:	 			case FSTORE_2:	 			case FSTORE_3:	 				pushByLocalStore(seen - FSTORE_0);	 			break;	 			case ISTORE_0:	 			case ISTORE_1:	 			case ISTORE_2:	 			case ISTORE_3:	 				pushByLocalStore(seen - ISTORE_0);	 			break;	 				 			case LSTORE_0:	 			case LSTORE_1:	 			case LSTORE_2:	 			case LSTORE_3:	 				pushByLocalStore(seen - LSTORE_0);	 			break;	 			case GETFIELD:	 				pop();	 				push(new Item(dbc.getSigConstantOperand(), 						FieldAnnotation.fromReferencedField(dbc)));	 			break;	 				 			case ARRAYLENGTH:	 				pop();	 				push(new Item("I"));	 			break;	 				 			case BALOAD:	 			{	 				pop(2);	 				Item v =  new Item("I");	 				v.setSpecialKind(Item.SIGNED_BYTE);	 				push(v);	 				break;	 			}	 			case CALOAD:	 				pop(2);	 				push(new Item("I"));	 			break;	 				 			case DALOAD:	 				pop(2);	 				push(new Item("D"));	 			break;	 				 			case FALOAD:	 				pop(2);	 				push(new Item("F"));	 			break;	 				 			case LALOAD:	 				pop(2);	 				push(new Item("J"));	 			break;	 				 			case AASTORE:	 			case BASTORE:	 			case CASTORE:	 			case DASTORE:	 			case FASTORE:	 			case IASTORE:	 			case LASTORE:	 			case SASTORE:	 				pop(3);	 			break;	 				 			case BIPUSH:	 			case SIPUSH:	 				push(new Item("I", (Integer)dbc.getIntConstant()));	 			break;	 				 			case IADD:	 			case ISUB:	 			case IMUL:	 			case IDIV:	 			case IAND:	 			case IOR:	 			case IXOR:	 			case ISHL:	 			case ISHR:	 			case IREM:	 			case IUSHR:	 				it = pop();	 				it2 = pop();	 				pushByIntMath(seen, it2, it);	 			break;	 				 			case INEG:	 				it = pop();	 				if (it.getConstant() != null) {	 					push(new Item("I", new Integer(-(Integer) it.getConstant())));	 				} else {	 					push(new Item("I"));	 				}	 			break;	 				 			case LNEG:	 				it = pop();	 				if (it.getConstant() != null) {	 					push(new Item("J", new Long(-(Long) it.getConstant())));	 				} else {	 					push(new Item("J"));	 				}	 			break;	 			case DNEG:	 				it = pop();	 				if (it.getConstant() != null) {	 					push(new Item("D", new Double(-(Double) it.getConstant())));	 				} else {	 					push(new Item("D"));	 				}	 			break;	 			case LADD:	 			case LSUB:	 			case LMUL:	 			case LDIV:	 			case LAND:	 			case LOR:	 			case LXOR:	 			case LSHL:	 			case LSHR:	 			case LREM:	 			case LUSHR:	 					 				it = pop();	 				it2 = pop();	 				pushByLongMath(seen, it2, it);	 					 			break; 				 			case LCMP:	 			handleLcmp();	 			break;	 					 			case FCMPG:	 			case FCMPL: handleFcmp();	 			break;	 			case DCMPG:	 			case DCMPL:	 				handleDcmp();	 			break;	 				 			case FADD:	 			case FSUB:	 			case FMUL:	 			case FDIV:	 				it = pop();	 				it2 = pop();	 				pushByFloatMath(seen, it, it2);	 			break;	 			case DADD:	 			case DSUB:	 			case DMUL:	 			case DDIV:	 			case DREM:	 				it = pop();	 				it2 = pop();	 				pushByDoubleMath(seen, it, it2);	 			break;	 				 			case I2B:	 				it = pop();	 				if (it.getConstant() != null) {	 					it =new Item("I", (byte)constantToInt(it));	 				} else {	 					it = new Item("I");	 				}	 				it.setSpecialKind(Item.SIGNED_BYTE);	 				push(it);	 			break;	 			case I2C:	 				it = pop();	 				if (it.getConstant() != null) {	 					push(new Item("I", (char)constantToInt(it)));	 				} else {	 					push(new Item("I"));	 				}	 			break;	 				 			case I2L:	 			case D2L:{	 				it = pop();	 				Item newValue;	 				if (it.getConstant() != null) {	 					newValue = new Item("J", constantToLong(it));	 				} else {	 					newValue = new Item("J");	 				}	 				newValue.setSpecialKind(it.getSpecialKind());	 				push(newValue);	 			}	 			break;	 			case I2S:	 				it = pop();	 				if (it.getConstant() != null) {	 					push(new Item("I", (short)constantToInt(it)));	 				} else {	 					push(new Item("I"));	 				}	 			break;	 			case L2I:	 			case D2I:	 			case F2I:	 				it = pop();	 				if (it.getConstant() != null) {	 					push(new Item("I",constantToInt(it)));	 				} else {	 					push(new Item("I"));	 				}	 			break;	 				 			case L2F:	 			case D2F:	 			case I2F:	 				it = pop();	 				if (it.getConstant() != null) {	 					push(new Item("F", new Float(constantToFloat(it))));	 				} else {	 					push(new Item("F"));	 				}	 			break;	 			case F2D:	 			case I2D:	 			case L2D:	 				it = pop();	 				if (it.getConstant() != null) {	 					push(new Item("D", constantToDouble(it)));	 				} else {	 					push(new Item("D"));	 				}	 			break;	 				 			case NEW:	 				pushBySignature("L" + dbc.getClassConstantOperand() + ";");	 			break;	 				 			case NEWARRAY:	 				pop();	 				signature = "[" + BasicType.getType((byte)dbc.getIntConstant()).getSignature();	 				pushBySignature(signature);	 			break;				// According to the VM Spec 4.4.1, anewarray and multianewarray				// can refer to normal class/interface types (encoded in				// "internal form"), or array classes (encoded as signatures				// beginning with "[").	 				 			case ANEWARRAY:	 				pop();					signature = dbc.getClassConstantOperand();					if (!signature.startsWith("[")) {						signature = "[L" + signature + ";";					}	 				pushBySignature(signature);	 			break;	 				 			case MULTIANEWARRAY:	 				int dims = dbc.getIntConstant();	 				while ((dims--) > 0) {	 					pop();	 				}					signature = dbc.getClassConstantOperand();					if (!signature.startsWith("[")) {						dims = dbc.getIntConstant();						signature = "";						while ((dims--) > 0)							signature += "[";						signature += "L" + signature + ";";					}					pushBySignature(signature);	 			break;	 					 			case AALOAD:	 				pop();	 				it = pop();	 				pushBySignature(it.getElementSignature());	 			break;	 				 				 			case JSR:	 				push(new Item("")); //?	 			break;	 							case INVOKEINTERFACE:	 			case INVOKESPECIAL:	 			case INVOKESTATIC:	 			case INVOKEVIRTUAL:	 				processMethodCall(dbc, seen);	 			break;	 					 			default:	 				throw new UnsupportedOperationException("OpCode " + OPCODE_NAMES[seen] + " not supported " );	 		}	 	}	 	catch (RuntimeException e) {	 		//If an error occurs, we clear the stack and locals. one of two things will occur. 	 		//Either the client will expect more stack items than really exist, and so they're condition check will fail, 	 		//or the stack will resync with the code. But hopefully not false positives	 		// TODO: log this	 		if (DEBUG) 	 			e.printStackTrace();	 		clear();	 	}	 	finally {	 		if (exceptionHandlers.get(dbc.getNextPC()))	 			push(new Item());	 		if (DEBUG) {	 			System.out.println(dbc.getNextPC() + "pc : " + OPCODE_NAMES[seen] + "  stack depth: " + getStackDepth());	 			System.out.println(this);	 		}	 	} 	}