JFieldDeclaration[] classFields = new JFieldDeclaration[children.size() + fields.length + 1];
JFieldDeclaration[] classFields = new JFieldDeclaration[children.size() + fields.length + 1  + 2 ];
    private void createStruct(String name,			      JFieldDeclaration[] fields, 			      List children) {	// there is one field for each child, plus one for the context	JFieldDeclaration[] classFields = new JFieldDeclaration[children.size()							       + fields.length							       + 1];	// pos tracks our filling up of <classFields>	int pos = 0;	// fill in the context	classFields[pos++] = LoweringConstants.getContextField();	// fill in the fields of the class	for (int i=0; i<fields.length; i++) {	    classFields[pos++] = fields[i];	}	// fill in the children	for (int i=0; i<children.size(); i++) {	    // the name of the type in the structure	    String typeName = ((SIROperator)children.get(i)).getName();	    // the name for the variable in the structure	    String varName = "child" + i;	    // define a variable of the structure	    JVariableDefinition var = 		new JVariableDefinition(/* tokenref */ null, 					/* modifiers */ at.dms.kjc.					Constants.ACC_PUBLIC,					/* type */ CClassType.lookup(typeName),					/* identifier  */ varName,					/* initializer */ null);	    // define the field	    classFields[pos++] = 		new JFieldDeclaration(/* tokenref */ null, 				      /* variable */ var, 				      /* javadoc  */ null, 				      /* comments */ null);	}	// make the inner class	JClassDeclaration classDecl = 	    new JClassDeclaration(/* TokenReference where */				  null,				  /* int modifiers, */				  at.dms.kjc.Constants.ACC_PUBLIC,				  /* String ident,  */				  name,				  /* CClassType superClass, */				  CStdType.Object,				  /* CClassType[] interfaces, */				  CClassType.EMPTY,				  /* JFieldDeclaration[] fields, */				  classFields,				  /* JMethodDeclaration[] methods, */				  JMethodDeclaration.EMPTY,				  /* JTypeDeclaration[] inners, */				  JClassDeclaration.EMPTY,				  /* JPhylum[] initializers, */				  null,				  /* JavadocComment javadoc, */				  null,				  /* JavaStyleComment[] comment */				  null				  );	// add class to list	structs.add(classDecl);    }