<commit_before>package statements;

import org.junit.Test;

import static org.junit.Assert.assertTrue;

public class Ternary {

	@Test
	public void testTernary() {
		int x = 1, y = 1;
		int r = x == y ? x++ : y++;
		assertTrue(x == 2);
		assertTrue(y == 1);
		assertTrue(r == 1);

		int q = x == y ? x-- : y--;
		assertTrue(x == 2);
		assertTrue(y == 0);
		assertTrue(q == 1);
	}
}<commit_msg>Testing ternary<commit_after>package statements;

import org.junit.Test;

import static org.junit.Assert.assertTrue;

public class Ternary {

	@Test
	public void testTernaryLeftExpression() {
		int x = 1, y = 1;
		int r = x == y ? --x : --y;
		assertTrue(x == 0);
		assertTrue(y == 1); // stays unchanged
		assertTrue(r == 0);
	}

	@Test
	public void testTernaryRightExpression() {
		int x = 2, y = 1;
		int q = x == y ? --x : --y;
		assertTrue(x == 2); // stays unchanged
		assertTrue(y == 0);
		assertTrue(q == 0);
	}
}
{'fraction_non_alphanumeric': 0.17177242888402625, 'fraction_numerical': 0.019693654266958426, 'mean_word_length': 3.013157894736842, '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': '2349668', 'n_tokens_mistral': 379, 'n_tokens_neox': 347, 'n_words': 100}