<commit_before>/*
 * Created on Dec 29, 2006
 */
package org.griphyn.vdl.karajan.lib.cache;

import java.util.LinkedList;

public class File {
	private String path;
	private Object host;
	private long size, lastAccess;
	private int locked;
	private boolean removalLock;
	private LinkedList removalListeners;

	public File(String file, String dir, Object host, long size) {
		if (dir.endsWith("/")) {
			path = dir + file;
		}
		else {
			path = dir + '/' + file;
		}
		this.host = host;
		this.size = size;
	}

	public File(String fullPath, Object host, long size) {
		this.path = fullPath;
		this.host = host;
		this.size = size;
	}

	public boolean equals(Object other) {
		if (other instanceof File) {
			File ce = (File) other;
			return path.equals(ce.path) && host.equals(ce.host);
		}
		return false;
	}

	public int hashCode() {
		return path.hashCode() + host.hashCode();
	}

	public String toString() {
		return host + "/" + path;
	}

	public String getPath() {
		return path;
	}

	public void setPath(String fullPath) {
		this.path = fullPath;
	}

	public Object getHost() {
		return host;
	}

	public void setHost(Object host) {
		this.host = host;
	}

	public synchronized boolean isLocked() {
		return locked > 0;
	}

	public synchronized void lock() {
		locked++;
	}
<commit_msg>the path is not mutable<commit_after>/*
 * Created on Dec 29, 2006
 */
package org.griphyn.vdl.karajan.lib.cache;

import java.util.LinkedList;

public class File {
	private String path;
	private Object host;
	private long size, lastAccess;
	private int locked;
	private boolean removalLock;
	private LinkedList removalListeners;

	public File(String file, String dir, Object host, long size) {
		if (dir.endsWith("/")) {
			path = dir + file;
		}
		else {
			path = dir + '/' + file;
		}
		this.host = host;
		this.size = size;
	}

	public File(String fullPath, Object host, long size) {
		this.path = fullPath;
		this.host = host;
		this.size = size;
	}

	public boolean equals(Object other) {
		if (other instanceof File) {
			File ce = (File) other;
			return path.equals(ce.path) && host.equals(ce.host);
		}
		return false;
	}

	public int hashCode() {
		return path.hashCode() + host.hashCode();
	}

	public String toString() {
		return host + "/" + path;
	}

	public String getPath() {
		return path;
	}

	public Object getHost() {
		return host;
	}

	public void setHost(Object host) {
		this.host = host;
	}

	public synchronized boolean isLocked() {
		return locked > 0;
	}

	public synchronized void lock() {
		locked++;
	}

{'fraction_non_alphanumeric': 0.12292490118577075, 'fraction_numerical': 0.005533596837944664, 'mean_word_length': 3.260942760942761, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 5, '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': '2972400', 'n_tokens_mistral': 944, 'n_tokens_neox': 857, 'n_words': 258}