<commit_before>
/*
 * Java core library component.
 *
 * Copyright (c) 1999
 *	<NAME>.  All rights reserved.
 * Copyright (c) 1999
 *	Transvirtual Technologies, Inc.  All rights reserved.
 *
 * See the file "license.terms" for information on usage and redistribution
 * of this file.
 *
 * Author: <NAME> <<EMAIL>>
 */

package java.util;

import java.io.Serializable;

public class Hashtable extends Dictionary
		implements Map, Cloneable, Serializable {
	private static final long serialVersionUID = 1421746759512286392L;
	private static final int DEFAULT_CAPACITY = 11;
	private static final float DEFAULT_LOADFACTOR = 0.75f;
	private final HashMap map;

	public Hashtable() {
		this(DEFAULT_CAPACITY, DEFAULT_LOADFACTOR);
	}

	public Hashtable(int initialCapacity) {
		this(initialCapacity, DEFAULT_LOADFACTOR);
	}

	public Hashtable(int initialCapacity, float loadFactor) {
		map = new HashMap(initialCapacity, loadFactor);
	}

	public Hashtable(Map t) {
		map = new HashMap(t);
	}

	private Hashtable(HashMap map) {
		this.map = map;
	}

	public synchronized int size() {
		return map.size();
	}

	public synchronized boolean isEmpty() {
		return map.isEmpty();
	}

	public synchronized Enumeration keys() {
		return new Vector(map.keySet()).elements();
	}

	public synchronized Enumeration elements() {
		return new Vector(map.values()).elements();
	}

	public synchronized boolean contains(Object val) {
		if (val == null) {
			throw new NullPointerException();
		}
		return map.containsValue(val);
	}

	public synchronized boolean containsKey(Object key) {
		if (key == null) {
			throw new NullPointerException();
		}
		return map.containsKey(key);
	}

	public synchronized boolean containsValue(Object val) {
		if (val == null) {
			throw new NullPointerException();
		}
		return map.containsValue(val);
	}

	public synchronized Object get(Object key) {
		if (key == null) {
			throw new NullPointerException();
		}
		return map.get(key);
	}

	protected synchronized void rehash() {
		map.rehash();
	}

	public synchronized Object put(Object key, Object val) {
		if (key == null || val == null) {
			throw new NullPointerException();
		}
		return map.put(key, val);
	}

	public synchronized Object remove(Object key) {
		return map.remove(key);
	}

	public synchronized void putAll(Map t) {
		map.putAll(t);
	}

	public synchronized void clear() {
		map.clear();
	}

	public synchronized Object clone() {
		return new Hashtable((Hashtable)map.clone());
	}

	public synchronized String toString() {
		return map.toString();
	}

	public synchronized Set keySet() {
		return map.keySet();
	}

	public synchronized Set entrySet() {
		return map.entrySet();
	}

	public synchronized Collection values() {
		return map.values();
	}

	public synchronized boolean equals(Object o) {
		return (o instanceof Hashtable)
		    && map.equals(((Hashtable)o).map);
	}

	public synchronized int hashCode() {
		return map.hashCode();
	}
}

<commit_msg>(clone): Fix cast to HashMap for map.clone().<commit_after>
/*
 * Java core library component.
 *
 * Copyright (c) 1999
 *	<NAME>.  All rights reserved.
 * Copyright (c) 1999
 *	Transvirtual Technologies, Inc.  All rights reserved.
 *
 * See the file "license.terms" for information on usage and redistribution
 * of this file.
 *
 * Author: <NAME> <<EMAIL>>
 */

package java.util;

import java.io.Serializable;

public class Hashtable extends Dictionary
		implements Map, Cloneable, Serializable {
	private static final long serialVersionUID = 1421746759512286392L;
	private static final int DEFAULT_CAPACITY = 11;
	private static final float DEFAULT_LOADFACTOR = 0.75f;
	private final HashMap map;

	public Hashtable() {
		this(DEFAULT_CAPACITY, DEFAULT_LOADFACTOR);
	}

	public Hashtable(int initialCapacity) {
		this(initialCapacity, DEFAULT_LOADFACTOR);
	}

	public Hashtable(int initialCapacity, float loadFactor) {
		map = new HashMap(initialCapacity, loadFactor);
	}

	public Hashtable(Map t) {
		map = new HashMap(t);
	}

	private Hashtable(HashMap map) {
		this.map = map;
	}

	public synchronized int size() {
		return map.size();
	}

	public synchronized boolean isEmpty() {
		return map.isEmpty();
	}

	public synchronized Enumeration keys() {
		return new Vector(map.keySet()).elements();
	}

	public synchronized Enumeration elements() {
		return new Vector(map.values()).elements();
	}

	public synchronized boolean contains(Object val) {
		if (val == null) {
			throw new NullPointerException();
		}
		return map.containsValue(val);
	}

	public synchronized boolean containsKey(Object key) {
		if (key == null) {
			throw new NullPointerException();
		}
		return map.containsKey(key);
	}

	public synchronized boolean containsValue(Object val) {
		if (val == null) {
			throw new NullPointerException();
		}
		return map.containsValue(val);
	}

	public synchronized Object get(Object key) {
		if (key == null) {
			throw new NullPointerException();
		}
		return map.get(key);
	}

	protected synchronized void rehash() {
		map.rehash();
	}

	public synchronized Object put(Object key, Object val) {
		if (key == null || val == null) {
			throw new NullPointerException();
		}
		return map.put(key, val);
	}

	public synchronized Object remove(Object key) {
		return map.remove(key);
	}

	public synchronized void putAll(Map t) {
		map.putAll(t);
	}

	public synchronized void clear() {
		map.clear();
	}

	public synchronized Object clone() {
		return new Hashtable((HashMap)map.clone());
	}

	public synchronized String toString() {
		return map.toString();
	}

	public synchronized Set keySet() {
		return map.keySet();
	}

	public synchronized Set entrySet() {
		return map.entrySet();
	}

	public synchronized Collection values() {
		return map.values();
	}

	public synchronized boolean equals(Object o) {
		return (o instanceof Hashtable)
		    && map.equals(((Hashtable)o).map);
	}

	public synchronized int hashCode() {
		return map.hashCode();
	}
}


{'fraction_non_alphanumeric': 0.11364403917595407, 'fraction_numerical': 0.010807159743329957, 'mean_word_length': 4.040851063829788, 'pattern_counts': {'":': 0, '<': 11, '<?xml version=': 0, '>': 11, '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': '2638815', 'n_tokens_mistral': 1993, 'n_tokens_neox': 1792, 'n_words': 540}