return RefactorSplitJoin.addHierarchicalChildren((SIRSplitJoin)sj, group);
SIRSplitJoin factored = RefactorSplitJoin.addHierarchicalChildren((SIRSplitJoin)sj, group);   for (int i=0; i<factored.size(); i++) { if (factored.get(i) instanceof SIRSplitJoin) { SIRSplitJoin toSync = (SIRSplitJoin)factored.get(i); if (toSync.getRectangularHeight()>1) { factored.set(i, RefactorSplitJoin.addSyncPoints(toSync, PartitionGroup.createUniformPartition(toSync.getRectangularHeight()))); } } } return factored;
    public SIRStream doMyTransform(SIRStream str) {	if (str instanceof SIRSplitJoin) {	    SIRSplitJoin sj = (SIRSplitJoin)str;	    Utils.assert(sj.size() - cutPos - 1 > 0, "Don't allow cuts with zero items on one side");	    	    // add one because of indexing convention in partitiongroup	    int[] partitions = { cutPos + 1, sj.size() - cutPos - 1};	    PartitionGroup group = PartitionGroup.createFromArray(partitions);	    return RefactorSplitJoin.addHierarchicalChildren((SIRSplitJoin)sj, group);	} else if (str instanceof SIRFeedbackLoop) {	    Utils.assert(cutPos==0, "Trying to vertical cut feedbackloop at position " + cutPos);	    // a cut at pos 1 is equivalent to breaking this guy in half	    return str;	} else {	    Utils.fail("Don't support vertical cuts on type "  + str.getClass() + " but trying it at position " + cutPos + " of " + str);	    return null;	}    }