<commit_before>package com.safkanyazilim.arrange;

import static org.junit.Assert.*;

import java.util.ArrayList;
import java.util.Arrays;

import org.junit.Test;

public class SolutionTest {

	@Test
	public void testArrange1() {
		ArrayList<Integer> input = new ArrayList<Integer>(Arrays.asList(1,0));
		ArrayList<Integer> expected = new ArrayList<Integer>(Arrays.asList(0,1));
		
		try {
			Solution.arrange(input);
		} catch (Exception e) {
			fail("Test failed");
		}
		assertEquals(expected, input);
	}

	@Test
	public void testArrange2() {
		ArrayList<Integer> input = new ArrayList<Integer>(Arrays.asList(4,0,2,1,3));
		ArrayList<Integer> expected = new ArrayList<Integer>(Arrays.asList(3,4,2,0,1));
		
		try {
			Solution.arrange(input);
		} catch (Exception e) {
			fail("Test failed");
		}
		assertEquals(expected, input);
	}
	
	@Test
	public void testArrange3() {
		ArrayList<Integer> input = new ArrayList<Integer>(Arrays.asList(1, 2, 7, 0, 9, 3, 6, 8, 5, 4));
		ArrayList<Integer> expected = new ArrayList<Integer>(Arrays.asList(2, 7, 8, 1, 4, 0, 6, 5, 3, 9));
		
		try {
			Solution.arrange(input);
		} catch (Exception e) {
			e.printStackTrace();
			fail("Test failed\n" + e.getMessage() + "\n");
		}
		assertEquals(expected, input);
	}
	
	@Test
	public void testfindCurrentIndiceWithResult() {
		ArrayList<Integer> input = new ArrayList<Integer>(Arrays.asList(4,0,2,1,3));
		int value=4;
		int expected = 1;
		
		int output = -1;
		try {
			 output = Solution.findNextIndiceWithResult(value, input);
			
		} catch (Exception e) {
			fail("Test failed");
		}
		
		assertEquals(expected, output);
	}

	@Test
	public void testfindCurrentIndiceWithResult1() {
		ArrayList<Integer> input = new ArrayList<Integer>(Arrays.asList(4,0,2,1,3));
		int value= 0;
		int expected = 3;
		
		int output = -1;
		try {
			 output = Solution.findNextIndiceWithResult(value, input);
			
		} catch (Exception e) {
			fail("Test failed");
		}		
		assertEquals(expected, output);
	}

	@Test
	public void testfindCurrentIndiceWithResult2() {
		ArrayList<Integer> input = new ArrayList<Integer>(Arrays.asList(4,0,2,1,3));
		int value = 2;
		int expected = 2;
		
		int output = -1;
		try {
			 output = Solution.findNextIndiceWithResult(value, input);
			
		} catch (Exception e) {
			fail("Test failed");
		}		
		assertEquals(expected, output);
	}

	@Test
	public void testfindCurrentIndiceWithResult3() {
		ArrayList<Integer> input = new ArrayList<Integer>(Arrays.asList(4,0,2,1,3));
		int value = 1;
		int expected = 4;
		
		int output = -1;
		try {
			 output = Solution.findNextIndiceWithResult(value, input);
			
		} catch (Exception e) {
			fail("Test failed");
		}		
		assertEquals(expected, output);
	}

	@Test
	public void testfindCurrentIndiceWithResult4() {
		ArrayList<Integer> input = new ArrayList<Integer>(Arrays.asList(4,0,2,1,3));
		int value = 3;
		int expected = 0;
		
		int output = -1;
		try {
			 output = Solution.findNextIndiceWithResult(value, input);
			
		} catch (Exception e) {
			fail("Test failed");
		}		
		assertEquals(expected, output);
	}

}<commit_msg>Added new test for arrange<commit_after>package com.safkanyazilim.arrange;

import static org.junit.Assert.*;

import java.util.ArrayList;
import java.util.Arrays;

import org.junit.Test;

public class SolutionTest {

	@Test
	public void testArrange1() {
		ArrayList<Integer> input = new ArrayList<Integer>(Arrays.asList(1,0));
		ArrayList<Integer> expected = new ArrayList<Integer>(Arrays.asList(0,1));
		
		try {
			Solution.arrange(input);
		} catch (Exception e) {
			fail("Test failed");
		}
		assertEquals(expected, input);
	}

