<commit_before>(ns clojure.test.check.rose-tree
  "A lazy tree data structure used for shrinking."
  (:refer-clojure :exclude [filter remove seq])
  (:require [clojure.core :as core]))

(deftype RoseTree [root children]
  clojure.lang.Indexed
  (nth [this i]
    (cond (= i 0) root
          (= i 1) children
          :else nil))

  (nth [this i not-found]
    (cond (= i 0) root
          (= i 1) children
          :else not-found)))

(defn make-rose [root children]<commit_msg>nth on RoseTree throws IndexOutOfBoundsException<commit_after>(ns clojure.test.check.rose-tree
  "A lazy tree data structure used for shrinking."
  (:refer-clojure :exclude [filter remove seq])
  (:require [clojure.core :as core]))

(deftype RoseTree [root children]
  clojure.lang.Indexed
  (nth [this i]
    (cond (= i 0) root
          (= i 1) children
          :else (throw (IndexOutOfBoundsException.))))

  (nth [this i not-found]
    (cond (= i 0) root
          (= i 1) children
          :else not-found)))

(defn make-rose [root children]
{'fraction_non_alphanumeric': 0.129126213592233, 'fraction_numerical': 0.007766990291262136, 'mean_word_length': 2.83271375464684, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '128890', 'n_tokens_mistral': 368, 'n_tokens_neox': 345, 'n_words': 110}