if (!analysis.same(result, origResult)) {
boolean thisResultChanged = false; if (resultWasTop) thisResultChanged = !analysis.isTop(result); else thisResultChanged = !analysis.same(result, origResult); if (thisResultChanged) {
	public void execute() throws DataflowAnalysisException {		boolean change;		if (DEBUG) {			String shortAnalysisName = analysis.getClass().getName();			int pkgEnd = shortAnalysisName.lastIndexOf('.');			if (pkgEnd >= 0) {				shortAnalysisName = shortAnalysisName.substring(pkgEnd + 1);			}			System.out.println("Executing " + shortAnalysisName + " on " + cfg.getMethodName());		}		int timestamp = 0;		do {			change = false;			++numIterations;			if (DEBUG) {				System.out.println("----------------------------------------------------------------------");				System.out.println(this.getClass().getName() + " iteration: " + numIterations + ", timestamp: " + timestamp);				System.out.println("----------------------------------------------------------------------");			}			if (numIterations >= MAX_ITERS)				throw new DataflowAnalysisException("Too many iterations (" + numIterations + ") in dataflow!");				analysis.startIteration();						if (DEBUG) {				if (blockOrder instanceof ReverseDFSOrder) {					ReverseDFSOrder rBlockOrder = (ReverseDFSOrder) blockOrder;					System.out.println("Entry point is: " + logicalEntryBlock());					System.out.println("Basic block order: ");					Iterator<BasicBlock> i = blockOrder.blockIterator();					while (i.hasNext()) {						BasicBlock block = i.next();						if (DEBUG) debug(block, "rBlockOrder " + rBlockOrder.rdfs.getDiscoveryTime(block) + "\n");					}				}			}						// For each block in CFG...			Iterator<BasicBlock> i = blockOrder.blockIterator();			while (i.hasNext()) {				BasicBlock block = i.next();				if (DEBUG) debug(block, "start\n");					// Get start fact for block.				Fact start = analysis.getStartFact(block);				boolean needToRecompute = false;				//				 Get result facts for block,				Fact result = analysis.getResultFact(block);								// Meet all of the logical predecessor results into this block's start.				// Special case: if the block is the logical entry, then it gets				// the special "entry fact".				if (block == logicalEntryBlock()) {					analysis.makeFactTop(start);					analysis.initEntryFact(start);					if (DEBUG) debug(block, "Init entry fact ==> " + start + "\n");					needToRecompute = true;				} else {					int lastUpdated = analysis.getLastUpdateTimestamp(result);					Iterator<Edge> predEdgeIter = logicalPredecessorEdgeIterator(block);					int predCount = 0;					while (predEdgeIter.hasNext()) {						Edge edge = predEdgeIter.next();						BasicBlock logicalPred = isForwards ? edge.getSource() : edge.getTarget();							// Get the predecessor result fact						Fact predFact = analysis.getResultFact(logicalPred);						int predLastUpdated = analysis.getLastUpdateTimestamp(predFact);						if (!analysis.isTop(predFact)) {							predCount++;							if (predLastUpdated >= lastUpdated) {							needToRecompute = true;							if (DEBUG) {							System.out.println("Need to recompute. My timestamp = " + lastUpdated + ", pred timestamp = " + predLastUpdated + ", pred fact = " + predFact);							}							break;							}						}					}					if (predCount == 0) needToRecompute = true;					if (!needToRecompute) {						if (DEBUG) {							debug(block, "Skipping: predecessors haven't changed");							System.out.println(" curr timestamp: " + timestamp);							System.out.println(" last timestamp: " + lastUpdated);							predEdgeIter = logicalPredecessorEdgeIterator(block);							while (predEdgeIter.hasNext()) {								Edge edge = predEdgeIter.next();								BasicBlock logicalPred = isForwards ? edge.getSource() : edge.getTarget();																// Get the predecessor result fact								Fact predFact = analysis.getResultFact(logicalPred);								int predLastUpdated = analysis.getLastUpdateTimestamp(predFact);								System.out.println(" pred timestamp: " + predLastUpdated);								}							System.out.println("Fact: " + start);						}						continue;					}					if (needToRecompute) {						Fact origStart = analysis.createFact();						analysis.copy(start, origStart);									analysis.makeFactTop(start);						predEdgeIter = logicalPredecessorEdgeIterator(block);						while (predEdgeIter.hasNext()) {							Edge edge = predEdgeIter.next();							BasicBlock logicalPred = isForwards ? edge.getSource() : edge.getTarget();							// Get the predecessor result fact							Fact predFact = analysis.getResultFact(logicalPred);							// Apply the edge transfer function.							Fact edgeFact = analysis.createFact(); 							analysis.copy(predFact, edgeFact);							analysis.edgeTransfer(edge, edgeFact);							if (DEBUG && !analysis.same(edgeFact, predFact)) {								debug(block, logicalPred, edge,										"Edge transfer " + predFact + " ==> " + edgeFact);							}							// Merge the predecessor fact (possibly transformed by the edge transfer function)							// into the block's start fact.							if (DEBUG) debug(block, logicalPred, edge, "Meet " + start + " with " + edgeFact);							analysis.meetInto(edgeFact, edge, start);							if (DEBUG) System.out.println(" ==> " + start);						}						if (DEBUG && !needToRecompute && !analysis.same(origStart, start)) {							System.out.println("Huh. Thought I didn't need to recompute");							System.out.println("result: " + analysis.same(origStart, start));							System.out.println("Old value: " + origStart);							System.out.println("New Value: " + start);						}					}				}				if (DEBUG) debug(block, "start fact is " + start + "\n");					// making a copy of result facts (so we can detect if it changed).				Fact origResult = analysis.createFact();				analysis.copy(result, origResult);					if (true || analysis.isTop(start)) {					// Apply the transfer function.					analysis.transfer(block, null, start, result);				} else {					analysis.copy(start, result);				}				if (DEBUG && SystemProperties.getBoolean("dataflow.blockdebug")) {					debug(block, "Dumping flow values for block:\n");					Iterator<org.apache.bcel.generic.InstructionHandle> ii = block.instructionIterator();					while (ii.hasNext()) {						org.apache.bcel.generic.InstructionHandle handle = ii.next();						Fact tmpResult = analysis.createFact();						analysis.transfer(block, handle, start, tmpResult);						System.out.println("\t" + handle + " " + tmpResult);					}				}					// See if the result changed.				if (DEBUG) debug(block, "orig result is " + origResult + "\n");				if (!analysis.same(result, origResult)) {					timestamp++;					if (DEBUG) debug(block, "result changed at timestamp " + timestamp + "\n");					if (DEBUG && !needToRecompute) {						System.out.println("I thought I didn't need to recompute");					}					change = true;					analysis.setLastUpdateTimestamp(result, timestamp);				} else					analysis.setLastUpdateTimestamp(result, analysis.getLastUpdateTimestamp(origResult));								if (DEBUG) debug(block, "result is " + result + " @ timestamp " 						+ analysis.getLastUpdateTimestamp(result) + "\n");			}						analysis.finishIteration();		} while (change);	}