<commit_before>package co.smartreceipts.android.model;

import java.math.BigDecimal;
import java.sql.Date;
import java.util.TimeZone;

import android.os.Parcel;
import android.os.Parcelable;

public class Distance implements Parcelable {

	private String mLocation;
	private BigDecimal mDistance;
	private Date mDate;
	private String mTimezone;
	private BigDecimal mRate;
	private String mComment;

	public Distance() {
	}

	protected Distance(Parcel in) {
		mLocation = in.readString();
		mDistance = (BigDecimal) in.readValue(BigDecimal.class.getClassLoader());
		long tmpDate = in.readLong();
		mDate = tmpDate != -1 ? new Date(tmpDate) : null;
		mTimezone = in.readString();
		mRate = (BigDecimal) in.readValue(BigDecimal.class.getClassLoader());
		mComment = in.readString();
	}

	@Override
	public int describeContents() {
		return 0;
	}

	@Override
	public void writeToParcel(Parcel dest, int flags) {
		dest.writeString(mLocation);
		dest.writeValue(mDistance);
		dest.writeLong(mDate != null ? mDate.getTime() : -1L);
		dest.writeString(mTimezone);
		dest.writeValue(mRate);
		dest.writeString(mComment);
	}

	public String getLocation() {
		return mLocation;
	}

	public void setLocation(String location) {
		mLocation = location;
	}

	public BigDecimal getDistance() {
		return mDistance;
	}

	public void setDistance(BigDecimal distance) {
		mDistance = distance;
	}

	public Date getDate() {
		return mDate;
	}

	public void setDate(Date date) {
		mDate = date;
	}

	public String getTimezone() {
		return mTimezone;
	}

	public void setTimezone(String timezone) {
		mTimezone = timezone;
	}

	public BigDecimal getRate() {
		return mRate;
	}

	public void setRate(BigDecimal rate) {
		mRate = rate;
	}

	public String getComment() {
		return mComment;
	}

	public void setComment(String comment) {
		mComment = comment;
	}

	public static final class Builder {
		private String _location;
		private BigDecimal _distance;
		private Date _date;
		private String _timezone;
		private BigDecimal _rate;
		private String _comment;

		public Builder setLocation(String location) {
			_location = location;
			return this;
		}

		public Builder setDistance(BigDecimal distance) {
			_distance = distance;
			return this;
		}

		public Builder setDate(Date date) {
			_date = date;
			return this;
		}

		public Builder setTimezone(String timezone) {
			_timezone = timezone;
			return this;
		}

		public Builder setTimezone(TimeZone timezone) {
			_timezone = timezone.getID();
			return this;
		}

		public Builder setRate(BigDecimal rate) {
			_rate = rate;
			return this;
		}

		public Builder setComment(String comment) {
			_comment = comment;
			return this;
		}

		public Distance build() {
			Distance distance = new Distance();
			distance.setLocation(_location);
			distance.setDistance(_distance);
			distance.setDate(_date);
			distance.setTimezone(_timezone);
			distance.setRate(_rate);
			distance.setComment(_comment);
			return distance;
		}

	}

	public static final Parcelable.Creator<Distance> CREATOR = new Parcelable.Creator<Distance>() {
		@Override
		public Distance createFromParcel(Parcel in) {
			return new Distance(in);
		}

		@Override
		public Distance[] newArray(int size) {
			return new Distance[size];
		}
	};
}<commit_msg>Implemented hashCode and equals on Distance class<commit_after>package co.smartreceipts.android.model;

import java.math.BigDecimal;
import java.sql.Date;
import java.util.TimeZone;

import android.os.Parcel;
import android.os.Parcelable;

public class Distance implements Parcelable {

	private String mLocation;
	private BigDecimal mDistance;
	private Date mDate;
	private String mTimezone;
	private BigDecimal mRate;
	private String mComment;

	public Distance() {
	}

	protected Distance(Parcel in) {
		mLocation = in.readString();
		mDistance = (BigDecimal) in.readValue(BigDecimal.class.getClassLoader());
		long tmpDate = in.readLong();
		mDate = tmpDate != -1 ? new Date(tmpDate) : null;
		mTimezone = in.readString();
		mRate = (BigDecimal) in.readValue(BigDecimal.class.getClassLoader());
		mComment = in.readString();
	}

	@Override
	public int describeContents() {
		return 0;
	}

