<commit_before>class ControlStructures {
	
	class ForFail {
	
		List<String> names = { "Gavin", "Emmanuel", "Andrew", "Jason" };
		Map<String,String> fullNames = { "Gavin"->"King", "Jason"->"Greene" };
		
		for (String name in names) {
			log.info(name);
		}
		
		for (String name in names) {
			if (name=="Gavin") {
				log.info("found");
				break true;
			}
			fail {
				log.info("not found");
			}
		}
		
		for (String first->String last in fullNames) {
			log.info("${first} ${last}");
		}
		
	}
	
	class IfElse {
	
		if (true) {
			log.info("always true");
		}
	
		if (false) {
			log.info("never true");
		}
		else {
			log.info("always false");
		}
		
		optional String hello = "Hello";
		
		if (exists hello) {
			log.info(hello);
		}
		
		optional String s = null;
		
		if (exists s) {
			log.info(s);
		}
		else {
			log.info("never exists");
		}
		
		class Foo {}
		class Bar extends Foo {}
		
		Foo foo = Bar();
		
		if (is Bar foo) {
			log.info("it is a Bar");
		}
		else {
			log.info("it is not a Bar");
		}
		
		optional List<Foo> foos = { Foo(), Bar() };
		
		if (nonempty foos) {
			log.info($foos);
		}
		else {
			log.info("empty");
		}
		
	}
	
	class DoWhile {
		
		while (true) {
			log.info("hello");
		}
		
		do {
			log.info("hello");
		}
		while (true);
		
		do {
			log.info("hello");
		}
		while (true) {
			log.info("goodbye");
		}
		
		do (Iterator<Character> tokens = "Hello World!".tokens().iterator) 
		while (tokens.more)
		{
			if ("hello"==tokens.next().lowercase) {
				log.info("found");
				break true;
			}
		}
		fail {
			log.info("not found");
		}
		
	}
	
	class TryCatchFinally {
		
		try ( Transaction() ) {
			doSomething();
		}
		
		try {
			throw Exception();
		}
		catch (Exception e) {
			retry;
		}
		
		try ( Transaction(), Session s = Session() ) {
			throw Exception();
		}
		catch (Exception e) {
			throw e;
		}
		
		try ( Session s = Session() ) {
			throw Exception();<commit_msg>minor<commit_after>class ControlStructures {
	
	class ForFail {
	
		List<String> names = { "Gavin", "Emmanuel", "Andrew", "Jason" };
		Map<String,String> fullNames = { "Gavin"->"King", "Jason"->"Greene" };
		
		for (String name in names) {
			log.info(name);
		}
		
		for (String name in names) {
			if (name=="Gavin") {
				log.info("found");
				break true;
			}
			fail {
				log.info("not found");
			}
		}
		
		for (String first->String last in fullNames) {
			log.info("${first} ${last}");
		}
		
	}
	
	class IfElse {
	
		if (true) {
			log.info("always true");
		}
	
		if (false) {
			log.info("never true");
		}
		else {
			log.info("always false");
		}
		
		optional String hello = "Hello";
		
		if (exists hello) {
			log.info(hello);
		}
		
		optional String s = null;
		
		if (exists s) {
			log.info(s);
		}
		else {
			log.info("never exists");
		}
		
		class Foo {}
		class Bar extends Foo {}
		
		Foo foo = Bar();
		
		if (is Bar foo) {
			log.info("it is a Bar");
		}
		else {
			log.info("it is not a Bar");
		}
		
		optional List<Foo> foos = { Foo(), Bar() };
		
		if (nonempty foos) {
			log.info($foos);
		}
		else {
			log.info("empty");
		}
		
	}
	
	class DoWhile {
		
		while (true) {
			log.info("hello");
		}
		
		do {
			log.info("hello");
		}
		while (true);
		
		do {
			log.info("hello");
		}
		while (true) {
			log.info("goodbye");
		}
		
		do (Iterator<Character> tokens = "Hello World!".tokens().iterator) 
		while (tokens.more)
		{
			if ("hello"==tokens.next().lowercase) {
				log.info("found");
				break;
			}
		}
		
	}
	
	class TryCatchFinally {
		
		try ( Transaction() ) {
			doSomething();
		}
		
		try {
			throw Exception();
		}
		catch (Exception e) {
			retry;
		}
		
		try ( Transaction(), Session s = Session() ) {
			throw Exception();
		}
		catch (Exception e) {
			throw e;
		}
		
		try ( Session s = Session() ) {
			throw Exception();
{'fraction_non_alphanumeric': 0.17659352142110762, 'fraction_numerical': 0.0, 'mean_word_length': 2.2421676545300593, 'pattern_counts': {'":': 0, '<': 11, '<?xml version=': 0, '>': 17, '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': '5920710', 'n_tokens_mistral': 1837, 'n_tokens_neox': 1389, 'n_words': 327}