<commit_before>package core.string;

import org.junit.Test;

import static org.junit.Assert.*;

public class StringOps {

	@Test
	public void checkLength() {
		assertTrue("Firefly".length() == 7);
	}

	@Test
	public void checkToLowerCase() {
		assertEquals("Firefly".toLowerCase(), "firefly");
	}

	@Test
	public void checkToUpperCase() {
		assertEquals("Firefly".toUpperCase(), "FIREFLY");
	}

	@Test
	public void checkStartsWith() {
		assertTrue("Firefly".startsWith("Fire"));
		assertFalse("Firefly".startsWith("Ice"));
	}

	@Test
	public void checkEndsWith() {
		assertTrue("Firefly".endsWith("fly"));
		assertFalse("Firefly".endsWith("foo"));
	}

	@Test
	public void checkContains() {
		assertTrue("Firefly".contains("re"));
		assertFalse("Firefly".contains("se"));
	}

	@Test
	public void checkReplace() {
		assertEquals("Firefly".replace('f', 's'), "Firesly");
		assertEquals("Firefly".replace("fly", "ball"), "Fireball");
	}

	@Test
	public void checkTrim() {
		assertEquals(" \t \n \r Mission Serenity \t \n \r ".trim(), "Mission Serenity");
	}

}<commit_msg>Introduced test for chain of methods<commit_after>package core.string;

import org.junit.Test;

import static org.junit.Assert.*;

public class StringOps {

	@Test
	public void checkLength() {
		assertTrue("Firefly".length() == 7);
	}

	@Test
	public void checkToLowerCase() {
		assertEquals("Firefly".toLowerCase(), "firefly");
	}

	@Test
	public void checkToUpperCase() {
		assertEquals("Firefly".toUpperCase(), "FIREFLY");
	}

	@Test
	public void checkStartsWith() {
		assertTrue("Firefly".startsWith("Fire"));
		assertFalse("Firefly".startsWith("Ice"));
	}

	@Test
	public void checkEndsWith() {
		assertTrue("Firefly".endsWith("fly"));
		assertFalse("Firefly".endsWith("foo"));
	}

	@Test
	public void checkContains() {
		assertTrue("Firefly".contains("re"));
		assertFalse("Firefly".contains("se"));
	}

	@Test
	public void checkReplace() {
		assertEquals("Firefly".replace('f', 's'), "Firesly");
		assertEquals("Firefly".replace("fly", "ball"), "Fireball");
	}

	@Test
	public void checkTrim() {
		assertEquals(" \t \n \r Mission Serenity \t \n \r ".trim(), "Mission Serenity");
	}

	@Test
	public void checkMethodChain() {
		assertEquals(" Firefly ".trim().toLowerCase().replace('f', 'F'), "FireFly");
	}
}
{'fraction_non_alphanumeric': 0.1836108676599474, 'fraction_numerical': 0.0008764241893076249, 'mean_word_length': 5.120643431635389, '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': '4769349', 'n_tokens_mistral': 792, 'n_tokens_neox': 765, 'n_words': 158}