<commit_before>package edu.ucsb.cs56.w14.lab05.nissayeva;

public class Pickle {
    private String upc; // UPC: numbers under the bar code, e.g. 5410000030
    // note: String because leading zeros may be significant

    private String brand; // pickle brand name, e.g. "Vlasic"
    private String type; // pickle type, e.g. "kosher dill"
    
    /**
       Three-arg constructor
       @param upc  numbers under the bar code, e.g. 5410000030
       @param brand  pickle name brand e.g. "Vlasic"
       @param type  pickle type e.g. "kosher dill"
    */

    public Pickle(String pUpc, String pBrand, String pType) {
	this.upc = pUpc;
	this.brand = pBrand;
	this.type = pType;
    }

    /** 
	Getter for upc
	@return upc, numbers under the bar code, e.g. 5410000030
    */

    public String getUpc () { return this.upc; }

    /** 
	Getter for brand
	@return pickle brand name, e.g "Vlasic"
    */
    public String getBrand () { return this.brand; }

    /** 
	Getter for type
	@return pickle type, e.g "kosher dill"
    */
    public String getType () { return this.type; }

    /**
       convert to String representation in format [upc,brand,type]
       e.g. <code>["5410000030","Vlasic","<NAME>"]</code>

       @return formatted string, [upc,brand,type]
    */

    @Override
    public String toString() {
	return "[" + getUpc() + "," + getBrand() + "," + getType() + "]";
    }


    /** hashcode to be used for hash tables, etc.
	based only on the upc value.
     */

    @Override
    public int hashCode() {
        return (int) Long.parseLong(upc)%2097593;
    }

    /** compare for equality based on upc
	@return true if parameter is a Pickle with same upc, otherwise false
     */

    @Override
    public boolean equals(Object o) {
	if (o == null){
	    return false;
	}

	if (! (o instanceof Pickle)){
	    return false;
	}

	Pickle p = (Pickle) o;
 
	if (this.upc != p.upc){
	    return false;
	}

	return true;
    }

}
<commit_msg>added main to Pickle class<commit_after>package edu.ucsb.cs56.w14.lab05.nissayeva;

public class Pickle {
    private String upc; // UPC: numbers under the bar code, e.g. 5410000030
    // note: String because leading zeros may be significant

    private String brand; // pickle brand name, e.g. "Vlasic"
    private String type; // pickle type, e.g. "kosher dill"
    
    /**
       Three-arg constructor
       @param upc  numbers under the bar code, e.g. 5410000030
       @param brand  pickle name brand e.g. "Vlasic"
       @param type  pickle type e.g. "kosher dill"
    */

    public Pickle(String pUpc, String pBrand, String pType) {
	this.upc = pUpc;
	this.brand = pBrand;
	this.type = pType;
    }

    /** 
	Getter for upc
	@return upc, numbers under the bar code, e.g. 5410000030
    */

    public String getUpc () { return this.upc; }

    /** 
	Getter for brand
	@return pickle brand name, e.g "Vlasic"
    */
    public String getBrand () { return this.brand; }

    /** 
	Getter for type
	@return pickle type, e.g "kosher dill"
    */
    public String getType () { return this.type; }

    /**
       convert to String representation in format [upc,brand,type]
       e.g. <code>["5410000030","Vlasic","<NAME>"]</code>

       @return formatted string, [upc,brand,type]
    */

    @Override
    public String toString() {
	return "[" + getUpc() + "," + getBrand() + "," + getType() + "]";
    }


    /** hashcode to be used for hash tables, etc.
	based only on the upc value.
     */

    @Override
    public int hashCode() {
        return (int) Long.parseLong(upc)%2097593;
    }

    /** compare for equality based on upc
	@return true if parameter is a Pickle with same upc, otherwise false
     */

    @Override
    public boolean equals(Object o) {
	if (o == null){
	    return false;
	}

	if (! (o instanceof Pickle)){
	    return false;
	}

	Pickle p = (Pickle) o;
 
	if (this.upc != p.upc){
	    return false;
	}

	return true;
    }
    
    public static void main (String[] args) {
	Pickle p = new Pickle("5410000030","Vlasic","<NAME>");
	System.out.println("p=" + p.toString());
    }
}

{'fraction_non_alphanumeric': 0.1278471711976488, 'fraction_numerical': 0.028410482488366397, 'mean_word_length': 2.4147157190635453, 'pattern_counts': {'":': 0, '<': 10, '<?xml version=': 0, '>': 10, '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': '5038134', 'n_tokens_mistral': 1531, 'n_tokens_neox': 1388, 'n_words': 436}