code: private static void cleanEmptyLeafs(LogicClause clause)
    {
      if(clause == null || clause.getOp() == LogicClause.Operator.LEAF)
      {
        return;
      }
      
      LinkedList<LogicClause> childListCopy = new LinkedList<>(clause.getChildren());
      
      clause.clearChildren();
      
      ListIterator<LogicClause> itChildren = childListCopy.listIterator();
      while(itChildren.hasNext())
      {
        LogicClause n = itChildren.next();
        
        // don't add empty leafs, add everything else
        if(!(n.getOp() == LogicClause.Operator.LEAF && n.getContent() == null)) 
        {
          clause.addChild(n);
        }
      }
      
      // clean all sub clauses
      for(LogicClause c : clause.getChildren())
      {
        cleanEmptyLeafs(c);
      }
    }
docs: During parsing there will be leafs created with no QueryNode attached (e.g.
  binary terms). This functions removes all these leafs.   *
  @param clause The clause to remove the empty leafs from.