if (Util.getJoinerType(joiner).isArrayType()) { String dims[] = Util.makeString(((CArrayType) Util .getJoinerType(joiner)).getDims());
if (joinerType.isArrayType()) { String dims[] = Util.makeString(((CArrayType) joinerType).getDims());
    private static String createJoinerWork(FlatNode joiner) {        StringBuffer ret = new StringBuffer();        int buffersize = nextPow2(                                  (Integer) SimulationCounter.maxJoinerBufferSize.get(joiner),                                  joiner);        // get the type, since this joiner is guaranteed to be connected to a        // filter        CType type = Util.getBaseType(Util.getJoinerType(joiner)); // ??        ret.append("#define __BUFSIZE__ " + buffersize + "\n");        ret.append("#define __MINUSONE__ " + (buffersize - 1) + "\n\n");        ret.append("void work() { \n");        // print the temp for the for loop        ret.append("  int rep;\n");        // print the index vars if the type is an array type        // and the duplication var for duplicate splitjoins with identities        // inside        if (Util.getJoinerType(joiner).isArrayType()) {            String dims[] = Util.makeString(((CArrayType) Util                                             .getJoinerType(joiner)).getDims());            ret.append("  int ");            for (int i = 0; i < dims.length - 1; i++)                ret.append(ARRAY_INDEX + i + ", ");            ret.append(ARRAY_INDEX + (dims.length - 1) + ";\n");            ret.append(type + " " + JoinerScheduleNode.DUPVAR);            for (int i = 0; i < dims.length; i++)                ret.append("[" + dims[i] + "]");            ret.append(";\n");        } else {            // print the duplication var if not array type            ret.append(type + " " + JoinerScheduleNode.DUPVAR);            ret.append(";\n");        }        HashSet buffers = (HashSet) streamGraph.joinerSimulator.buffers            .get(joiner);        Iterator bufIt = buffers.iterator();        // print all the var definitions        while (bufIt.hasNext()) {            String current = (String) bufIt.next();            ret.append("int __first" + current + " = 0;\n");            ret.append("int __last" + current + " = 0;\n");            ret.append(type + " __buffer" + current + "[__BUFSIZE__]");            if (Util.getJoinerType(joiner).isArrayType()) {                String dims[] = Util.makeString(((CArrayType) Util                                                 .getJoinerType(joiner)).getDims());                for (int i = 0; i < dims.length; i++)                    ret.append("[" + dims[i] + "]");            }            ret.append(";\n");        }        printSchedule(joiner, (JoinerScheduleNode) ((SpdStaticStreamGraph)streamGraph                      .getParentSSG(joiner)).simulator.initJoinerCode.get(joiner), ret);        ret.append(SwitchCode.SW_SS_TRIPS + "();\n");        ret.append("while(1) {\n");        printSchedule(joiner, (JoinerScheduleNode) ((SpdStaticStreamGraph)streamGraph                      .getParentSSG(joiner)).simulator.steadyJoinerCode.get(joiner),                      ret);        ret.append("}}\n");        return ret.toString();    }