boolean matchedCurrentInstruction = false;
InstructionHandle matchedInstruction = null;
	private void work(BasicBlock basicBlock, BasicBlock.InstructionIterator instructionIterator,		PatternElement patternElement, int matchCount,		PatternElementMatch currentMatch, BindingSet bindingSet)		throws DataflowAnalysisException {		// Have we reached the end of the pattern?		if (patternElement == null) {			// This is a complete match.			resultList.add(new ByteCodePatternMatch(bindingSet, currentMatch));			return;		}		// If we've reached the minimum number of occurrences for this		// pattern element, we can advance to the next pattern element without trying		// to match this instruction again.		if (matchCount >= patternElement.minOccur())			work(basicBlock, instructionIterator.duplicate(), patternElement.getNext(), 0, currentMatch, bindingSet);		// If we've reached the maximum number of occurrences for this		// pattern element, then we can't continue.		if (matchCount >= patternElement.maxOccur())			return;		boolean matchedCurrentInstruction = false;		// Is there another instruction in this basic block?		if (instructionIterator.hasNext()) {			// Try to match the current instruction against the pattern element.			InstructionHandle handle = instructionIterator.next();			ValueNumberFrame frame = vnaDataflow.getFactAtLocation(new Location(handle, basicBlock));			bindingSet = patternElement.match(handle, frame, bindingSet);			if (bindingSet == null)				// Not a match.				return;			// Successful match!			matchedCurrentInstruction = true;			++matchCount;			currentMatch = new PatternElementMatch(patternElement, handle, matchCount, currentMatch);		}		// Continue the match at each successor instruction,		// using the same PatternElement.		if (instructionIterator.hasNext()) {			// Easy case; continue matching in the same basic block.			work(basicBlock, instructionIterator, patternElement, matchCount, currentMatch, bindingSet);		} else {			// We've reached the end of the basic block.			// Try to advance to the successors of this basic block,			// ignoring loop backedges.			Iterator<Edge> i = cfg.outgoingEdgeIterator(basicBlock);			while (i.hasNext()) {				Edge edge = i.next();				if (dfs.getDFSEdgeType(edge) == BACK_EDGE)					continue;				// If the PatternElement has just matched an instruction,				// then we allow it to choose which edges are acceptable.				// This allows PatternElements to select particular control edges;				// for example, only continue the pattern on the true branch				// of an "if" comparison.				if (!matchedCurrentInstruction || patternElement.acceptBranch(edge)) {					BasicBlock destBlock = edge.getDest();					work(destBlock, destBlock.instructionIterator(), patternElement, matchCount, currentMatch, bindingSet);				}			}		}	}