System.out.println(queue.get(q));
SpaceTimeBackend.println(queue.get(q).toString());
    public static LinkedList getTraversal(Trace[] forrest)     {	LinkedList traversal = new LinkedList();		SpaceTimeBackend.println("Size of forrest: " + forrest.length);	//printForrest(forrest);		HashSet visited = new HashSet();	Vector queue = new Vector();	//we'll do one forrest at a time for now	for (int i = 0; i < forrest.length; i++) {	    SpaceTimeBackend.println("Traversal for Forest " + i);	    SpaceTimeBackend.println(" Head of traversal " + forrest[i]);	    Trace trace;	    	    //queue.add(forrest[i]);	    	    //try to add the first node of the forrest to the traversal	    addToTraversal(forrest[i], traversal, visited, queue);			    while (!queue.isEmpty()) {		//we should always be able to find one trace on each iteration		trace = null;		//find the first Trace with its dependencies satisfied...		for (int j = 0; j < queue.size(); j++) {		    Trace current = (Trace)queue.get(j);		    boolean satisfied = true;		    		    		    //cycle thru the backedges and see if they were all visited...		    for (int k = 0; k < current.getDepends().length; k++) {			if (!visited.contains(current.getDepends()[k])) {			    satisfied = false;			    break;			}		    }		    // found a Trace to add, remove it and break		    if (satisfied) {			trace = current;			break;		    }		}		//if the trace is null, we could not find anything to add		//so break and look at the next head		if (trace == null) {		    if (!queue.isEmpty()) {			System.out.println(" ****  QUEUE NOT EMPTY ****");						for (int q= 0; q < queue.size(); q++)			    System.out.println(queue.get(q));		    }					    break;		}				addToTraversal(trace, traversal, visited, queue);	    }	    	}	return traversal;    }