code: @Override
      public int dictionarySequence(String password) {
          // simple search.
          if (password.length() == 0) {
              return 0;
          }
          if (words.contains(password)) {
              return password.length();
          } else {
              int higher = 0;
              for (int index = 1; index < password.length(); index++) {
                  String tmp = password.substring(index);
                  int count = dictionarySequence(tmp);
                  if (count > 0 && higher<count) {
                      higher = count;
                  }
              }
  
              for (int index = password.length() - 1; 1 < index; index--) {
                  String tmp = password.substring(0, index);
                  int count = dictionarySequence(tmp);
                  if (count > 0 && higher<count) {
                      higher = count;
                  }
              }
              return higher;
          }
      }
docs: /*
  (non-Javadoc)
  
  @see org.jboss.as.domain.management.security.password.Dictionary#dictionaryScore(java.lang.String)