int [] index = new int [m_OutputFormat.numAttributes()]; int indexSize = 0; for (int i = 0; i < m_OutputFormat.numAttributes(); i++) { if (m_OutputFormat.attribute(i).type() == Attribute.STRING) { index[indexSize++] = i; } } m_OutputStringAtts = new int [indexSize]; System.arraycopy(index, 0, m_OutputStringAtts, 0, indexSize);
m_OutputStringAtts = getStringIndices(m_OutputFormat);
  protected void setOutputFormat(Instances outputFormat) {    if (outputFormat != null) {      m_OutputFormat = outputFormat.stringFreeStructure();      // Scan through getting the indices of String attributes      int [] index = new int [m_OutputFormat.numAttributes()];      int indexSize = 0;      for (int i = 0; i < m_OutputFormat.numAttributes(); i++) {        if (m_OutputFormat.attribute(i).type() == Attribute.STRING) {          index[indexSize++] = i;        }      }      m_OutputStringAtts = new int [indexSize];      System.arraycopy(index, 0, m_OutputStringAtts, 0, indexSize);      // Rename the attribute      String relationName = outputFormat.relationName()         + "-" + this.getClass().getName();      if (this instanceof OptionHandler) {        String [] options = ((OptionHandler)this).getOptions();        for (int i = 0; i < options.length; i++) {          relationName += options[i].trim();        }      }      m_OutputFormat.setRelationName(relationName);    } else {      m_OutputFormat = null;    }    m_OutputQueue = new Queue();  }