code: protected Pattern[] queryDetectionPattern(final Pattern... pattern) {
          if (pattern == null) {
              throw new IllegalArgumentException();
          } // end of if
  
          // ---
  
          if (this.queryDetection == null) {
              return pattern;
          } // end of if
  
          // ---
  
          final Pattern[] patterns = 
              new Pattern[this.queryDetection.length + pattern.length];
  
          System.arraycopy(this.queryDetection, 0, 
                           patterns, 0, 
                           this.queryDetection.length);
  
          int i = this.queryDetection.length;
  
          for (final Pattern p : pattern) {
              patterns[i++] = p;
          } // end of for
  
          return patterns;
      }
docs: Appends given |pattern| to current query detection.
  
  @param pattern the detection pattern
  @return the array of detection patterns
  @throws IllegalArgumentException if pattern is null