<commit_before>package guitests.guihandles;

import guitests.GuiRobot;
import javafx.scene.Node;
import javafx.stage.Stage;
import seedu.manager.model.activity.ReadOnlyActivity;

/**
 * Provides a handle to a activity card in the activity list panel.
 */
public class ActivityCardHandle extends GuiHandle {
    private static final String NAME_FIELD_ID = "#name";

    private Node node;

    public ActivityCardHandle(GuiRobot guiRobot, Stage primaryStage, Node node){
        super(guiRobot, primaryStage, null);
        this.node = node;
    }

    protected String getTextFromLabel(String fieldId) {
        return getTextFromLabel(fieldId, node);
    }

    public String getName() {
        return getTextFromLabel(NAME_FIELD_ID);
    }

    public boolean isSameActivity(ReadOnlyActivity activity){
        return getName().equals(activity.getName());
    }

    @Override
    public boolean equals(Object obj) {
        if(obj instanceof ActivityCardHandle) {
            ActivityCardHandle handle = (ActivityCardHandle) obj;
            return getName().equals(handle.getName()); //TODO: compare the rest
        }
        return super.equals(obj);
    }

    @Override
    public String toString() {
        return getName();
    }
}
<commit_msg>strengthen ActivityCardHandle equality check<commit_after>package guitests.guihandles;

import guitests.GuiRobot;
import javafx.scene.Node;
import javafx.stage.Stage;
import seedu.manager.model.activity.ReadOnlyActivity;

/**
 * Provides a handle to a activity card in the activity list panel.
 */
public class ActivityCardHandle extends GuiHandle {
    private static final String NAME_FIELD_ID = "#name";
    private static final String DATE_TIME_FIELD_ID = "#dateTime";
    private static final String END_DATE_TIME_FIELD_ID = "#endDateTime";
    private static final String STATUS_FIELD_ID = "#status";

    private Node node;

    public ActivityCardHandle(GuiRobot guiRobot, Stage primaryStage, Node node){
        super(guiRobot, primaryStage, null);
        this.node = node;
    }

    protected String getTextFromLabel(String fieldId) {
        return getTextFromLabel(fieldId, node);
    }

    public String getName() {
        return getTextFromLabel(NAME_FIELD_ID);
    }
    
    public String getDateTime() {
        return getTextFromLabel(DATE_TIME_FIELD_ID);
    }
    
    public String getEndDateTime() {
        return getTextFromLabel(END_DATE_TIME_FIELD_ID);
    }
    
    public String getStatus() {
        return getTextFromLabel(STATUS_FIELD_ID);
    }

    public boolean isSameActivity(ReadOnlyActivity activity){
        return getName().equals(activity.getName());
    }

    @Override
    public boolean equals(Object obj) {
        if(obj instanceof ActivityCardHandle) {
            ActivityCardHandle handle = (ActivityCardHandle) obj;
            return getName().equals(handle.getName())
                    && getDateTime().equals(handle.getDateTime())
                    && getEndDateTime().equals(handle.getEndDateTime())
                    && getStatus().equals(getStatus());
        }
        return super.equals(obj);
    }

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

{'fraction_non_alphanumeric': 0.08917991892734643, 'fraction_numerical': 0.0, 'mean_word_length': 3.040302267002519, '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': '1561231', 'n_tokens_mistral': 876, 'n_tokens_neox': 861, 'n_words': 219}