sawBranchTo(defaultSwitchOffset + PC);
	public void visit(Code obj) {		sizePrevOpcodeBuffer = 0;		currentPosInPrevOpcodeBuffer = prevOpcode.length-1;;		int switchLow = 1000000;		int switchHigh = -1000000;		codeBytes = obj.getCode();		DataInputStream byteStream = new DataInputStream(new ByteArrayInputStream(codeBytes));		lineNumberTable = obj.getLineNumberTable();		try {			for (int i = 0; i < codeBytes.length;) {				resetState();				PC = i;				opcodeIsWide = false;				opcode = byteStream.readUnsignedByte();				sizePrevOpcodeBuffer++;				currentPosInPrevOpcodeBuffer++;				if (currentPosInPrevOpcodeBuffer >= prevOpcode.length)					currentPosInPrevOpcodeBuffer = 0;				prevOpcode[currentPosInPrevOpcodeBuffer] = opcode;				i++;				// System.out.println(OPCODE_NAMES[opCode]);				int byteStreamArgCount = NO_OF_OPERANDS[opcode];				if (byteStreamArgCount == UNPREDICTABLE) {					if (opcode == LOOKUPSWITCH) {						int pad = 4 - (i & 3);						if (pad == 4) pad = 0;						byteStream.skipBytes(pad);						i += pad;						defaultSwitchOffset = byteStream.readInt();						branchOffset = defaultSwitchOffset;						branchTarget = branchOffset + PC;						i += 4;						int npairs = byteStream.readInt();						i += 4;						switchOffsets = new int[npairs];						switchLabels = new int[npairs];						for (int o = 0; o < npairs; o++) {							switchLabels[o] = byteStream.readInt();							switchOffsets[o] = byteStream.readInt();							i += 8;						}						;						sortByOffset(switchOffsets, switchLabels);					} else if (opcode == TABLESWITCH) {						int pad = 4 - (i & 3);						if (pad == 4) pad = 0;						byteStream.skipBytes(pad);						i += pad;						defaultSwitchOffset = byteStream.readInt();						branchOffset = defaultSwitchOffset;						branchTarget = branchOffset + PC;						i += 4;						switchLow = byteStream.readInt();						i += 4;						switchHigh = byteStream.readInt();						i += 4;						int npairs = switchHigh - switchLow + 1;						switchOffsets = new int[npairs];						switchLabels = new int[npairs];						for (int o = 0; o < npairs; o++) {							switchLabels[o] = o + switchLow;							switchOffsets[o] = byteStream.readInt();							i += 4;						}						;						sortByOffset(switchOffsets, switchLabels);					} else if (opcode == WIDE) {						opcodeIsWide = true;						opcode = byteStream.readUnsignedByte();						i++;						switch (opcode) {						case ILOAD:						case FLOAD:						case ALOAD:						case LLOAD:						case DLOAD:						case ISTORE:						case FSTORE:						case ASTORE:						case LSTORE:						case DSTORE:						case RET:							registerOperand = byteStream.readUnsignedShort();							i += 2;							break;						case IINC:							registerOperand = byteStream.readUnsignedShort();							i += 2;							intConstant = byteStream.readShort();							i += 2;							break;						default:							throw new IllegalStateException("bad wide bytecode: " + OPCODE_NAMES[opcode]);						}					} else						throw new IllegalStateException("bad unpredicatable bytecode: " + OPCODE_NAMES[opcode]);				} else {					if (byteStreamArgCount < 0) throw new IllegalStateException("bad length for bytecode: " + OPCODE_NAMES[opcode]);					for (int k = 0; k < TYPE_OF_OPERANDS[opcode].length; k++) {						int v;						int t = TYPE_OF_OPERANDS[opcode][k];						int m = MEANING_OF_OPERANDS[opcode][k];						boolean unsigned = (m == M_CP || m == M_R || m == M_UINT);						switch (t) {						case T_BYTE:							if (unsigned)								v = byteStream.readUnsignedByte();							else								v = byteStream.readByte();							/*							System.out.print("Read byte " + v);							System.out.println(" with meaning" + m);							*/							i++;							break;						case T_SHORT:							if (unsigned)								v = byteStream.readUnsignedShort();							else								v = byteStream.readShort();							i += 2;							break;						case T_INT:							v = byteStream.readInt();							i += 4;							break;						default:							throw new IllegalStateException();						}						switch (m) {						case M_BR:							branchOffset = v;							branchTarget = v + PC;							branchFallThrough = i;							break;						case M_CP:							constantRefOperand = getConstantPool().getConstant(v);							if (constantRefOperand instanceof ConstantClass) {								ConstantClass clazz = (ConstantClass) constantRefOperand;								classConstantOperand = getStringFromIndex(clazz.getNameIndex()).intern();								dottedClassConstantOperand = replaceSlashesWithDots(classConstantOperand);							}							if (constantRefOperand instanceof ConstantInteger)								intConstant = ((ConstantInteger) constantRefOperand).getBytes();							else if (constantRefOperand instanceof ConstantLong)								longConstant = ((ConstantLong) constantRefOperand).getBytes();							else if (constantRefOperand instanceof ConstantFloat)								floatConstant = ((ConstantFloat) constantRefOperand).getBytes();							else if (constantRefOperand instanceof ConstantDouble)								doubleConstant = ((ConstantDouble) constantRefOperand).getBytes();							else if (constantRefOperand instanceof ConstantString) {								int s = ((ConstantString) constantRefOperand).getStringIndex();								stringConstantOperand = getStringFromIndex(s);							} else if (constantRefOperand instanceof ConstantCP) {								ConstantCP cp = (ConstantCP) constantRefOperand;								ConstantClass clazz								        = (ConstantClass) getConstantPool().getConstant(cp.getClassIndex());								classConstantOperand = getStringFromIndex(clazz.getNameIndex()).intern();								dottedClassConstantOperand = replaceSlashesWithDots(classConstantOperand);								ConstantNameAndType sig								        = (ConstantNameAndType) getConstantPool().getConstant(cp.getNameAndTypeIndex());								nameConstantOperand = getStringFromIndex(sig.getNameIndex());								sigConstantOperand = getStringFromIndex(sig.getSignatureIndex()).intern();								dottedSigConstantOperand = replaceSlashesWithDots(sigConstantOperand);								StringBuffer ref = new StringBuffer(5 + dottedClassConstantOperand.length()								        + nameConstantOperand.length()								        + dottedSigConstantOperand.length());								ref.append(dottedClassConstantOperand)								        .append(".")								        .append(nameConstantOperand)								        .append(" : ")								        .append(dottedSigConstantOperand);								refConstantOperand = ref.toString();							}							break;						case M_R:							registerOperand = v;							break;						case M_UINT:						case M_INT:							intConstant = v;						}					}				}				switch (opcode) {				case ILOAD_0:				case ILOAD_1:				case ILOAD_2:				case ILOAD_3:					registerOperand = opcode - ILOAD_0;					isRegisterLoad = true;					break;				case ALOAD_0:				case ALOAD_1:				case ALOAD_2:				case ALOAD_3:					registerOperand = opcode - ALOAD_0;					isRegisterLoad = true;					break;				case FLOAD_0:				case FLOAD_1:				case FLOAD_2:				case FLOAD_3:					registerOperand = opcode - FLOAD_0;					isRegisterLoad = true;					break;				case DLOAD_0:				case DLOAD_1:				case DLOAD_2:				case DLOAD_3:					registerOperand = opcode - DLOAD_0;					isRegisterLoad = true;					break;				case LLOAD_0:				case LLOAD_1:				case LLOAD_2:				case LLOAD_3:					registerOperand = opcode - LLOAD_0;					isRegisterLoad = true;					break;				case ILOAD:				case FLOAD:				case ALOAD:				case LLOAD:				case DLOAD:					isRegisterLoad = true;					break;				case ISTORE_0:				case ISTORE_1:				case ISTORE_2:				case ISTORE_3:					registerOperand = opcode - ISTORE_0;					isRegisterStore = true;					break;				case ASTORE_0:				case ASTORE_1:				case ASTORE_2:				case ASTORE_3:					registerOperand = opcode - ASTORE_0;					isRegisterStore = true;					break;				case FSTORE_0:				case FSTORE_1:				case FSTORE_2:				case FSTORE_3:					registerOperand = opcode - FSTORE_0;					isRegisterStore = true;					break;				case DSTORE_0:				case DSTORE_1:				case DSTORE_2:				case DSTORE_3:					registerOperand = opcode - DSTORE_0;					isRegisterStore = true;					break;				case LSTORE_0:				case LSTORE_1:				case LSTORE_2:				case LSTORE_3:					registerOperand = opcode - LSTORE_0;					isRegisterStore = true;					break;				case ISTORE:				case FSTORE:				case ASTORE:				case LSTORE:				case DSTORE:					isRegisterStore = true;					break;				}				switch (opcode) {				case ILOAD:				case FLOAD:				case ALOAD:				case LLOAD:				case DLOAD:					// registerKind = opcode - ILOAD;					break;				case ISTORE:				case FSTORE:				case ASTORE:				case LSTORE:				case DSTORE:					// registerKind = opcode - ISTORE;					break;				case RET:					// registerKind = R_REF;					break;				case GETSTATIC:				case PUTSTATIC:					refFieldIsStatic = true;					break;				case GETFIELD:				case PUTFIELD:					refFieldIsStatic = false;					break;				}				sawOpcode(opcode);				if (opcode == TABLESWITCH) {					sawInt(switchLow);					sawInt(switchHigh);					int prevOffset = i - PC;					for (int o = 0; o <= switchHigh - switchLow; o++) {						sawBranchTo(switchOffsets[o] + PC);						sawOffset(switchOffsets[o] - prevOffset);						prevOffset = switchOffsets[o];					}					sawOffset(defaultSwitchOffset - prevOffset);				} else if (opcode == LOOKUPSWITCH) {					sawInt(switchOffsets.length);					int prevOffset = i - PC;					for (int o = 0; o < switchOffsets.length; o++) {						sawBranchTo(switchOffsets[o] + PC);						prevOffset = switchOffsets[o];						sawInt(switchLabels[o]);					}					sawOffset(defaultSwitchOffset - prevOffset);				} else					for (int k = 0; k < TYPE_OF_OPERANDS[opcode].length; k++) {						int m = MEANING_OF_OPERANDS[opcode][k];						switch (m) {						case M_BR:							sawBranchTo(branchOffset + PC);							if (branchOffset > 0)								sawOffset(branchOffset - (i - PC));							else								sawOffset(branchOffset);							break;						case M_CP:							if (constantRefOperand instanceof ConstantInteger)								sawInt(intConstant);							else if (constantRefOperand instanceof ConstantLong)								sawLong(longConstant);							else if (constantRefOperand instanceof ConstantFloat)								sawFloat(floatConstant);							else if (constantRefOperand instanceof ConstantDouble)								sawDouble(doubleConstant);							else if (constantRefOperand instanceof ConstantString)								sawString(stringConstantOperand);							else if (constantRefOperand instanceof ConstantFieldref)								sawField();							else if (constantRefOperand instanceof ConstantMethodref)								sawMethod();							else if (constantRefOperand instanceof ConstantInterfaceMethodref)								sawIMethod();							else if (constantRefOperand instanceof ConstantClass)								sawClass();							break;						case M_R:							sawRegister(registerOperand);							break;						case M_INT:							sawInt(intConstant);							break;						}					}			}		} catch (IOException e) {			System.out.println("Got IO Exception:");			e.printStackTrace();		}		try {			byteStream.close();		} catch (IOException e) {			assert false;		}	}