<commit_before>(ns aeolian.parser)

; Sample metric line - last field (complexity) is optional.
; /home/amarks/Code/aeolian/resources/Notification.java#203 82 3

(defn- metric-line-to-bits [metric]
	(clojure.string/split metric #"\s+"))

(defn- check-valid-line-number [metric]
	(let [file-line-id (first (metric-line-to-bits metric))]
		(Integer/parseInt (last (clojure.string/split file-line-id #"#")))))

(defn- source-file-from-metric [metric]
	(check-valid-line-number metric)<commit_msg>No longer accurate - tests are a better indicator of sample lines<commit_after>(ns aeolian.parser)

(defn- metric-line-to-bits [metric]
	(clojure.string/split metric #"\s+"))

(defn- check-valid-line-number [metric]
	(let [file-line-id (first (metric-line-to-bits metric))]
		(Integer/parseInt (last (clojure.string/split file-line-id #"#")))))

(defn- source-file-from-metric [metric]
	(check-valid-line-number metric)
{'fraction_non_alphanumeric': 0.17214912280701755, 'fraction_numerical': 0.006578947368421052, 'mean_word_length': 4.670807453416149, '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': '2189314', 'n_tokens_mistral': 340, 'n_tokens_neox': 331, 'n_words': 70}