<commit_before>package javatest.misc;

import jtransc.annotation.JTranscKeep;

import java.lang.annotation.*;
import java.lang.reflect.Field;
import java.lang.reflect.Method;
import java.lang.reflect.ParameterizedType;
import java.lang.reflect.Type;
import java.nio.ByteBuffer;
import java.nio.charset.Charset;
import java.security.MessageDigest;
import java.security.NoSuchAlgorithmException;
import java.util.*;
import java.util.regex.Pattern;
import java.util.zip.CRC32;

public class MiscTest {
    static public int MY_GREAT_CONSTANT = 10;

    static public void main(String[] args) throws Throwable {
        new MiscTest().main2(args);
    }

    void main2(String[] args) throws Throwable {
        System.out.println("STARTED");
        System.out.println("args:" + Arrays.toString(args));
		System.out.println(true);
		System.out.println(false);
        systemPropertiesTest();
        testRegex();
        mapTest();
        arrayListTest();
        stringConstructTest();
        inheritanceTest();
        accessStaticConstantTest();
        returnDistinctTypeTest();
        instanceOfTest();
        abstractInterfaceTest();
        operatorTest();
        simpleReflection();
        toStringInterface();
        shortCalc();
        fieldReflection();
        accessInterfaceStaticFields();
        tryCatchTest();
        testRandom();
        testCloneArray();
        //testMd5();
        //testSha1();
		testCrc32();
        testCharset();
        testDynamicInstanceof();
        testGenericStuff();
        testAnnotations();
        testArrays();
		testNulls();
	    try {
		    testThrowPrevStack();
	    } catch (Throwable t) {
		    System.out.println("[1]");
		    System.out.println(t.getMessage());
	    }

	    System.out.println(StaticCall1.a);
	    StaticCall1.a = 20;
	    System.out.println(StaticCall1.a);

		System.out.println(seedUniquifier());

		Test test = new Test();
		System.out.println(test.elements);
		test.demo().testEmptyStack();
		System.out.println(test.elements);

	    System.out.println(testTypeUnification(true));
	    System.out.println(testTypeUnification(false));

	    testCatchBlockAccessingArguments(3, 7);

	    testLong1(1L, 2);
	    testLong2(1, 2L);
	    testLong3(1, 2L, 3);

	    System.out.println("COMPLETED");
        //stage.getStage3Ds()[0].requestContext3D(Context3DRenderMode.AUTO, "baselineConstrained");
    }

	private void testLong1(long a, int b) {
		System.out.println(a);
		System.out.println(b);
	}

	private void testLong2(int a, long b) {
		System.out.println(a);
		System.out.println(b);
	}

	private void testLong3(int a, long b, int c) {
		System.out.println(a);
		System.out.println(b);
		System.out.println(c);
	}

	private void testCatchBlockAccessingArguments(int a, int b) {<commit_msg>Added switch test<commit_after>package javatest.misc;

import jtransc.annotation.JTranscKeep;

import java.lang.annotation.*;
import java.lang.reflect.Field;
import java.lang.reflect.Method;
import java.lang.reflect.ParameterizedType;
import java.lang.reflect.Type;
import java.nio.ByteBuffer;
import java.nio.charset.Charset;
import java.security.MessageDigest;
import java.security.NoSuchAlgorithmException;
import java.util.*;
import java.util.regex.Pattern;
import java.util.zip.CRC32;

public class MiscTest {
    static public int MY_GREAT_CONSTANT = 10;

    static public void main(String[] args) throws Throwable {
        new MiscTest().main2(args);
    }

    void main2(String[] args) throws Throwable {
        System.out.println("STARTED");
        System.out.println("args:" + Arrays.toString(args));
		System.out.println(true);
		System.out.println(false);
        systemPropertiesTest();
        testRegex();
        mapTest();
        arrayListTest();
        stringConstructTest();
        inheritanceTest();
        accessStaticConstantTest();
        returnDistinctTypeTest();
        instanceOfTest();
        abstractInterfaceTest();
        operatorTest();
        simpleReflection();
        toStringInterface();
        shortCalc();
        fieldReflection();
        accessInterfaceStaticFields();
        tryCatchTest();
        testRandom();
        testCloneArray();
        //testMd5();
        //testSha1();
		testCrc32();
        testCharset();
        testDynamicInstanceof();
        testGenericStuff();
        testAnnotations();
        testArrays();
		testNulls();
	    try {
		    testThrowPrevStack();
	    } catch (Throwable t) {
		    System.out.println("[1]");
		    System.out.println(t.getMessage());
	    }

	    System.out.println(StaticCall1.a);
	    StaticCall1.a = 20;
	    System.out.println(StaticCall1.a);

		System.out.println(seedUniquifier());

		Test test = new Test();
		System.out.println(test.elements);
		test.demo().testEmptyStack();
		System.out.println(test.elements);

	    System.out.println(testTypeUnification(true));
	    System.out.println(testTypeUnification(false));

	    testCatchBlockAccessingArguments(3, 7);

	    testLong1(1L, 2);
	    testLong2(1, 2L);
	    testLong3(1, 2L, 3);

	    testSwitch(1);
	    testSwitch(3);
	    testSwitch2(-1000);
	    testSwitch2(5050);
	    testSwitch2(3);

	    System.out.println("COMPLETED");
        //stage.getStage3Ds()[0].requestContext3D(Context3DRenderMode.AUTO, "baselineConstrained");
    }

	private void testSwitch(int b) {
		System.out.println("zero");
		switch (b) {
			case 0:
				System.out.println("0");
			case 1:
				System.out.println("1");
			case 2:
				System.out.println("2");
				break;
			case 3:
				System.out.println("3");
			case 4:
				System.out.println("4");
			default:
				System.out.println("else");
				break;
		}
		System.out.println("out");
	}

	private void testSwitch2(int b) {
		System.out.println("start");
		switch (b) {
			case -1000:
				System.out.println("-1000");
			default:
				System.out.println("other:" + b);
			case 0:
				System.out.println("0");
				break;
			case 5050:
				System.out.println("5050");
			case 3333:
				System.out.println("3333");
				break;
		}
		System.out.println("out");
	}

	private void testLong1(long a, int b) {
		System.out.println(a);
		System.out.println(b);
	}

	private void testLong2(int a, long b) {
		System.out.println(a);
		System.out.println(b);
	}

	private void testLong3(int a, long b, int c) {
		System.out.println(a);
		System.out.println(b);
		System.out.println(c);
	}

	private void testCatchBlockAccessingArguments(int a, int b) {
{'fraction_non_alphanumeric': 0.13976653696498054, 'fraction_numerical': 0.018832684824902725, 'mean_word_length': 3.100829610721123, 'pattern_counts': {'":': 0, '<': 3, '<?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': '6637631', 'n_tokens_mistral': 2256, 'n_tokens_neox': 2023, 'n_words': 357}