<commit_before>package io.branch.referral.util;

import org.json.JSONException;
import org.json.JSONObject;

import java.math.BigDecimal;

/**
 * Created by <NAME> on 12/21/16.
 */

public class Product {
    private static final int DECIMAL_PLACES = 2;
    public String sku;
    public String name;
    public BigDecimal price;
    public int quantity;
    public String brand;
    public String category;
    public String variant;
    public ProductCategory productCategory;

    public Product() {
        this.sku = "";
        this.name = "";
        this.price = new BigDecimal(0).setScale(DECIMAL_PLACES, BigDecimal.ROUND_HALF_UP);
        this.quantity = 0;
        this.brand = "";
        this.category = "";
        this.variant = "";
        this.productCategory = null;
    }

    public Product(String sku, String name, BigDecimal price, int quantity, String brand, String category, String variant, ProductCategory productCategory) {
        this.sku = sku;
        this.name = name;
        this.price = price.setScale(DECIMAL_PLACES, BigDecimal.ROUND_HALF_UP);
        this.quantity = quantity;
        this.brand = brand;
        this.category = category;
        this.variant = variant;
        this.productCategory = productCategory;
    }

    public JSONObject getProductJSONObject() {
        JSONObject jsonObject = new JSONObject();
        try {
            jsonObject.put("sku", this.sku);
            jsonObject.put("name", this.name);
            jsonObject.put("price", this.price);
            jsonObject.put("quantity", this.quantity);
            jsonObject.put("brand", this.brand);
            jsonObject.put("category", this.category);
            jsonObject.put("variant", this.variant);
            jsonObject.put("productCategory", this.productCategory);
        } catch (JSONException e) {

        }
        return jsonObject;
    }
}
<commit_msg>replacing BigDecimal w. Double<commit_after>package io.branch.referral.util;

import org.json.JSONException;
import org.json.JSONObject;

/**
 * Created by <NAME> on 12/21/16.
 */

public class Product {
    public String sku;
    public String name;
    public Double price;
    public int quantity;
    public String brand;
    public String category;
    public String variant;
    public ProductCategory productCategory;

    public Product() {
        this.sku = "";
        this.name = "";
        this.price = 0.0;
        this.quantity = 0;
        this.brand = "";
        this.category = "";
        this.variant = "";
        this.productCategory = null;
    }

    public Product(String sku, String name, Double price, int quantity, String brand, String category, String variant, ProductCategory productCategory) {
        this.sku = sku;
        this.name = name;
        this.price = price;
        this.quantity = quantity;
        this.brand = brand;
        this.category = category;
        this.variant = variant;
        this.productCategory = productCategory;
    }

    public JSONObject getProductJSONObject() {
        JSONObject jsonObject = new JSONObject();
        try {
            jsonObject.put("sku", this.sku);
            jsonObject.put("name", this.name);
            jsonObject.put("price", this.price);
            jsonObject.put("quantity", this.quantity);
            jsonObject.put("brand", this.brand);
            jsonObject.put("category", this.category);
            jsonObject.put("variant", this.variant);
            jsonObject.put("productCategory", this.productCategory);
        } catch (JSONException e) {

        }
        return jsonObject;
    }
}

{'fraction_non_alphanumeric': 0.10885300668151447, 'fraction_numerical': 0.005011135857461025, 'mean_word_length': 2.342325581395349, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, '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': '4147544', 'n_tokens_mistral': 1007, 'n_tokens_neox': 976, 'n_words': 240}