code: private void populateModel()
     {
        if (m_count != 0)
        {
           m_count = 0;
           Arrays.fill(m_flags, false);
        }
  
        for (Resource resource : m_parentFile.getResources())
        {
           for (int loop = 0; loop < MPXResourceField.MAX_FIELDS; loop++)
           {
              if (resource.getCachedValue(MPXResourceField.getMpxjField(loop)) != null)
              {
                 if (m_flags[loop] == false)
                 {
                    m_flags[loop] = true;
                    m_fields[m_count] = loop;
                    ++m_count;
                 }
              }
           }
        }
  
        //
        // Ensure the the model fields always appear in the same order
        //
        Arrays.sort(m_fields);
        System.arraycopy(m_fields, m_fields.length - m_count, m_fields, 0, m_count);
     }
docs: This method is called to populate the arrays which are then
  used to generate the text version of the model.