<commit_before>package edu.wustl.catissuecore.domain;

import java.io.Serializable;
import java.util.Date;

import edu.wustl.common.actionForm.AbstractActionForm;
import edu.wustl.common.domain.AbstractDomainObject;
import edu.wustl.common.exception.AssignDataException;

/**
 * Set of attributes which defines updated information related to password of the user.
 * @hibernate.class table="CATISSUE_PASSWORD"
 */
public class Password extends AbstractDomainObject implements Serializable, Comparable
{
	private static final long serialVersionUID = 2084916630660576930L;
	
	/**
	 * System generated unique id.
	 */
	protected Long id;
	
	/**
	 * A string containing the password of the user.
	 */
	protected String password;
	
	/**
     * Last updated date of the password .
     */
	protected Date updateDate;
	
	protected User user = new User();
	
	public Password()
	{
	    
	}
	
	public Password(String password, User user)
	{
	    this.password = password;
	    this.user = user;
	    updateDate = new Date();
	}
	
	/**
     * Returns the id assigned to password.
     * @return Returns the id.
     * @hibernate.id name="id" column="IDENTIFIER" type="long" length="30"
     * unsaved-value="null" generator-class="native"
     * @hibernate.generator-param name="sequence" value="CATISSUE_PASSWORD_SEQ"
     */
	public Long getId() 
	{
		return id;
	}
	
	/**
	 * Sets an id for the password.
	 * @param id Unique id to be assigned to the password.
	 */
	public void setId(Long id) 
	{
	    this.id = id;
    }
	
	/**
	 * Returns the password assigned to user.
	 * @hibernate.property name="password" type="string" column="PASSWORD" length="50"
	 */
	public String getPassword() 
	{
		return password;
	}
	
	/**
	 * Sets password of the user.
	 */
	public void setPassword(String password)
	{
		this.password = password;
	}
	
	/**
	 * Returns the last updated date of password.
	 * @hibernate.property name="updateDate" type="date" column="UPDATE_DATE"
	 */
	public Date getUpdateDate() 
	{
		return updateDate;
	}
	
	/**
	 * Sets last updated date of password.
	 */
	public void setUpdateDate(Date updateDate)
	{
		this.updateDate = updateDate;
	}
	
    /**
     * @return Returns the user.
     * @hibernate.many-to-one column="USER_ID" class="edu.wustl.catissuecore.domain.User"
     * constrained="true"
     */
    public User getUser()
    {
        return user;
    }
    
    /**
     * @param user The user to set.
     */
    public void setUser(User user)
    {
        this.user = user;
    }
    
	public void setAllValues(AbstractActionForm abstractForm) throws AssignDataException 
	{
    }
	
	public int compareTo(Object obj)
	{
	    Password pwd = (Password)obj;
	    return this.updateDate.compareTo(pwd.getUpdateDate());
	}
	
}<commit_msg>modified the compareTo method.<commit_after>package edu.wustl.catissuecore.domain;

import java.io.Serializable;
import java.util.Date;

import edu.wustl.common.actionForm.AbstractActionForm;
import edu.wustl.common.domain.AbstractDomainObject;
import edu.wustl.common.exception.AssignDataException;

/**
 * Set of attributes which defines updated information related to password of the user.
 * @hibernate.class table="CATISSUE_PASSWORD"
 */
public class Password extends AbstractDomainObject implements Serializable, Comparable
{
	private static final long serialVersionUID = 2084916630660576930L;
	
	/**
	 * System generated unique id.
	 */
	protected Long id;
	
	/**
	 * A string containing the password of the user.
	 */
	protected String password;
	
	/**
     * Last updated date of the password .
     */
	protected Date updateDate;
	
	protected User user = new User();
	
	public Password()
	{
	    
	}
	
	public Password(String password, User user)
	{
	    this.password = password;
	    this.user = user;
	    updateDate = new Date();
	}
	
	/**
     * Returns the id assigned to password.
     * @return Returns the id.
     * @hibernate.id name="id" column="IDENTIFIER" type="long" length="30"
     * unsaved-value="null" generator-class="native"
     * @hibernate.generator-param name="sequence" value="CATISSUE_PASSWORD_SEQ"
     */
	public Long getId() 
	{
		return id;
	}
	
	/**
	 * Sets an id for the password.
	 * @param id Unique id to be assigned to the password.
	 */
	public void setId(Long id) 
	{
	    this.id = id;
    }
	
	/**
	 * Returns the password assigned to user.
	 * @hibernate.property name="password" type="string" column="PASSWORD" length="50"
	 */
	public String getPassword() 
	{
		return password;
	}
	
	/**
	 * Sets password of the user.
	 */
	public void setPassword(String password)
	{
		this.password = password;
	}
	
	/**
	 * Returns the last updated date of password.
	 * @hibernate.property name="updateDate" type="date" column="UPDATE_DATE"
	 */
	public Date getUpdateDate() 
	{
		return updateDate;
	}
	
	/**
	 * Sets last updated date of password.
	 */
	public void setUpdateDate(Date updateDate)
	{
		this.updateDate = updateDate;
	}
	
    /**
     * @return Returns the user.
     * @hibernate.many-to-one column="USER_ID" class="edu.wustl.catissuecore.domain.User"
     * constrained="true"
     */
    public User getUser()
    {
        return user;
    }
    
    /**
     * @param user The user to set.
     */
    public void setUser(User user)
    {
        this.user = user;
    }
    
	public void setAllValues(AbstractActionForm abstractForm) throws AssignDataException 
	{
    }
	/**
	 *  This method will compate two date Objects. When Collections.sort() is called, it will return a list 
	 *  of dates in which most recent date will be the first one. 
	 */
	public int compareTo(Object obj)
	{
	    Password pwd = (Password)obj;
	    return pwd.getUpdateDate().compareTo(this.updateDate);
	}
	
}
{'fraction_non_alphanumeric': 0.10434782608695652, 'fraction_numerical': 0.007692307692307693, 'mean_word_length': 2.5306965761511218, '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': '4551346', 'n_tokens_mistral': 1964, 'n_tokens_neox': 1764, 'n_words': 489}