	@Override
	public void writeToParcel(Parcel dest, int flags) {
		dest.writeString(mLocation);
		dest.writeValue(mDistance);
		dest.writeLong(mDate != null ? mDate.getTime() : -1L);
		dest.writeString(mTimezone);
		dest.writeValue(mRate);
		dest.writeString(mComment);
	}

	public String getLocation() {
		return mLocation;
	}

	public void setLocation(String location) {
		mLocation = location;
	}

	public BigDecimal getDistance() {
		return mDistance;
	}

	public void setDistance(BigDecimal distance) {
		mDistance = distance;
	}

	public Date getDate() {
		return mDate;
	}

	public void setDate(Date date) {
		mDate = date;
	}

	public String getTimezone() {
		return mTimezone;
	}

	public void setTimezone(String timezone) {
		mTimezone = timezone;
	}

	public BigDecimal getRate() {
		return mRate;
	}

	public void setRate(BigDecimal rate) {
		mRate = rate;
	}

	public String getComment() {
		return mComment;
	}

	public void setComment(String comment) {
		mComment = comment;
	}

	public static final class Builder {
		private String _location;
		private BigDecimal _distance;
		private Date _date;
		private String _timezone;
		private BigDecimal _rate;
		private String _comment;

		public Builder setLocation(String location) {
			_location = location;
			return this;
		}

		public Builder setDistance(BigDecimal distance) {
			_distance = distance;
			return this;
		}

		public Builder setDate(Date date) {
			_date = date;
			return this;
		}

		public Builder setTimezone(String timezone) {
			_timezone = timezone;
			return this;
		}

		public Builder setTimezone(TimeZone timezone) {
			_timezone = timezone.getID();
			return this;
		}

		public Builder setRate(BigDecimal rate) {
			_rate = rate;
			return this;
		}

		public Builder setComment(String comment) {
			_comment = comment;
			return this;
		}

		public Distance build() {
			Distance distance = new Distance();
			distance.setLocation(_location);
			distance.setDistance(_distance);
			distance.setDate(_date);
			distance.setTimezone(_timezone);
			distance.setRate(_rate);
			distance.setComment(_comment);
			return distance;
		}

	}

	public static final Parcelable.Creator<Distance> CREATOR = new Parcelable.Creator<Distance>() {
		@Override
		public Distance createFromParcel(Parcel in) {
			return new Distance(in);
		}

		@Override
		public Distance[] newArray(int size) {
			return new Distance[size];
		}
	};

	@Override
	public String toString() {
		return "Distance ["
				+ "mLocation=" + mLocation
				+ ", mDistance=" + mDistance
				+ ", mDate=" + mDate
				+ ", mTimezone=" + mTimezone
				+ ", mRate=" + mRate
				+ ", mComment=" + mComment
				+ "]";
	}

	@Override
	public int hashCode() {
		final int prime = 31;
		int result = 1;
		result = prime * result + ((mComment == null) ? 0 : mComment.hashCode());
		result = prime * result + ((mDate == null) ? 0 : mDate.hashCode());
		result = prime * result + ((mDistance == null) ? 0 : mDistance.hashCode());
		result = prime * result + ((mLocation == null) ? 0 : mLocation.hashCode());
		result = prime * result + ((mRate == null) ? 0 : mRate.hashCode());
		result = prime * result + ((mTimezone == null) ? 0 : mTimezone.hashCode());
		return result;
	}

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

		Distance other = (Distance) obj;

		if (mComment == null) {
			if (other.mComment != null)
				return false;
		} else if (!mComment.equals(other.mComment))
			return false;

		if (mDate == null) {
			if (other.mDate != null)
				return false;
		} else if (!mDate.equals(other.mDate))
			return false;

		if (mDistance == null) {
			if (other.mDistance != null)
				return false;
		} else if (!mDistance.equals(other.mDistance))
			return false;

		if (mLocation == null) {
			if (other.mLocation != null)
				return false;
		} else if (!mLocation.equals(other.mLocation))
			return false;

		if (mRate == null) {
			if (other.mRate != null)
				return false;
		} else if (!mRate.equals(other.mRate))
			return false;

		if (mTimezone == null) {
			if (other.mTimezone != null)
				return false;
		} else if (!mTimezone.equals(other.mTimezone))
			return false;

		return true;
	}
}
{'fraction_non_alphanumeric': 0.11175702930359473, 'fraction_numerical': 0.001779570530312018, 'mean_word_length': 3.768099547511312, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 7, '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': '1464313', 'n_tokens_mistral': 3087, 'n_tokens_neox': 2689, 'n_words': 715}