<commit_before>/*
 * Copyright 2017 <NAME>
 *
 * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this
 * file except in compliance with the License. You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software distributed under
 * the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
 * KIND, either express or implied. See the License for the specific language governing
 * permissions and limitations under the License.
 */

package com.github.dannil.scbjavaclient.model.financialmarkets.securities;

import java.util.LinkedHashMap;
import java.util.List;
import java.util.Map;
import java.util.Objects;

import com.fasterxml.jackson.annotation.JsonProperty;
import com.github.dannil.scbjavaclient.model.AbstractTimeAndValueModel;
import com.github.dannil.scbjavaclient.model.ValueNode;

/**
 * <p>Abstract model for security data. Holds data which are common for all classes
 * located in this package.</p>
 *
 * @param <V>
 *            the value
 * @since 0.2.0
 */
public abstract class AbstractSecurity<V> extends AbstractTimeAndValueModel<String, V> {

    @JsonProperty("Sektor")
    private Integer sector;

    @JsonProperty("Valuta")
    private String currency;

    /**
     * <p>Default constructor.</p>
     */
    public AbstractSecurity() {
        super();
    }

    /**
     * <p>Overloaded constructor.</p>
     *
     * @param sector
     *            the sector
     * @param currency
     *            the currency
     * @param month
     *            the month
     * @param values
     *            the values
     */
    public AbstractSecurity(Integer sector, String currency, String month, List<ValueNode<V>> values) {
        super(month, values);
        this.sector = sector;
        this.currency = currency;
    }

    /**
     * <p>Getter for sector.</p>
     *
     * @return the sector
     */
    public Integer getSector() {
        return this.sector;
    }

    /**
     * <p>Setter for sector.</p>
     *
     * @param sector
     *            the sector
     */
    public void setSector(Integer sector) {
        this.sector = sector;
    }

    /**
     * <p>Getter for currency.</p>
     *
     * @return the currency
     */
    public String getCurrency() {
        return this.currency;
    }

    /**
     * <p>Setter for currency.</p>
     *
     * @param currency
     *            the currency
     */
    public void setCurrency(String currency) {
        this.currency = currency;
    }

    @Override
    public int hashCode() {
        return Objects.hash(super.hashCode(), this.sector, this.currency);
    }

    @Override
    public boolean equals(Object obj) {
        if (this == obj) {
            return true;
        }
        if (obj == null) {
            return false;
        }
        if (!(obj instanceof AbstractSecurity)) {
            return false;
        }

        AbstractSecurity<?> other = (AbstractSecurity<?>) obj;
        return super.equals(obj) && Objects.equals(this.sector, other.sector)
                && Objects.equals(this.currency, other.currency);
    }

    @Override
    public String toString() {
        Map<String, Object> variables = new LinkedHashMap<>();
        variables.put("sector", this.sector);
        variables.put("currency", this.currency);
        return super.buildToString(variables);
    }

}
<commit_msg>Fixed test failures<commit_after>/*
 * Copyright 2017 <NAME>
 *
 * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this
 * file except in compliance with the License. You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software distributed under
 * the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
 * KIND, either express or implied. See the License for the specific language governing
 * permissions and limitations under the License.
 */

package com.github.dannil.scbjavaclient.model.financialmarkets.securities;

import java.util.List;
import java.util.Map;
import java.util.Objects;

import com.fasterxml.jackson.annotation.JsonProperty;
import com.github.dannil.scbjavaclient.model.AbstractTimeAndValueModel;
import com.github.dannil.scbjavaclient.model.ValueNode;

/**
 * <p>Abstract model for security data. Holds data which are common for all classes
 * located in this package.</p>
 *
 * @param <V>
 *            the value
 * @since 0.2.0
 */
public abstract class AbstractSecurity<V> extends AbstractTimeAndValueModel<String, V> {

    @JsonProperty("Sektor")
    private Integer sector;

    @JsonProperty("Valuta")
    private String currency;

    /**
     * <p>Default constructor.</p>
     */
    public AbstractSecurity() {
        super();
    }

    /**
     * <p>Overloaded constructor.</p>
     *
     * @param sector
     *            the sector
     * @param currency
     *            the currency
     * @param month
     *            the month
     * @param values
     *            the values
     */
    public AbstractSecurity(Integer sector, String currency, String month, List<ValueNode<V>> values) {
        super(month, values);
        this.sector = sector;
        this.currency = currency;
    }

    /**
     * <p>Getter for sector.</p>
     *
     * @return the sector
     */
    public Integer getSector() {
        return this.sector;
    }

    /**
     * <p>Setter for sector.</p>
     *
     * @param sector
     *            the sector
     */
    public void setSector(Integer sector) {
        this.sector = sector;
    }

    /**
     * <p>Getter for currency.</p>
     *
     * @return the currency
     */
    public String getCurrency() {
        return this.currency;
    }

    /**
     * <p>Setter for currency.</p>
     *
     * @param currency
     *            the currency
     */
    public void setCurrency(String currency) {
        this.currency = currency;
    }

    @Override
    public int hashCode() {
        return Objects.hash(super.hashCode(), this.sector, this.currency);
    }

    @Override
    public boolean equals(Object obj) {
        if (this == obj) {
            return true;
        }
        if (obj == null) {
            return false;
        }
        if (!(obj instanceof AbstractSecurity)) {
            return false;
        }

        AbstractSecurity<?> other = (AbstractSecurity<?>) obj;
        return super.equals(obj) && Objects.equals(this.sector, other.sector)
                && Objects.equals(this.currency, other.currency);
    }

    @Override
    public String buildToString(Map<String, Object> variables) {
        variables.put("sector", this.sector);
        variables.put("currency", this.currency);
        return super.buildToString(variables);
    }

}

{'fraction_non_alphanumeric': 0.10931407942238267, 'fraction_numerical': 0.003176895306859206, 'mean_word_length': 2.237961664329126, 'pattern_counts': {'":': 0, '<': 50, '<?xml version=': 0, '>': 50, 'https://': 0, 'lorem ipsum': 0, 'www.': 2, 'xml': 2}, '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': '4945803', 'n_tokens_mistral': 1961, 'n_tokens_neox': 1899, 'n_words': 549}