<commit_before>package seedu.address.testutil;

import com.google.common.io.Files;
import guitests.guihandles.EntryCardHandle;
import javafx.geometry.Bounds;
import javafx.geometry.Point2D;
import javafx.scene.Node;
import javafx.scene.Scene;
import javafx.scene.input.KeyCode;
import javafx.scene.input.KeyCodeCombination;
import javafx.scene.input.KeyCombination;
import junit.framework.AssertionFailedError;
import org.loadui.testfx.GuiTest;
import org.testfx.api.FxToolkit;
import seedu.address.TestApp;
import seedu.address.commons.exceptions.IllegalValueException;
import seedu.address.commons.util.FileUtil;
import seedu.address.commons.util.XmlUtil;
import seedu.address.model.Scheduler;
import seedu.address.model.entry.*;
import seedu.address.model.tag.Tag;
import seedu.address.model.tag.UniqueTagList;
import seedu.address.storage.XmlSerializableScheduler;

import java.io.File;
import java.io.IOException;
import java.lang.reflect.Field;
import java.lang.reflect.Method;
import java.lang.reflect.Modifier;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;
import java.util.concurrent.TimeoutException;
import java.util.stream.Collectors;

/**
 * A utility class for test cases.
 */
public class TestUtil {

    public static String LS = System.lineSeparator();

    public static void assertThrows(Class<? extends Throwable> expected, Runnable executable) {
        try {
            executable.run();
        }
        catch (Throwable actualException) {
            if (!actualException.getClass().isAssignableFrom(expected)) {
                String message = String.format("Expected thrown: %s, actual: %s", expected.getName(),
                        actualException.getClass().getName());
                throw new AssertionFailedError(message);
            } else return;
        }
        throw new AssertionFailedError(
                String.format("Expected %s to be thrown, but nothing was thrown.", expected.getName()));
    }

    /**
     * Folder used for temp files created during testing. Ignored by Git.
     */
    public static String SANDBOX_FOLDER = FileUtil.getPath("./src/test/data/sandbox/");

    public static final Entry[] sampleEntryData = getSampleEntryData();

    private static Entry[] getSampleEntryData() {
        try {
            return new Entry[]{
                    new Entry(new Name("<NAME>"), new StartTime("9482424"), new EndTime("<EMAIL>"), new Date("4th street"), new UniqueTagList()),
                    new Entry(new Name("<NAME>"), new StartTime("87249245"), new EndTime("<EMAIL>"), new Date("81th street"), new UniqueTagList()),
                    new Entry(new Name("<NAME>"), new StartTime("95352563"), new EndTime("<EMAIL>"), new Date("wall street"), new UniqueTagList()),
                    new Entry(new Name("<NAME>"), new StartTime("87652533"), new EndTime("<EMAIL>"), new Date("10th street"), new UniqueTagList()),
                    new Entry(new Name("<NAME>"), new StartTime("9482224"), new EndTime("<EMAIL>"), new Date("michegan ave"), new UniqueTagList()),
                    new Entry(new Name("<NAME>"), new StartTime("9482427"), new EndTime("<EMAIL>"), new Date("little tokyo"), new UniqueTagList()),
                    new Entry(new Name("<NAME>"), new StartTime("9482442"), new EndTime("<EMAIL>"), new Date("4th street"), new UniqueTagList()),
                    new Entry(new Name("<NAME>"), new StartTime("8482424"), new EndTime("<EMAIL>"), new Date("little india"), new UniqueTagList()),
                    new Entry(new Name("<NAME>"), new StartTime("8482131"), new EndTime("<EMAIL>"), new Date("chicago ave"), new UniqueTagList())
            };
        } catch (IllegalValueException e) {
            assert false;
            //not possible
            return null;
        }
    }

    public static final Tag[] sampleTagData = getSampleTagData();

    private static Tag[] getSampleTagData() {
        try {
            return new Tag[]{
                    new Tag("relatives"),
                    new Tag("friends")
            };
        } catch (IllegalValueException e) {
            assert false;
            return null;
            //not possible
        }
    }

