<commit_before>package gr.iti.mklab.simmo.core.cluster;

import org.bson.types.ObjectId;
import org.mongodb.morphia.annotations.Entity;
import org.mongodb.morphia.annotations.Id;
import org.mongodb.morphia.annotations.Reference;

import java.util.ArrayList;
import java.util.Date;
import java.util.List;

/**
 * A Cluster class
 *
 * @author kandreadou
 * @version 1.0.0
 * @since March 26, 2015
 */
@Entity
public class Cluster {

    @Id
    protected String id = new ObjectId().toString();

    @Reference
    protected List<Clusterable> members = new ArrayList<>();

    protected int size;

    protected Date startDate;
    
    protected Date endDate;
    
    public Clusterable getCentroid() {
		return centroid;
	}

	public void setCentroid(Clusterable centroid) {
		this.centroid = centroid;
	}

	protected Clusterable centroid;
    
    public Cluster() {
    }

    public void addMember(Clusterable c) {
        members.add(c);
    }

    public void removeMember(Clusterable c) {
        members.remove(c);
    }

    public int getSize() {
        return size;
    }

    public Date getStartDate() {
		return startDate;
	}

	public void setStartDate(Date startDate) {
		this.startDate = startDate;
	}

	public Date getEndDate() {
		return endDate;
	}

	public void setEndDate(Date endDate) {
		this.endDate = endDate;
	}

	public void setSize(int size) {
        this.size = size;
    }

    public List<Clusterable> getMembers() {
        return members;
    }

    public void setMembers(List<Clusterable> members){
        this.members = members;
    }

    public String getId() {
        return id;
    }
    
    public void setId(String id) {
        this.id = id;
    }
}
<commit_msg>Add set of centroids in cluster<commit_after>package gr.iti.mklab.simmo.core.cluster;

import org.bson.types.ObjectId;
import org.mongodb.morphia.annotations.Entity;
import org.mongodb.morphia.annotations.Id;
import org.mongodb.morphia.annotations.Reference;

import java.util.ArrayList;
import java.util.Date;
import java.util.HashSet;
import java.util.List;
import java.util.Set;

/**
 * A Cluster class
 *
 * @author kandreadou
 * @version 1.0.0
 * @since March 26, 2015
 */
@Entity
public class Cluster {

    @Id
    protected String id = new ObjectId().toString();

    @Reference
    protected List<Clusterable> members = new ArrayList<>();

    protected int size;

    protected Date startDate;
    
    protected Date endDate;
    
	protected Clusterable centroid;
	
    protected Set<String> centroids = new HashSet<String>();
    
    public Set<String> getCentroids() {
		return centroids;
	}

	public void setCentroids(Set<String> centroids) {
		this.centroids = centroids;
	}

	public void addCentroid(String centroid) {
		this.centroids.add(centroid);
	}
	
	public Clusterable getCentroid() {
		return centroid;
	}
    
	public void setCentroid(Clusterable centroid) {
		this.centroid = centroid;
	}
    
    public Cluster() {
    }

    public void addMember(Clusterable c) {
        members.add(c);
    }

    public void removeMember(Clusterable c) {
        members.remove(c);
    }

    public int getSize() {
        return size;
    }

    public Date getStartDate() {
		return startDate;
	}

	public void setStartDate(Date startDate) {
		this.startDate = startDate;
	}

	public Date getEndDate() {
		return endDate;
	}

	public void setEndDate(Date endDate) {
		this.endDate = endDate;
	}

	public void setSize(int size) {
        this.size = size;
    }

    public List<Clusterable> getMembers() {
        return members;
    }

    public void setMembers(List<Clusterable> members){
        this.members = members;
    }

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

{'fraction_non_alphanumeric': 0.10179799048122687, 'fraction_numerical': 0.004759386567953464, 'mean_word_length': 2.8289473684210527, 'pattern_counts': {'":': 0, '<': 15, '<?xml version=': 0, '>': 15, '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': '1369637', 'n_tokens_mistral': 1277, 'n_tokens_neox': 1198, 'n_words': 296}