for (int i = 0; i < dims.length - 1; i++)
for (int i = dims.length - 1; i >= 0; i--)
    JStatement arrayReceiveCode(SIRFilter filter, CArrayType type, LocalVariables localVariables) {	//get the dimensionality of the input buffer	int dim = type.getDims().length + 1;	//make sure there are enough indices	if (localVariables.ARRAY_INDEX.length < (dim - 1))	    Utils.fail("Error generating array receive code");	//generate the first (outermost array access)	JArrayAccessExpression arrayAccess = 	    new JArrayAccessExpression(null, 				       new JLocalVariableExpression(null, 								    localVariables.recvBuffer),				      bufferIndex(filter, localVariables));	//generate the remaining array accesses	for (int i = 0; i < dim - 1; i++) 	    arrayAccess = new JArrayAccessExpression(null, arrayAccess,						    new JLocalVariableExpression						    (null, localVariables.ARRAY_INDEX[i]));		//now place the array access in a method call to alert flatirtoc that it is a 	//static receive	JExpression[] args = new JExpression[1];	args[0] = arrayAccess;		JMethodCallExpression methodCall = 	    new JMethodCallExpression(null, 				      new JThisExpression(null),				      receiveMethod,				      args);	//now generate the nested for loops		//get the dimensions of the array as set by kopi2sir	JExpression[] dims = type.getDims();	JStatement stmt = new JExpressionStatement(null,						   methodCall,						   null);	for (int i = 0; i < dims.length - 1; i++) 	    stmt = makeForLoop(stmt, localVariables.ARRAY_INDEX[i],			       dims[i]);		return stmt;           }