<commit_before>package uk.co.uwcs.choob.plugins;

import java.io.File;
import java.io.FileInputStream;
import java.io.IOException;
import java.io.InputStream;
import java.net.URL;
import java.net.URLConnection;
import java.security.AccessController;
import java.security.PrivilegedActionException;
import java.security.PrivilegedExceptionAction;
import java.security.ProtectionDomain;

public final class HaxSunPluginClassLoader extends ClassLoader
{
	private final String path;
	private final ProtectionDomain domain;

	public HaxSunPluginClassLoader( final String pluginName, final String path, final ProtectionDomain domain )
	{
		super();
		this.path = path;
		this.domain = domain;
//		super.definePackage("plugins", "", "", "", "", "", "", null);
		definePackage("plugins." + pluginName, "", "", "", "", "", "", null);
	}

	@Override
	public Class<?> findClass(final String name) throws ClassNotFoundException {
		try {
			return AccessController
					.doPrivileged(new PrivilegedExceptionAction<Class<?>>() {
						public Class<?> run() throws ClassNotFoundException {
							try {
								final String fileName = path
										+ name.replace('.', File.separatorChar)
										+ ".class";
								final File classFile = new File(fileName);<commit_msg>Occasionally (D:) give a warning when the debugger screwed up plugin reloads<commit_after>package uk.co.uwcs.choob.plugins;

import java.io.File;
import java.io.FileInputStream;
import java.io.IOException;
import java.io.InputStream;
import java.net.URL;
import java.net.URLConnection;
import java.security.AccessController;
import java.security.PrivilegedActionException;
import java.security.PrivilegedExceptionAction;
import java.security.ProtectionDomain;

public final class HaxSunPluginClassLoader extends ClassLoader
{
	private final String path;
	private final ProtectionDomain domain;

	public HaxSunPluginClassLoader( final String pluginName, final String path, final ProtectionDomain domain )
	{
		super();
		this.path = path;
		this.domain = domain;
//		super.definePackage("plugins", "", "", "", "", "", "", null);
		try
		{
			definePackage("plugins." + pluginName, "", "", "", "", "", "", null);
		}
		catch (IllegalArgumentException e)
		{
			e.printStackTrace();
			System.err.println();
			System.err.println("Couldn't create plugins package.  " +
					"This is probably because your debugger is interfering.  Your plugin probably hasn't been reloaded.");
			System.err.println();
		}
	}

	@Override
	public Class<?> findClass(final String name) throws ClassNotFoundException {
		try {
			return AccessController
					.doPrivileged(new PrivilegedExceptionAction<Class<?>>() {
						public Class<?> run() throws ClassNotFoundException {
							try {
								final String fileName = path
										+ name.replace('.', File.separatorChar)
										+ ".class";
								final File classFile = new File(fileName);
{'fraction_non_alphanumeric': 0.1191961191961192, 'fraction_numerical': 0.0, 'mean_word_length': 4.297247706422018, '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': 4, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5626081', 'n_tokens_mistral': 921, 'n_tokens_neox': 787, 'n_words': 211}