    public static List<Entry> generateSampleEntryData() {
        return Arrays.asList(sampleEntryData);
    }<commit_msg>Correct Entry format in TestUtil.java<commit_after>package seedu.address.testutil;

import com.google.common.io.Files;
import guitests.guihandles.EntryCardHandle;
import javafx.geometry.Bounds;
import javafx.geometry.Point2D;
import javafx.scene.Node;
import javafx.scene.Scene;
import javafx.scene.input.KeyCode;
import javafx.scene.input.KeyCodeCombination;
import javafx.scene.input.KeyCombination;
import junit.framework.AssertionFailedError;
import org.loadui.testfx.GuiTest;
import org.testfx.api.FxToolkit;
import seedu.address.TestApp;
import seedu.address.commons.exceptions.IllegalValueException;
import seedu.address.commons.util.FileUtil;
import seedu.address.commons.util.XmlUtil;
import seedu.address.model.Scheduler;
import seedu.address.model.entry.*;
import seedu.address.model.tag.Tag;
import seedu.address.model.tag.UniqueTagList;
import seedu.address.storage.XmlSerializableScheduler;

import java.io.File;
import java.io.IOException;
import java.lang.reflect.Field;
import java.lang.reflect.Method;
import java.lang.reflect.Modifier;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;
import java.util.concurrent.TimeoutException;
import java.util.stream.Collectors;

/**
 * A utility class for test cases.
 */
public class TestUtil {

    public static String LS = System.lineSeparator();

    public static void assertThrows(Class<? extends Throwable> expected, Runnable executable) {
        try {
            executable.run();
        }
        catch (Throwable actualException) {
            if (!actualException.getClass().isAssignableFrom(expected)) {
                String message = String.format("Expected thrown: %s, actual: %s", expected.getName(),
                        actualException.getClass().getName());
                throw new AssertionFailedError(message);
            } else return;
        }
        throw new AssertionFailedError(
                String.format("Expected %s to be thrown, but nothing was thrown.", expected.getName()));
    }

    /**
     * Folder used for temp files created during testing. Ignored by Git.
     */
    public static String SANDBOX_FOLDER = FileUtil.getPath("./src/test/data/sandbox/");

    public static final Entry[] sampleEntryData = getSampleEntryData();

    private static Entry[] getSampleEntryData() {
        try {
            return new Entry[]{
                    new Entry(new Name("Lunch"), new StartTime("12:00"), new EndTime("13:30"), new Date("10-10-2016"), new UniqueTagList()),
                    new Entry(new Name("Study Group"), new StartTime("13:00"), new EndTime("15:00"), new Date("11-10-2016"), new UniqueTagList()),
                    new Entry(new Name("Football"), new StartTime("14:00"), new EndTime("16:00"), new Date("12-10-2016"), new UniqueTagList()),
                    new Entry(new Name("Test"), new StartTime("15:00"), new EndTime("16:30"), new Date("13-10-2016"), new UniqueTagList()),
                    new Entry(new Name("Basketball"), new StartTime("16:00"), new EndTime("18:00"), new Date("14-10-2016"), new UniqueTagList()),
                    new Entry(new Name("Meeting"), new StartTime("17:00"), new EndTime("18:00"), new Date("15-10-2016"), new UniqueTagList()),
                    new Entry(new Name("Dinner"), new StartTime("18:00"), new EndTime("19:00"), new Date("16-10-2016"), new UniqueTagList()),
                    new Entry(new Name("Buy Cake"), new StartTime("19:00"), new EndTime("20:00"), new Date("17-10-2016"), new UniqueTagList()),
                    new Entry(new Name("Watch Football"), new StartTime("20:00"), new EndTime("22:00"), new Date("18-10-2016"), new UniqueTagList())
            };
        } catch (IllegalValueException e) {
            assert false;
            //not possible
            return null;
        }
    }

    public static final Tag[] sampleTagData = getSampleTagData();

    private static Tag[] getSampleTagData() {
        try {
            return new Tag[]{
                    new Tag("relatives"),
                    new Tag("friends")
            };
        } catch (IllegalValueException e) {
            assert false;
            return null;
            //not possible
        }
    }

    public static List<Entry> generateSampleEntryData() {
        return Arrays.asList(sampleEntryData);
    }
{'fraction_non_alphanumeric': 0.13070155128501967, 'fraction_numerical': 0.025237323454503358, 'mean_word_length': 2.984778597785978, 'pattern_counts': {'":': 0, '<': 25, '<?xml version=': 0, '>': 25, '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': '7481391', 'n_tokens_mistral': 2541, 'n_tokens_neox': 2348, 'n_words': 600}