<commit_before>package net.afterlifelochie.fontbox.document;

import java.util.ArrayList;

public class Document {

	public ArrayList<Element> elements;

	public Document() {
		this.elements = new ArrayList<Element>();
	}

}
<commit_msg>Add Document storage methods.<commit_after>package net.afterlifelochie.fontbox.document;

import java.util.ArrayList;

public class Document {

	public ArrayList<Element> elements;

	public Document() {
		this.elements = new ArrayList<Element>();
	}

	public void push(Element element) {
		if (elements.contains(element))
			throw new IllegalArgumentException("Element already exists in tree!");
		elements.add(element);
	}

	public Element pop() {
		return elements.remove(elements.size() - 1);
	}

	public Element head() {
		return elements.get(0);
	}

	public Element tail() {
		return elements.get(elements.size() - 1);
	}

}

{'fraction_non_alphanumeric': 0.1141602634467618, 'fraction_numerical': 0.003293084522502744, 'mean_word_length': 3.6530612244897958, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 7, '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': '6100349', 'n_tokens_mistral': 289, 'n_tokens_neox': 253, 'n_words': 64}