<commit_before>package ch.pantas.billsplitter.model;

public class Participant extends Model {
    private String userId;
    private String eventId;
    private boolean confirmed;
    private long lastUpdated;

    public Participant(String id, String userId, String eventId, boolean confirmed, long lastUpdated) {
        super(id);
        this.userId = userId;
        this.eventId = eventId;
        this.confirmed = confirmed;
        this.lastUpdated = lastUpdated;
    }

    public Participant(String userId, String eventId) {
        this(userId, eventId, false, 0);
    }

    public Participant(String userId, String eventId, boolean confirmed, long lastUpdated) {
        this.userId = userId;
        this.eventId = eventId;
        this.confirmed = confirmed;
        this.lastUpdated = lastUpdated;
    }

    public long getLastUpdated() {
        return lastUpdated;
    }

    public void setLastUpdated(long lastUpdated) {
        this.lastUpdated = lastUpdated;
    }

    public void setConfirmed(boolean confirmed) {
        this.confirmed = confirmed;
    }

    public boolean isConfirmed() {
        return confirmed;
    }

    public String getUserId() {
        return userId;
    }

    public void setUserId(String userId) {
        this.userId = userId;
    }

    public String getEventId() {
        return eventId;
    }

    public void setEventId(String eventId) {
        this.eventId = eventId;
    }
}<commit_msg>BUGFIX: Issue #3 solved. Participant can no longer be removed if the user is only an attendee of an expense.<commit_after>package ch.pantas.billsplitter.model;

public class Participant extends Model {
    private String userId;
    private String eventId;
    private boolean confirmed;
    private long lastUpdated;

    public Participant(String id, String userId, String eventId, boolean confirmed, long lastUpdated) {
        super(id);
        this.userId = userId;
        this.eventId = eventId;
        this.confirmed = confirmed;
        this.lastUpdated = lastUpdated;
    }

    public Participant(String userId, String eventId) {
        this(userId, eventId, false, 0);
    }

    public Participant(String userId, String eventId, boolean confirmed, long lastUpdated) {
        this.userId = userId;
        this.eventId = eventId;
        this.confirmed = confirmed;
        this.lastUpdated = lastUpdated;
    }

    public long getLastUpdated() {
        return lastUpdated;
    }

    public void setLastUpdated(long lastUpdated) {
        this.lastUpdated = lastUpdated;
    }

    public void setConfirmed(boolean confirmed) {
        this.confirmed = confirmed;
    }

    public boolean isConfirmed() {
        return confirmed;
    }

    public String getUserId() {
        return userId;
    }

    public void setUserId(String userId) {
        this.userId = userId;
    }

    public String getEventId() {
        return eventId;
    }

    public void setEventId(String eventId) {
        this.eventId = eventId;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;

        Participant that = (Participant) o;

        if (!eventId.equals(that.eventId)) return false;
        if (!userId.equals(that.userId)) return false;

        return true;
    }

    @Override
    public int hashCode() {
        int result = userId.hashCode();
        result = 31 * result + eventId.hashCode();
        return result;
    }
}
{'fraction_non_alphanumeric': 0.08414147176269253, 'fraction_numerical': 0.001426126640045636, 'mean_word_length': 2.4214634146341463, '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': '4440544', 'n_tokens_mistral': 972, 'n_tokens_neox': 967, 'n_words': 281}