	@Test
	public void testArrange2() {
		ArrayList<Integer> input = new ArrayList<Integer>(Arrays.asList(4,0,2,1,3));
		ArrayList<Integer> expected = new ArrayList<Integer>(Arrays.asList(3,4,2,0,1));
		
		try {
			Solution.arrange(input);
		} catch (Exception e) {
			fail("Test failed");
		}
		assertEquals(expected, input);
	}
	
	@Test
	public void testArrange3() {
		ArrayList<Integer> input = new ArrayList<Integer>(Arrays.asList(1, 2, 7, 0, 9, 3, 6, 8, 5, 4));
		ArrayList<Integer> expected = new ArrayList<Integer>(Arrays.asList(2, 7, 8, 1, 4, 0, 6, 5, 3, 9));
		
		try {
			Solution.arrange(input);
		} catch (Exception e) {
			e.printStackTrace();
			fail("Test failed\n" + e.getMessage() + "\n");
		}
		assertEquals(expected, input);
	}
	
	@Test
	public void testfindCurrentIndiceWithResult() {
		ArrayList<Integer> input = new ArrayList<Integer>(Arrays.asList(4,0,2,1,3));
		int value=4;
		int expected = 1;
		
		int output = -1;
		try {
			 output = Solution.findNextIndiceWithResult(value, input);
			
		} catch (Exception e) {
			fail("Test failed");
		}
		
		assertEquals(expected, output);
	}

	@Test
	public void testfindCurrentIndiceWithResult1() {
		ArrayList<Integer> input = new ArrayList<Integer>(Arrays.asList(4,0,2,1,3));
		int value= 0;
		int expected = 3;
		
		int output = -1;
		try {
			 output = Solution.findNextIndiceWithResult(value, input);
			
		} catch (Exception e) {
			fail("Test failed");
		}		
		assertEquals(expected, output);
	}

	@Test
	public void testfindCurrentIndiceWithResult2() {
		ArrayList<Integer> input = new ArrayList<Integer>(Arrays.asList(4,0,2,1,3));
		int value = 2;
		int expected = 2;
		
		int output = -1;
		try {
			 output = Solution.findNextIndiceWithResult(value, input);
			
		} catch (Exception e) {
			fail("Test failed");
		}		
		assertEquals(expected, output);
	}

	@Test
	public void testfindCurrentIndiceWithResult3() {
		ArrayList<Integer> input = new ArrayList<Integer>(Arrays.asList(4,0,2,1,3));
		int value = 1;
		int expected = 4;
		
		int output = -1;
		try {
			 output = Solution.findNextIndiceWithResult(value, input);
			
		} catch (Exception e) {
			fail("Test failed");
		}		
		assertEquals(expected, output);
	}

	@Test
	public void testfindCurrentIndiceWithResult4() {
		ArrayList<Integer> input = new ArrayList<Integer>(Arrays.asList(4,0,2,1,3));
		int value = 3;
		int expected = 0;
		
		int output = -1;
		try {
			 output = Solution.findNextIndiceWithResult(value, input);
			
		} catch (Exception e) {
			fail("Test failed");
		}		
		assertEquals(expected, output);
	}

	@Test
	public void testfindCurrentIndiceWithResult5() {
		ArrayList<Integer> input = new ArrayList<Integer>(Arrays.asList(1, 2, 7, 0, 9, 3, 6, 8, 5, 4));
		int value = 1;
		int expected = 3;
		
		int output = -1;
		try {
			 output = Solution.findNextIndiceWithResult(value, input);
			
		} catch (Exception e) {
			fail("Test failed");
		}		
		assertEquals(expected, output);
	}
}
{'fraction_non_alphanumeric': 0.14266097039975587, 'fraction_numerical': 0.026853829722306988, 'mean_word_length': 3.9101123595505616, 'pattern_counts': {'":': 0, '<': 49, '<?xml version=': 0, '>': 49, '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': '1459358', 'n_tokens_mistral': 2592, 'n_tokens_neox': 2219, 'n_words': 515}