Vector in = RegisterStreams.getNodeInStreams(next); boolean can_be_scheduled = true;  for (int b = 0; b < in.size(); b++) {  SIROperator prev = NodeEnumerator.getOperator( ((NetStream)in.elementAt(b)).getSource());  if (!phases.containsKey(prev)) can_be_scheduled = false;
if (next instanceof SIRJoiner && next.getParent() instanceof SIRFeedbackLoop) {  SIRSplitter loopSplitter = ((SIRFeedbackLoop)next.getParent()).getSplitter();  assert ! feedbackSplittersBody.contains(loopSplitter) && ! feedbackSplittersLoop.contains(loopSplitter); int split_ways =  RegisterStreams.getNodeOutStreams(loopSplitter).size(); assert split_ways <= 2;  if (split_ways == 2) { feedbackSplittersBody.add(loopSplitter); } }  if (next instanceof SIRSplitter && next.getParent() instanceof SIRFeedbackLoop && feedbackSplittersBody.contains(next)) {   feedbackSplittersBody.remove(next); feedbackSplittersLoop.add(next);
    private void findNextPhase() {        Iterator i = current_ops.iterator();        // iterate over nodes in current phase        while (i.hasNext()) {            SIROperator oper = (SIROperator)i.next();            Vector out = RegisterStreams.getNodeOutStreams(oper);            // check all nodes that are downstream from nodes in current phase            for (int a = 0; a < out.size(); a++) {                        SIROperator next =                     NodeEnumerator.getOperator(                                               ((NetStream)out.elementAt(a)).getDest());                        // check if no phase assigned yet                if (!phases.containsKey(next)) {                     Vector in = RegisterStreams.getNodeInStreams(next);                    boolean can_be_scheduled = true;                    for (int b = 0; b < in.size(); b++) {                        SIROperator prev =                             NodeEnumerator.getOperator(                                                       ((NetStream)in.elementAt(b)).getSource());                        if (!phases.containsKey(prev)) can_be_scheduled = false;                    }                    if (can_be_scheduled) {                        phases.put(next, new Integer(number_of_phases+1));                        next_ops.add(next);                        //System.out.println("Operator: "+next+                        //         " assigned to phase: "+                        //         (number_of_phases+1));                    }                }            }        }    }