<commit_before>/* 
  Author: <NAME> <<EMAIL>>
  Theory for pseudo random generation obtained for:
    http://www.math.utah.edu/~pa/Random/Random.html
    Given p1, p2, N(limit), and x0
    Recurrance formula: xN+1 = (x0*p1) + p2 (mod N)
*/
#include <stdio.h>
#include <stdlib.h>

typedef struct Tree_ {
  int data, p1, p2, mod;
  struct Tree_ *left, *right;
} Tree;

Tree *addLeaf(Tree *motherTree, const int data, int *cycleDetect) {
  if (*cycleDetect) return motherTree; 

  else if (motherTree == NULL) {
    motherTree = (Tree *)malloc(sizeof(Tree));
    motherTree->left = motherTree->right = NULL;
    motherTree->data = data;
  } else {
    if (motherTree->data != data) {
      if (motherTree->data < data)
	motherTree->left = addLeaf(motherTree->left, data, cycleDetect);
      else
	motherTree->right = addLeaf(motherTree->right, data, cycleDetect);<commit_msg>corrected word usage<commit_after>/* 
  Author: <NAME> <<EMAIL>>
  Theory for pseudo random generation obtained from:
    http://www.math.utah.edu/~pa/Random/Random.html
    Given p1, p2, N(limit), and x0
    Recurrance formula: xN+1 = (x0*p1) + p2 (mod N)
*/
#include <stdio.h>
#include <stdlib.h>

typedef struct Tree_ {
  int data, p1, p2, mod;
  struct Tree_ *left, *right;
} Tree;

Tree *addLeaf(Tree *motherTree, const int data, int *cycleDetect) {
  if (*cycleDetect) return motherTree; 

  else if (motherTree == NULL) {
    motherTree = (Tree *)malloc(sizeof(Tree));
    motherTree->left = motherTree->right = NULL;
    motherTree->data = data;
  } else {
    if (motherTree->data != data) {
      if (motherTree->data < data)
	motherTree->left = addLeaf(motherTree->left, data, cycleDetect);
      else
	motherTree->right = addLeaf(motherTree->right, data, cycleDetect);
{'fraction_non_alphanumeric': 0.14840182648401826, 'fraction_numerical': 0.010273972602739725, 'mean_word_length': 3.7506775067750677, 'pattern_counts': {'":': 0, '<': 15, '<?xml version=': 0, '>': 31, 'https://': 0, 'lorem ipsum': 0, 'www.': 2, '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': '2305971', 'n_tokens_mistral': 631, 'n_tokens_neox': 604, 'n_words': 165}