<commit_before>	static void runTestcase(int __case) {
		switch (__case) {
			// Your custom testcase goes here
			case -1:
				//doTest(${foreach Method.Params p , }${p.Name}${end}, expected, __case);
				break;

${<foreach Examples e}
			case ${e.Num}: {
${<foreach e.Input in}
${<if !in.Param.Type.Array}
				${in.Param.Type.Primitive} ${in.Param.Name} = ${in};
${<else}
				${in.Param.Type.Primitive} ${in.Param.Name}[] = new ${in.Param.Type} {${foreach in.ValueList v ,}
					${v}${end}
				};
${<end}
${<end}
${<if !e.Output.Param.Type.Array}
				${e.Output.Param.Type.Primitive} __excepted = ${e.Output};
${<else}
				${e.Output.Param.Type.Primitive} __excepted[] = new ${e.Output.Param.Type} {${foreach e.Output.ValueList v ,}
					${v}${end}
				};
${<end}
				doTest(${foreach e.Input in , }${in.Param.Name}${end}, __excepted, __case);
				break;
			}
${<end}
			default: break;
		}
	}

	static void doTest(${Method.Params}, ${Method.ReturnType} __expected, int caseNo) {
${<if RecordRuntime}
		long startTime = System.currentTimeMillis();
${<end}
		Throwable exception = null;
		${ClassName} instance = new ${ClassName}();
		${Method.ReturnType} __result = ${Method.ReturnType;ZeroValue};
		try {
			__result = instance.${Method.Name}(${foreach Method.Params par , }${par.Name}${end});
		}
		catch (Throwable e) { exception = e; }
${<if RecordRuntime}
		double elapsed = (System.currentTimeMillis() - startTime) / 1000.0;
${<end}

		nAll++;
		System.err.print(String.format("  Testcase #%d ... ", caseNo));
<commit_msg>Use new String() to allocate string arguments before testing. Catches bugs in solutions by using == to compare strings.<commit_after>	static void runTestcase(int __case) {
		switch (__case) {
			// Your custom testcase goes here
			case -1:
				//doTest(${foreach Method.Params p , }${p.Name}${end}, expected, __case);
				break;

${<foreach Examples e}
			case ${e.Num}: {
${<foreach e.Input in}
${<if !in.Param.Type.Array}
				${in.Param.Type.Primitive} ${in.Param.Name} = ${in};
${<else}
				${in.Param.Type.Primitive} ${in.Param.Name}[] = new ${in.Param.Type} {${foreach in.ValueList v ,}
					${v}${end}
				};
${<end}
${<end}
${<if !e.Output.Param.Type.Array}
				${e.Output.Param.Type.Primitive} __excepted = ${e.Output};
${<else}
				${e.Output.Param.Type.Primitive} __excepted[] = new ${e.Output.Param.Type} {${foreach e.Output.ValueList v ,}
					${v}${end}
				};
${<end}
				doTest(${foreach e.Input in , }${in.Param.Name}${end}, __excepted, __case);
				break;
			}
${<end}
			default: break;
		}
	}

	static void doTest(${Method.Params}, ${Method.ReturnType} __expected, int caseNo) {
${<foreach Method.Params p}
${<if p.Type.String}
${<if p.Type.Array}
		for (int i = 0; i < ${p.Name}.length; i++) {
			${p.Name}[i] = new String(${p.Name}[i]);
		}
${<else}
        ${p.Name} = new String(${p.Name});
${<end}
${<end}
${<end}
${<if RecordRuntime}
		long startTime = System.currentTimeMillis();
${<end}
		Throwable exception = null;
		${ClassName} instance = new ${ClassName}();
		${Method.ReturnType} __result = ${Method.ReturnType;ZeroValue};
		try {
			__result = instance.${Method.Name}(${foreach Method.Params par , }${par.Name}${end});
		}
		catch (Throwable e) { exception = e; }
${<if RecordRuntime}
		double elapsed = (System.currentTimeMillis() - startTime) / 1000.0;
${<end}

		nAll++;
		System.err.print(String.format("  Testcase #%d ... ", caseNo));

{'fraction_non_alphanumeric': 0.21269095182138661, 'fraction_numerical': 0.00381903642773208, 'mean_word_length': 3.8297872340425534, 'pattern_counts': {'":': 0, '<': 39, '<?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': '6255295', 'n_tokens_mistral': 1378, 'n_tokens_neox': 1244, 'n_words': 275}