docs: public void simplify() {
      if (!simplified) {
        if (conditionList.size() > 0) {
          for (MtasCQLParserWordCondition c : conditionList) {
            c.simplify();
            // A & B & ( C & !D )
            if (c.type().equals(type) && !c.not()) {
              positiveQueryList.addAll(c.positiveQueryList);
              negativeQueryList.addAll(c.negativeQueryList);
              // A & B & !( C | !D )
            } else if (!c.type().equals(type) && c.not()) {
              positiveQueryList.addAll(c.negativeQueryList);
              negativeQueryList.addAll(c.positiveQueryList);
              // A & B & ( C )
            } else if (c.isSingle() && !c.not()) {
              positiveQueryList.addAll(c.positiveQueryList);
              negativeQueryList.addAll(c.negativeQueryList);
              // A & B & !( C )
            } else if (c.isSingle() && c.not()) {
              positiveQueryList.addAll(c.negativeQueryList);
              negativeQueryList.addAll(c.positiveQueryList);
            } else if (c.isSimplePositive()) {
              // A | B | ( C & D )
              if (c.type().equals(TYPE_AND)) {
                MtasSpanQuery q = new MtasSpanAndQuery(c.positiveQueryList
                    .toArray(new MtasSpanQuery[c.positiveQueryList.size()]));
                if (c.not()) {
                  negativeQueryList.add(q);
                } else {
                  positiveQueryList.add(q);
                }
                // A & B & ( C | D )
              } else {
                MtasSpanQuery q = new MtasSpanOrQuery(c.positiveQueryList
                    .toArray(new MtasSpanQuery[c.positiveQueryList.size()]));
                if (c.not()) {
                  negativeQueryList.add(q);
                } else {
                  positiveQueryList.add(q);
                }
              }
            } else if (c.isSimpleNegative()) {
              // A | B | ( !C | !D )
              if (c.type().equals(TYPE_OR)) {
                MtasSpanQuery q = new MtasSpanAndQuery(c.negativeQueryList
                    .toArray(new MtasSpanQuery[c.negativeQueryList.size()]));
                if (c.not()) {
                  positiveQueryList.add(q);
                } else {
                  negativeQueryList.add(q);
                }
                // A | B | ( !C & !D )
              } else {
                MtasSpanQuery q = new MtasSpanOrQuery(c.negativeQueryList
                    .toArray(new MtasSpanQuery[c.negativeQueryList.size()]));
                if (c.not()) {
                  positiveQueryList.add(q);
                } else {
                  negativeQueryList.add(q);
                }
              }
            } else {
              // swap if necessary
              if (this.isSimplePositive() && c.not()) {
                c.swapType();
              } else if (this.isSimpleNegative() && !c.not()) {
                c.swapType();
              }
              // A | B | ( C & !D )
              if (c.type().equals(TYPE_AND)) {
                MtasSpanQuery positiveQuery = new MtasSpanAndQuery(
                    c.positiveQueryList
                        .toArray(new MtasSpanQuery[c.positiveQueryList.size()]));
                MtasSpanQuery negativeQuery = new MtasSpanAndQuery(
                    c.negativeQueryList
                        .toArray(new MtasSpanQuery[c.negativeQueryList.size()]));
                MtasSpanQuery q = new MtasSpanNotQuery(positiveQuery,
                    negativeQuery);
                if (c.not()) {
                  negativeQueryList.add(q);
                } else {
                  positiveQueryList.add(q);
                }
                // A & B & ( C | !D )
              } else {
                MtasSpanQuery positiveQuery = new MtasSpanOrQuery(
                    c.positiveQueryList
                        .toArray(new MtasSpanQuery[c.positiveQueryList.size()]));
                MtasSpanQuery negativeQuery = new MtasSpanOrQuery(
                    c.negativeQueryList
                        .toArray(new MtasSpanQuery[c.negativeQueryList.size()]));
                MtasSpanQuery q = new MtasSpanNotQuery(positiveQuery,
                    negativeQuery);
                if (c.not()) {
                  negativeQueryList.add(q);
                } else {
                  positiveQueryList.add(q);
                }
              }
            }
          }
          conditionList.clear();
        }
        if (isSimpleNegative()) {
          swapType();
        }
        simplified = true;
      }
    }