if (node.getPrevious().isFilterTrace()) {
if (node.getPrevious() != null && node.getPrevious().isFilterTrace()) {
    private static void createSwitchCode(FilterTraceNode node, Trace parent, 					 FilterInfo filterInfo,					 boolean init, RawTile tile,					 RawChip rawChip)     {	//get the multiplicity based on the init variable	int mult = (init) ? node.getInitMult() : node.getSteadyMult();		for (int i = 0; i < mult; i++) {	    //append the receive code	    if (node.getPrevious() != null && node.getPrevious().isFilterTrace()) {		//if this is the init and it is the first time executing		//and a twostage filter, use initpop and multiply this		//by the size of the type it is receiving		int itemsReceiving = itemsNeededToFire(filterInfo, i, init) *		    Util.getTypeSize(node.getFilter().getInputType());		for (int j = 0; j < itemsReceiving; j++) {		    RouteIns ins = new RouteIns(tile);		    //add the route from the source tile to this		    //tile's compute processor		    ins.addRoute(rawChip.getTile(((FilterTraceNode)node.getPrevious()).getX(), 						 ((FilterTraceNode)node.getPrevious()).getY()),				 tile);		    tile.getSwitchCode().appendIns(ins, init);		}	    }	    //append the send code	    if (node.getNext() != null && node.getNext().isFilterTrace()) {		//get the items needed to fire and multiply it by the type 		//size		int items = itemsFiring(filterInfo, i, init) * 		    Util.getTypeSize(node.getFilter().getOutputType());				for (int j = 0; j < items; j++) {		    RouteIns ins = new RouteIns(tile);		    //add the route from this tile to the next trace node		    ins.addRoute(tile, rawChip.getTile(((FilterTraceNode)node.getNext()).getX(), 						       ((FilterTraceNode)node.getNext()).getY()));		    //append the instruction		    tile.getSwitchCode().appendIns(ins, init);		}		    }	    	}		//now we must take care of the remaining items on the input tape 	//after the initialization phase if the upstream filter produces more than	//we consume in init	if (init) {	    if (node.getPrevious().isFilterTrace()) {				if (filterInfo.remaining > 0) {		    for (int i = 0; 			 i < filterInfo.remaining * Util.getTypeSize(node.getFilter().getInputType()); 			 i++) {			RouteIns ins = new RouteIns(tile);			//add the route from the source tile to this			//tile's compute processor			ins.addRoute(rawChip.getTile(((FilterTraceNode)node.getPrevious()).getX(), 						     ((FilterTraceNode)node.getPrevious()).getY()),				     tile);			tile.getSwitchCode().appendIns(ins, init);		    }   		}	    }	}    }