SubtypeQueryResult cachedResult = subtype.getSubtypeQueryResult(); if (cachedResult == null) {    LinkedList<ObjectType> work = new LinkedList<ObjectType>(); work.add(subtype);   HashSet<ObjectType> visited = new HashSet<ObjectType>();   LinkedList<String> missingClassList = new LinkedList<String>();   cachedResult = new SubtypeQueryResult();   while (!work.isEmpty()) { ObjectType type = work.removeFirst(); if (!visited.add(type)) continue;  cachedResult.addSupertype(type);  try {  resolveObjectType(type);   for (Iterator<ObjectType> i = inheritanceGraph.successorIterator(type); i.hasNext(); ) work.add(i.next()); } catch (ClassNotFoundException e) { String missingClassName = ClassNotFoundExceptionParser.getMissingClassName(e); if (missingClassName == null) missingClassName = "<unknown class>"; missingClassList.add(missingClassName); } }  if (!missingClassList.isEmpty()) cachedResult.setAndAdoptMissingClassList(missingClassList.toArray(new String[0]));   subtype.setSubtypeQueryResult(cachedResult); }
SubtypeQueryResult cachedResult = findSupertypes(subtype);
	public boolean isSubtype(ObjectType subtype, ObjectType supertype) throws ClassNotFoundException {		if (Debug.VERIFY_INTEGRITY) {			if (!inheritanceGraph.containsVertex(subtype))				throw new IllegalStateException("Inheritance graph does not contain node " +					subtype.getSignature());			if (!inheritanceGraph.containsVertex(supertype))				throw new IllegalStateException("Inheritance graph does not contain node " +					supertype.getSignature());		}		// See if there is a cached query result.		SubtypeQueryResult cachedResult = subtype.getSubtypeQueryResult();		if (cachedResult == null) {			// Breadth first traversal of supertypes				// Work queue			LinkedList<ObjectType> work = new LinkedList<ObjectType>();			work.add(subtype);				// Keep track of where we've been			HashSet<ObjectType> visited = new HashSet<ObjectType>();				// Keep track of missing classes			LinkedList<String> missingClassList = new LinkedList<String>();				// Cached result for future queries			cachedResult = new SubtypeQueryResult();				// Keep going until we have examined all supertypes.			while (!work.isEmpty()) {				ObjectType type = work.removeFirst();				if (!visited.add(type))					continue;					cachedResult.addSupertype(type);					try {					// Resolve the type so we know its supertypes.					resolveObjectType(type);						// Add all supertypes to work queue.					for (Iterator<ObjectType> i = inheritanceGraph.successorIterator(type); i.hasNext(); )						work.add(i.next());				} catch (ClassNotFoundException e) {					String missingClassName = ClassNotFoundExceptionParser.getMissingClassName(e);					if (missingClassName == null)						missingClassName = "<unknown class>";					missingClassList.add(missingClassName);				}			}				if (!missingClassList.isEmpty())				cachedResult.setAndAdoptMissingClassList(missingClassList.toArray(new String[0]));				// Cache result for future queries			subtype.setSubtypeQueryResult(cachedResult);		}		return cachedResult.isSupertype(supertype);	}