<commit_before>package com.jwetherell.algorithms;

import java.util.Random;

import com.jwetherell.algorithms.data_structures.BinarySearchTree;

public class DataStructures {
    private static final int SIZE = 10;
    
    private static int[] unsorted = null;
    
    public static void main(String[] args) {
        Random random = new Random();
        unsorted = new int[SIZE];
        int i=0;
        while (i<unsorted.length) {
            int j = random.nextInt(unsorted.length*10);
            unsorted[i++] = j;
        }

        BinarySearchTree bst = new BinarySearchTree(unsorted);
        System.out.println(bst.toString());

        // Add random node
        int next = random.nextInt(unsorted.length*100);
        System.out.println("Adding "+next);
        bst.add(next);
        System.out.println(bst.toString());

        // Add previously added node
        next = random.nextInt(unsorted.length);
        System.out.println("Adding "+unsorted[next]);
        bst.add(unsorted[next]);
        System.out.println(bst.toString());

        // Remove a perviously added node
        next = random.nextInt(unsorted.length);
        System.out.println("Removing "+unsorted[next]);
        bst.remove(unsorted[next]);
        System.out.println(bst.toString());
    }
}<commit_msg>Added a test for a remove on an absent node<commit_after>package com.jwetherell.algorithms;

import java.util.Random;

import com.jwetherell.algorithms.data_structures.BinarySearchTree;

public class DataStructures {
    private static final int SIZE = 10;
    
    private static int[] unsorted = null;
    
    public static void main(String[] args) {
        Random random = new Random();
        unsorted = new int[SIZE];
        int i=0;
        while (i<unsorted.length) {
            int j = random.nextInt(unsorted.length*10);
            unsorted[i++] = j;
        }

        BinarySearchTree bst = new BinarySearchTree(unsorted);
        System.out.println(bst.toString());

        // Add random node
        int next = random.nextInt(unsorted.length*100);
        System.out.println("Adding "+next);
        bst.add(next);
        System.out.println(bst.toString());

        // Add previously added node
        next = random.nextInt(unsorted.length);
        System.out.println("Adding "+unsorted[next]);
        bst.add(unsorted[next]);
        System.out.println(bst.toString());

        // Remove a previously added node
        next = random.nextInt(unsorted.length);
        System.out.println("Removing "+unsorted[next]);
        bst.remove(unsorted[next]);
        System.out.println(bst.toString());
        
        // Remove a random node (shouldn't do anything if it doesn't exist in the tree)
        next = random.nextInt(unsorted.length*100);
        System.out.println("Removing "+next);
        bst.remove(next);
        System.out.println(bst.toString());
    }
}
{'fraction_non_alphanumeric': 0.12331606217616581, 'fraction_numerical': 0.0065630397236614854, 'mean_word_length': 2.4682634730538924, 'pattern_counts': {'":': 0, '<': 5, '<?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': '972541', 'n_tokens_mistral': 890, 'n_tokens_neox': 824, 'n_words': 183}