boolean isIgnored = particleMaxOccurs == 1 || particles.size() == 1;
boolean isIgnored = particleMaxOccurs == 1 || particles.size() == 1 && ((XSDParticle)particles.get(0)).getTerm() instanceof XSDModelGroup;
  public void collectParticlesHelper(List result, XSDParticle xsdParticle, int minOccurs, int maxOccurs, XSDModelGroup target)  {    int particleMaxOccurs = xsdParticle.getMaxOccurs();    int effectiveMinOccurs = minOccurs * xsdParticle.getMinOccurs();    int effectiveMaxOccurs =  maxOccurs == -1 || particleMaxOccurs == -1 ? -1 : maxOccurs * particleMaxOccurs;    XSDTerm xsdTerm = xsdParticle.getTerm();    if (xsdTerm instanceof XSDModelGroup)    {      XSDModelGroup xsdModelGroup = (XSDModelGroup)xsdTerm;      List particles = xsdModelGroup.getParticles();      if (particles.size() == 0)      {        return;      }      else      {        boolean isIgnored = particleMaxOccurs == 1 || particles.size() == 1;        String featureMapName = getEcoreAttribute(xsdParticle, "name");        if (featureMapName == null)        {          featureMapName = getEcoreAttribute(xsdParticle, "featureMap");          if (featureMapName == null)          {            featureMapName = getEcoreAttribute(xsdTerm, "name");            if (featureMapName == null)            {              featureMapName = getEcoreAttribute(xsdTerm, "featureMap");            }          }        }        if ("".equals(featureMapName))        {          isIgnored = true;        }        else if (featureMapName != null)        {          isIgnored = false;        }        else if (target != null)        {          isIgnored = true;        }        if (!isIgnored)        {          EffectiveOccurrence effectiveOccurrence = new EffectiveOccurrence(effectiveMinOccurs, effectiveMaxOccurs, xsdParticle, null);          result.add(effectiveOccurrence);          target = xsdModelGroup;        }        if (xsdModelGroup.getCompositor() == XSDCompositor.CHOICE_LITERAL)        {          effectiveMinOccurs = 0;        }        for (Iterator i = ((XSDModelGroup)xsdTerm).getParticles().iterator(); i.hasNext(); )        {          XSDParticle childXSDParticle = (XSDParticle)i.next();          collectParticlesHelper(result, childXSDParticle, effectiveMinOccurs, effectiveMaxOccurs, target);        }      }    }    else    {      EffectiveOccurrence effectiveOccurrence = new EffectiveOccurrence(effectiveMinOccurs, effectiveMaxOccurs, xsdParticle, target);      result.add(effectiveOccurrence);    }  }