<commit_before>package org.sanelib.ils.core.domain.entity;

import javax.persistence.*;
import java.sql.Timestamp;
import java.util.Date;

@Entity
@Table(name = "dept")
public class Department implements DomainEntity {

    private static final long serialVersionUID = 1L;

    @EmbeddedId
    private DepartmentId departmentId;

    @Column(name = "dept_name")
    private String deptName;

    @Column(name = "hod_id")
    private String hodId;

    @Column(name = "entry_id")
    private String entryId;

    @Column(name = "entry_date")
    private Date entryDate;

    public DepartmentId getDepartmentId() {
        return departmentId;
    }

    public void setDepartmentId(DepartmentId departmentId) {
        this.departmentId = departmentId;
    }

    public void setDepartmentId(int id, int libraryId){
        if(this.departmentId == null){
            this.departmentId = new DepartmentId(libraryId, id);
        }
        else{
            this.departmentId.setId(id);
            this.departmentId.setLibraryId(libraryId);
        }
    }

    public String getDeptName() {
        return deptName;
    }

    public void setDeptName(String deptName) {
        this.deptName = deptName;
    }

    public String getHodId() { return hodId; }

    public void setHodId(String hodId) { this.hodId = hodId; }

    public String getEntryId() {
        return entryId;
    }

    public void setEntryId(String entryId) {
        this.entryId = entryId;
    }

    @PrePersist
    public void prePersist() {
        entryDate = new Date();
    }

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

        Department dept = (Department) o;

        return departmentId.equals(dept.departmentId);
    }

    @Override
    public int hashCode() {
        return departmentId.hashCode();
    }
}
<commit_msg>Removing Extra setter for Department Id<commit_after>package org.sanelib.ils.core.domain.entity;

import javax.persistence.*;
import java.sql.Timestamp;
import java.util.Date;

@Entity
@Table(name = "dept")
public class Department implements DomainEntity {

    private static final long serialVersionUID = 1L;

    @EmbeddedId
    private DepartmentId departmentId;

    @Column(name = "dept_name")
    private String deptName;

    @Column(name = "hod_id")
    private String hodId;

    @Column(name = "entry_id")
    private String entryId;

    @Column(name = "entry_date")
    private Date entryDate;

    public DepartmentId getDepartmentId() {
        return departmentId;
    }

    public void setDepartmentId(int id, int libraryId){
        if(this.departmentId == null){
            this.departmentId = new DepartmentId(libraryId, id);
        }
        else{
            this.departmentId.setId(id);
            this.departmentId.setLibraryId(libraryId);
        }
    }

    public String getDeptName() {
        return deptName;
    }

    public void setDeptName(String deptName) {
        this.deptName = deptName;
    }

    public String getHodId() { return hodId; }

    public void setHodId(String hodId) { this.hodId = hodId; }

    public String getEntryId() {
        return entryId;
    }

    public void setEntryId(String entryId) {
        this.entryId = entryId;
    }

    public Date getEntryDate() {
        return entryDate;
    }

    @PrePersist
    public void prePersist() {
        entryDate = new Date();
    }

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

        Department dept = (Department) o;

        return departmentId.equals(dept.departmentId);
    }

    @Override
    public int hashCode() {
        return departmentId.hashCode();
    }
}

{'fraction_non_alphanumeric': 0.09837781266352695, 'fraction_numerical': 0.0005232862375719519, 'mean_word_length': 2.5235023041474656, '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': '5452572', 'n_tokens_mistral': 1201, 'n_tokens_neox': 1139, 'n_words': 286}