int upStreamItems = 0;  if (traceNode.getPrevious().isFilterTrace()) { upStreamItems = FilterInfo.getFilterInfo( (FilterTraceNode) traceNode.getPrevious()).initItemsSent(); } else { InputTraceNode in = (InputTraceNode) traceNode.getPrevious();   for (int i = 0; i < in.getWeights().length; i++) { Edge incoming = in.getSources()[i]; upStreamItems += (int) (FilterInfo.getFilterInfo( (FilterTraceNode) incoming.getSrc().getPrevious()) .initItemsSent() * ((double) incoming.getSrc() .getWeight(incoming) / incoming.getSrc().totalWeights()));    } } return upStreamItems;
return initItemsReceived(false);
    public int initItemsReceived() {        // the number of items produced by the upstream filter in        // initialization        int upStreamItems = 0;        if (traceNode.getPrevious().isFilterTrace()) {            upStreamItems = FilterInfo.getFilterInfo(                                                     (FilterTraceNode) traceNode.getPrevious()).initItemsSent();        } else { // previous is an input trace            InputTraceNode in = (InputTraceNode) traceNode.getPrevious();            // add all the upstream filters items that reach this filter            for (int i = 0; i < in.getWeights().length; i++) {                Edge incoming = in.getSources()[i];                upStreamItems += (int) (FilterInfo.getFilterInfo(                                                                 (FilterTraceNode) incoming.getSrc().getPrevious())                                        .initItemsSent() * ((double) incoming.getSrc()                                                            .getWeight(incoming) / incoming.getSrc().totalWeights()));                // upStreamItems +=                // (int)(FilterInfo.getFilterInfo(previous[i]).initItemsSent() *                // ((double)out.getWeight(in) / out.totalWeights()));            }        }        return upStreamItems;    }