code: public void simplify() throws ParseException {
      if (!simplified) {
        if (!isBasic()) {
          for (List<MtasCQLParserSentenceCondition> sequence : sequenceList) {
            simplifySequence(sequence);
          }
          // flatten
          if (sequenceList.size() > 1) {
            List<List<MtasCQLParserSentenceCondition>> newSequenceList = new ArrayList<List<MtasCQLParserSentenceCondition>>();
            for (List<MtasCQLParserSentenceCondition> sequence : sequenceList) {
              if (sequence.size() == 1) {
                MtasCQLParserSentenceCondition subSentence = sequence.get(0);
                if (subSentence.isBasic()) {
                  newSequenceList.add(sequence);
                } else {
                  newSequenceList.addAll(subSentence.sequenceList);
                }
              }
            }
            sequenceList = newSequenceList;
          }
        }
        simplified = true;
      }
    }
docs: Simplify.
  
  @throws ParseException the parse exception