if (body != null) {   if (filter != null) { isWork = filter.getWork() == self; boolean isInitWork = (filter instanceof SIRTwoStageFilter && ((SIRTwoStageFilter)filter).getInitWork() == self); if (isWork || isInitWork) { int pop = isWork ? filter.getPopInt() : ((SIRTwoStageFilter)filter).getInitPop(); int peek = isWork ? filter.getPeekInt() : ((SIRTwoStageFilter)filter).getInitPeek(); int push = isWork ? filter.getPushInt() : ((SIRTwoStageFilter)filter).getInitPush(); if (ratematch) { if (isInitWork) { printInitWorkHeader(pop, peek); body.accept(this); printInitWorkTrailer(push); } else { printRateMatchWorkHeader(pop, peek, push, body); body.accept(this); printRateMatchWorkTrailer(push); } } else if (circular) { if (isInitWork) { printInitWorkHeader(pop, peek); body.accept(this); printInitWorkTrailer(push); } else { printCircularWorkHeader(pop, peek, push, body); if (DEBUG) dummyWork(push); else body.accept(this); printCircularWorkTrailer(pop, peek, push); }  } else { Utils.fail("not working"); printWorkHeader(isWork, pop, peek); if (DEBUG) dummyWork(push); else body.accept(this); printWorkTrailer(isWork, pop, peek); } } else {  body.accept(this); } } else {  body.accept(this); } } else {
if (body != null) body.accept(this); else
    public void visitMethodDeclaration(JMethodDeclaration self,                                       int modifiers,                                       CType returnType,                                       String ident,                                       JFormalParameter[] parameters,                                       CClassType[] exceptions,                                       JBlock body) {        newLine();	// print(CModifier.toString(modifiers));	print(returnType);	print(" ");	//just print initPath() instead of initPath<Type>	if (ident.startsWith("initPath"))	    print("initPath"); 	else 	    print(ident);	print("(");	int count = 0;		for (int i = 0; i < parameters.length; i++) {	    if (count != 0) {		print(", ");	    }	    	    // if (!parameters[i].isGenerated()) {	    parameters[i].accept(this);	    count++;	    // }	}	print(")");		if (declOnly)	    {		print(";");		return;	    }        print(" ");        if (body != null) {	    //see if this is the work function	    //if it is print the work header and trailer	    if (filter != null) {		isWork = filter.getWork() == self;		boolean isInitWork = (filter instanceof SIRTwoStageFilter && 				      ((SIRTwoStageFilter)filter).getInitWork() == self);		if (isWork || isInitWork) {		    int pop = isWork ? filter.getPopInt() : 			((SIRTwoStageFilter)filter).getInitPop();		    int peek = isWork ? filter.getPeekInt() : 			((SIRTwoStageFilter)filter).getInitPeek();		    int push = isWork ? filter.getPushInt() : 			((SIRTwoStageFilter)filter).getInitPush();		    if (ratematch) {			if (isInitWork) {			    printInitWorkHeader(pop, peek);			    body.accept(this);			    printInitWorkTrailer(push);			}			else {			    printRateMatchWorkHeader(pop, peek, push, body);			    body.accept(this);			    printRateMatchWorkTrailer(push);			}		    }		    else if (circular) {			if (isInitWork) {			    printInitWorkHeader(pop, peek);			    body.accept(this);			    printInitWorkTrailer(push);			}			else {			    printCircularWorkHeader(pop, peek, push, body);			    if (DEBUG)				dummyWork(push);			    else				body.accept(this);			    printCircularWorkTrailer(pop, peek, push);			}					    } else {			Utils.fail("not working");			printWorkHeader(isWork, pop, peek);			if (DEBUG)			    dummyWork(push);			else			    body.accept(this);			printWorkTrailer(isWork, pop, peek);		    }		} else {		    // not the work function		    body.accept(this);		}	    } else {		// no filter?		body.accept(this);	    }        } else {            print(";");        }        newLine();	isWork = false;    }