return newFilter;
return fused;
    public static SIRStream fuse(SIRSplitJoin sj)    {	if (!isFusable(sj)) {	    return sj;	} else {	    System.err.println("Fusing " + (sj.size()) + " SplitJoin filters!"); 	}	// get copy of child streams        List children = sj.getParallelStreams();	// rename components	doRenaming(children);	// calculate the repetitions for the split-join	SRepInfo rep = SRepInfo.calcReps(sj);        // So at this point we have an eligible split/join; flatten it.        JMethodDeclaration newWork = makeWorkFunction(sj, children, rep);        JFieldDeclaration[] newFields = makeFields(sj, children);        JMethodDeclaration[] newMethods = makeMethods(sj, children);        JMethodDeclaration newInit = makeInitFunction(sj, children);	SRate rate = calcSRate(sj, rep);        // Build the new filter.        SIRFilter newFilter = new SIRFilter(sj.getParent(), "Fused_" + sj.getIdent(),                                            newFields, newMethods, new JIntLiteral(rate.peek),                                            new JIntLiteral(rate.pop), new JIntLiteral(rate.push),                                            newWork, sj.getInputType(), sj.getOutputType());        // Use the new init function        newFilter.setInit(newInit);	// make new pipeline representing fused sj	SIRPipeline fused = makeFusedPipe(sj, rep, rate, newFilter);	// replace in parent	replaceInParent(sj, fused);        return newFilter;    }