<commit_before>package org.project.openbaton.catalogue.mano.common;

import javax.persistence.Entity;
import javax.persistence.Id;
import javax.persistence.Version;

/**
 * Created by lto on 23/09/15.
 */
@Entity
public class Ip {
    @Id
    private String id;
    @Version
    private int version = 0;

    private String netName;
    private String ip;

    @Override
    public String toString() {
        return "Ip{" +
                "id='" + id + '\'' +
                ", version=" + version +
                ", netName='" + netName + '\'' +
                ", ip='" + ip + '\'' +
                '}';
    }

    public String getId() {
        return id;
    }

    public void setId(String id) {
        this.id = id;
    }

    public String getIp() {
        return ip;
    }

    public void setIp(String ip) {
        this.ip = ip;
    }

    public String getNetName() {
        return netName;
    }

    public void setNetName(String netName) {
        this.netName = netName;
    }

    public int getVersion() {
        return version;
    }

    public void setVersion(int version) {
        this.version = version;
    }
}<commit_msg>added ensureip<commit_after>package org.project.openbaton.catalogue.mano.common;

import org.project.openbaton.catalogue.util.IdGenerator;

import javax.persistence.Entity;
import javax.persistence.Id;
import javax.persistence.PrePersist;
import javax.persistence.Version;

/**
 * Created by lto on 23/09/15.
 */
@Entity
public class Ip {
    @Id
    private String id;
    @Version
    private int version = 0;

    private String netName;
    private String ip;

    @Override
    public String toString() {
        return "Ip{" +
                "id='" + id + '\'' +
                ", version=" + version +
                ", netName='" + netName + '\'' +
                ", ip='" + ip + '\'' +
                '}';
    }

    public String getId() {
        return id;
    }

    public void setId(String id) {
        this.id = id;
    }

    public String getIp() {
        return ip;
    }

    public void setIp(String ip) {
        this.ip = ip;
    }

    public String getNetName() {
        return netName;
    }

    public void setNetName(String netName) {
        this.netName = netName;
    }

    public int getVersion() {
        return version;
    }

    public void setVersion(int version) {
        this.version = version;
    }

    @PrePersist
    public void ensureId() {
        id = IdGenerator.createUUID();
    }
}
{'fraction_non_alphanumeric': 0.11875249900039984, 'fraction_numerical': 0.005597760895641743, 'mean_word_length': 1.7955307262569833, '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': '5330059', 'n_tokens_mistral': 788, 'n_tokens_neox': 759, 'n_words': 191}