System.out.println(" * For " + input + " change " + edge + " from "  + mults.get(edge).doubleValue() + " to " + minMult);
    private boolean fixInputNodeBuffering(InputTraceNode input) {                Iterator<Edge> edges = input.getSourceSet().iterator();        HashMap<Edge, Double> mults = new HashMap<Edge, Double>();        double minMult = Double.MAX_VALUE;        //System.out.println("***** " + input + " " + input.getNext());                if (!edges.hasNext())            return false;                //find the edge that has the smallest multiplicity in the        //initialization stage        while(edges.hasNext()) {            Edge edge = edges.next();                        double mult =                 (initItemsPushed(edge) / ((double)input.getWeight(edge)));                        //System.out.print(edge + " mult: " + mult + ": ");            //System.out.println(initItemsPushed(edge) + " / " + input.getWeight(edge));                        //remember the mult of this edge                        //System.out.println(" * Mult for " + edge + " = " + mult +            //        " = " + initItemsPushed(edge) + " / " +             //        input.getWeight(edge));                        mults.put(edge, new Double(mult));            //remember the min, it will be the new multiplicity for all the edges            if (mult < minMult)                minMult = mult;        }               //make the target minimum multiplicity the an integral number         minMult = Math.floor(minMult);               //now add buffering so that the input trace node receives exactly the        //right amount of data from each input to perform the minimum number        //of iterations                      //re-iterate over the edges and if they don't have init mult        //minMult then add buffering by adding an upstream identity         //filter        boolean changes = false;                edges = input.getSourceSet().iterator();        while (edges.hasNext()) {            Edge edge = edges.next();                        double myMult = mults.get(edge).doubleValue();            //if the mult is not equal to the target mult, we must buffer            if (myMult != minMult) {                ///System.out.println("For " + input + " change " + edge + " from "  +                 //mults.get(edge).doubleValue() + " to " + minMult);                                changes = true;                Trace trace = edge.getSrc().getParent();                //System.out.println(" * Adding output buffering to " + trace);                //make sure that we have not already added buffering to this                 //trace, if we try to fix it will mess up the already fixed input                //trace node...                assert !editedTraces.contains(trace) :                     "Trying to add different buffering amounts to " + trace;                //the number of items that we should let pass in the init                //stage for the upstream filter, the rest that it produces in the                //init are buffered...                //System.out.println("   Now pass " + itemsToPass(trace, edge, minMult));                addIDToTrace(trace, itemsToPass(trace, edge, minMult));                editedTraces.add(trace);            }        }                return changes;    }