<commit_before>public class CatchDeath implements Runnable
{
    public void run()
    {
	try {
	    while (true)
		Thread.yield();
	} catch(Error o) {
	    System.out.println("Caught " + o);
	    throw o;
	}
    }

    public static void main(String av[]) throws Exception
    {
	Thread t[] = new Thread[3];
	t[0] = new Thread(new CatchDeath());
	t[1] = new Thread(new CatchSyncDeath());
	t[2] = new Thread(new CatchSyncWaitDeath());

	for (int i = 0; i < t.length; i++) {
	    t[i].start();
	    Thread.sleep(500);

	    synchronized (t[i]) {
		t[i].stop();
	    }
	    Thread.sleep(500);
	}
	System.out.flush();
    }
}

class CatchSyncDeath implements Runnable
{
    public void run()
    {
	try {
	    synchronized(this) {
		while (true)
		    Thread.yield();
	    }
	} catch(Error o) {
	    System.out.println("Caught " + o);
	    throw o;
	}
    }
}

class CatchSyncWaitDeath implements Runnable
{
    public void run()
    {
	try {
	    synchronized(this) {
		try {
		    wait();
		} catch (InterruptedException e) {
		    System.out.println("Interrupted " + e);
		}
	    }
	    System.out.println("CatchSyncWaitDeath should not be here");
	} catch(Error o) {
	    System.out.println("Caught " + o);
	    throw o;
	}
	System.out.println("Ditto, CatchSyncWaitDeath should not be here");
    }
}


// javac flags: -nowarn
/* Expected Output:
Caught java.lang.ThreadDeath
Caught java.lang.ThreadDeath
Caught java.lang.ThreadDeath
*/
<commit_msg>Don't flush System.out which artificially covers up failures in the test.<commit_after>public class CatchDeath implements Runnable
{
    public void run()
    {
	try {
	    while (true)
		Thread.yield();
	} catch(Error o) {
	    System.out.println("Caught " + o);
	    throw o;
	}
    }

    public static void main(String av[]) throws Exception
    {
	Thread t[] = new Thread[3];
	t[0] = new Thread(new CatchDeath());
	t[1] = new Thread(new CatchSyncDeath());
	t[2] = new Thread(new CatchSyncWaitDeath());

	for (int i = 0; i < t.length; i++) {
	    t[i].start();
	    Thread.sleep(500);

	    synchronized (t[i]) {
		t[i].stop();
	    }
	    Thread.sleep(500);
	}
	// This makes the test pass, but we don't know why it should..
	// System.out.flush();
    }
}

class CatchSyncDeath implements Runnable
{
    public void run()
    {
	try {
	    synchronized(this) {
		while (true)
		    Thread.yield();
	    }
	} catch(Error o) {
	    System.out.println("Caught " + o);
	    throw o;
	}
    }
}

class CatchSyncWaitDeath implements Runnable
{
    public void run()
    {
	try {
	    synchronized(this) {
		try {
		    wait();
		} catch (InterruptedException e) {
		    System.out.println("Interrupted " + e);
		}
	    }
	    System.out.println("CatchSyncWaitDeath should not be here");
	} catch(Error o) {
	    System.out.println("Caught " + o);
	    throw o;
	}
	System.out.println("Ditto, CatchSyncWaitDeath should not be here");
    }
}


// javac flags: -nowarn
/* Expected Output:
Caught java.lang.ThreadDeath
Caught java.lang.ThreadDeath
Caught java.lang.ThreadDeath
*/

{'fraction_non_alphanumeric': 0.14304592005285763, 'fraction_numerical': 0.00726792203501817, 'mean_word_length': 2.7107843137254903, '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': '6489222', 'n_tokens_mistral': 1157, 'n_tokens_neox': 1058, 'n_words': 256}