if (isRegisterStore()) lastUpdate[getRegisterOperand()] = getPC(); else { switch(state) { case 0: if (isRegisterLoad()) { state = 1; age = lastUpdate[getRegisterOperand()]; } break; case 1: switch(seen) { case ICONST_0: case ICONST_1: case ICONST_2: case ICONST_3: case ICONST_4: case ICONST_5: case ICONST_M1: case BIPUSH: case SIPUSH: state = 2; break; default: state = 0; } break; case 2: switch(seen) { case IF_ICMPNE: case IF_ICMPEQ: case IF_ICMPGT: case IF_ICMPLE: case IF_ICMPLT: case IF_ICMPGE: if (getBranchOffset() < 0 && age <  getBranchTarget() && lastBranch < getBranchTarget()) { BugInstance bug = new BugInstance(this, "IL_INFINITE_LOOP", HIGH_PRIORITY) .addClassAndMethod(this).addSourceLine(this,getPC());  bugReporter.reportBug(bug); System.out.println("Found it");  } } state = 0;  } }  stack.sawOpcode(this,seen);
stack.sawOpcode(this, seen);
	public void sawOpcode(int seen) {		stack.mergeJumps(this);		switch(seen) {		case ARETURN:		case IRETURN:		case RETURN:		case DRETURN:		case FRETURN:		case LRETURN:		lastBranch = getPC();		}		// System.out.println(getPC() + "\t" + OPCODE_NAMES[seen] + "\t" + state);		if (isRegisterStore()) lastUpdate[getRegisterOperand()] = getPC();		else {			switch(state) {			case 0:				if (isRegisterLoad()) {					state = 1;					age = lastUpdate[getRegisterOperand()];				}				break;			case 1: 				switch(seen) {				case ICONST_0:				case ICONST_1:				case ICONST_2:				case ICONST_3:				case ICONST_4:				case ICONST_5:				case ICONST_M1:				case BIPUSH:				case SIPUSH:					state = 2;					break;				default:					state = 0;				}				break;			case 2:				switch(seen) {				case IF_ICMPNE:				case IF_ICMPEQ:				case IF_ICMPGT:				case IF_ICMPLE:				case IF_ICMPLT:				case IF_ICMPGE:					if (getBranchOffset() < 0 && age <  getBranchTarget() && lastBranch < getBranchTarget()) {						BugInstance bug = new BugInstance(this, "IL_INFINITE_LOOP", HIGH_PRIORITY)				        .addClassAndMethod(this).addSourceLine(this,getPC());									bugReporter.reportBug(bug);						System.out.println("Found it");											}				}				state = 0;								}		}				stack.sawOpcode(this,seen);	}