<commit_before>package seedu.taskmanager.testutil;

import java.util.Optional;

import seedu.taskmanager.model.tag.UniqueTagList;
import seedu.taskmanager.model.task.Description;
import seedu.taskmanager.model.task.EndDate;
import seedu.taskmanager.model.task.ReadOnlyTask;
import seedu.taskmanager.model.task.StartDate;
import seedu.taskmanager.model.task.Title;

/**
 * A mutable task object. For testing only.
 */
public class TestTask implements ReadOnlyTask {

    private Title title;
    // @@author A0140032E
    private Optional<Description> description;
    private Optional<EndDate> endDate;
    private Optional<StartDate> startDate;
    // @@author
    private UniqueTagList tags;

    public TestTask() {
        tags = new UniqueTagList();
    }

    /**
     * Creates a copy of {@code taskToCopy}.
     */
    public TestTask(TestTask taskToCopy) {
        this.title = taskToCopy.getTitle();
        this.startDate = taskToCopy.getStartDate();
        this.endDate = taskToCopy.getEndDate();
        this.description = taskToCopy.getDescription();
        this.tags = taskToCopy.getTags();
    }

    public void setTitle(Title title) {
        this.title = title;
    }

    public void setDescription(Optional<Description> description) {
        this.description = description;
    }

    public void setEndDate(Optional<EndDate> endDate) {
        this.endDate = endDate;
    }

    public void setStartDate(Optional<StartDate> startDate) {
        this.startDate = startDate;
    }

    public void setTags(UniqueTagList tags) {
        this.tags = tags;
    }

    @Override
    public Title getTitle() {
        return title;
    }

    @Override
    public Optional<StartDate> getStartDate() {
        return startDate;
    }

    @Override
    public Optional<EndDate> getEndDate() {
        return endDate;
    }

    @Override
    public Optional<Description> getDescription() {
        return description;
    }

    @Override
    public UniqueTagList getTags() {
        return tags;
    }

    @Override
    public String toString() {
        return getAsText();
    }

    public String getAddCommand() {
        StringBuilder sb = new StringBuilder();
        sb.append("add " + this.getTitle().value + " ");
        sb.append("s/" + this.getStartDate().toString() + " ");
        sb.append("e/" + this.getEndDate().toString() + " ");
        sb.append("d/" + this.getDescription().get().value + " ");
        this.getTags().asObservableList().stream().forEach(s -> sb.append("#" + s.tagName + " "));
        return sb.toString();
    }
}<commit_msg>TestTask.java update<commit_after>package seedu.taskmanager.testutil;

import java.util.Optional;

import seedu.taskmanager.model.tag.UniqueTagList;
import seedu.taskmanager.model.task.Description;
import seedu.taskmanager.model.task.EndDate;
import seedu.taskmanager.model.task.ReadOnlyTask;
import seedu.taskmanager.model.task.StartDate;
import seedu.taskmanager.model.task.Title;

/**
 * A mutable task object. For testing only.
 */
public class TestTask implements ReadOnlyTask {

    private Title title;
    // @@author A0140032E
    private Optional<Description> description;
    private Optional<EndDate> endDate;
    private Optional<StartDate> startDate;
    // @@author
    private UniqueTagList tags;

    public TestTask() {
        tags = new UniqueTagList();
    }

    /**
     * Creates a copy of {@code taskToCopy}.
     */
    public TestTask(TestTask taskToCopy) {
        this.title = taskToCopy.getTitle();
        this.startDate = taskToCopy.getStartDate();
        this.endDate = taskToCopy.getEndDate();
        this.description = taskToCopy.getDescription();
        this.tags = taskToCopy.getTags();
    }

    public void setTitle(Title title) {
        this.title = title;
    }

    public void setDescription(Optional<Description> description) {
        this.description = description;
    }

    public void setEndDate(Optional<EndDate> endDate) {
        this.endDate = endDate;
    }

    public void setStartDate(Optional<StartDate> startDate) {
        this.startDate = startDate;
    }

    public void setTags(UniqueTagList tags) {
        this.tags = tags;
    }

    @Override
    public Title getTitle() {
        return title;
    }

    @Override
    public Optional<StartDate> getStartDate() {
        return startDate;
    }

    @Override
    public Optional<EndDate> getEndDate() {
        return endDate;
    }

    @Override
    public Optional<Description> getDescription() {
        return description;
    }

    @Override
    public UniqueTagList getTags() {
        return tags;
    }

    @Override
    public String toString() {
        return getAsText();
    }

    public String getAddCommand() {
        StringBuilder sb = new StringBuilder();
        sb.append("add " + this.getTitle().value + " ");
        // @@author A0140032E
        this.getStartDate().ifPresent(x -> sb.append("s/" + x.toString()));
        this.getEndDate().ifPresent(x -> sb.append("e/" + x.toString()));
        this.getDescription().ifPresent(x -> sb.append("d/" + x.toString()));
        // @@author
        this.getTags().asObservableList().stream().forEach(s -> sb.append("#" + s.tagName + " "));
        return sb.toString();
    }
}
{'fraction_non_alphanumeric': 0.1201977938379612, 'fraction_numerical': 0.00399391403575504, 'mean_word_length': 2.703521126760563, 'pattern_counts': {'":': 0, '<': 21, '<?xml version=': 0, '>': 26, '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': '3397883', 'n_tokens_mistral': 1555, 'n_tokens_neox': 1505, 'n_words': 319}