<commit_before>package model;

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

import javafx.beans.property.SimpleStringProperty;
import javafx.beans.property.StringProperty;

import org.eclipse.egit.github.core.Label;

import ui.LabelTreeItem;

public class TurboLabel implements Listable, LabelTreeItem {
	
	public TurboLabel(String name) {
		setName(name);
		setColour("000000");
	}
	
	public TurboLabel(Label label) {
		assert label != null;
		
		String[] tokens = label.getName().split(".");
		
		if (tokens.length > 1) {
			setGroup(tokens[0]);
			setName(tokens[1]);
		} else {
			setName(label.getName());
		}
		setColour(label.getColor());
	}
	
	public Label toGhLabel() {
		Label ghLabel = new Label();
		String groupAppended = getGroup() + "." + getName();
		ghLabel.setName(groupAppended);
		ghLabel.setColor(getColour());
		return ghLabel;
	}
	
	public static List<Label> toGhLabels(List<TurboLabel> turboLabels) {
		List<Label> ghLabels = new ArrayList<Label>();
		
		if (turboLabels == null) return ghLabels;
		
		for (TurboLabel turboLabel : turboLabels) {
			Label label = new Label();
			label.setName(turboLabel.getName());
			ghLabels.add(label);
		}
		return ghLabels;
	}

    private StringProperty name = new SimpleStringProperty();
    public final String getName() {return name.get();}
    public final void setName(String value) {name.set(value);}
    public StringProperty nameProperty() {return name;}
	
    private StringProperty colour = new SimpleStringProperty();
    public final String getColour() {return colour.get();}
    public final void setColour(String value) {colour.set(value);}
    public StringProperty colourProperty() {return colour;}
    
    private StringProperty group = new SimpleStringProperty();
    public final String getGroup() {return group.get();}
    public final void setGroup(String value) {group.set(value);}
    public StringProperty groupProperty() {return group;}

	@Override
	public String getListName() {
		return getName();
	}

	@Override
	public int hashCode() {
		final int prime = 31;
		int result = 1;
		result = prime * result + ((name == null) ? 0 : name.hashCode());
		return result;
	}

	@Override
	public boolean equals(Object obj) {
		if (this == obj)
			return true;
		if (obj == null)
			return false;
		if (getClass() != obj.getClass())
			return false;
		TurboLabel other = (TurboLabel) obj;
		if (name == null) {
			if (other.name != null)
				return false;
		} else if (!getName().equals(other.getName()))
			return false;
		return true;
	}

	@Override
	public String toString() {
		return getGroup() + "/" + getName() + "/" + getColour();
	}
	
	public String getValue() {
		return getName();
	}
	public void setValue(String value) {
		setName(value);
	}

}
<commit_msg>Null label name translated correctly<commit_after>package model;

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

import javafx.beans.property.SimpleStringProperty;
import javafx.beans.property.StringProperty;

import org.eclipse.egit.github.core.Label;

import ui.LabelTreeItem;

public class TurboLabel implements Listable, LabelTreeItem {
	
	public TurboLabel(String name) {
		setName(name);
		setColour("000000");
	}
	
	public TurboLabel(Label label) {
		assert label != null;
		
		String[] tokens = label.getName().split(".");
		
		if (tokens.length > 1) {
			setGroup(tokens[0]);
			setName(tokens[1]);
		} else {
			setName(label.getName());
		}
		setColour(label.getColor());
	}
	
	public Label toGhLabel() {
		Label ghLabel = new Label();
		String groupPrefix = getGroup() == null ? "" : getGroup() + ".";
		String groupAppended = groupPrefix + getName();
		ghLabel.setName(groupAppended);
		ghLabel.setColor(getColour());
		return ghLabel;
	}
	
	public static List<Label> toGhLabels(List<TurboLabel> turboLabels) {
		List<Label> ghLabels = new ArrayList<Label>();
		
		if (turboLabels == null) return ghLabels;
		
		for (TurboLabel turboLabel : turboLabels) {
			Label label = new Label();
			label.setName(turboLabel.getName());
			ghLabels.add(label);
		}
		return ghLabels;
	}

    private StringProperty name = new SimpleStringProperty();
    public final String getName() {return name.get();}
    public final void setName(String value) {name.set(value);}
    public StringProperty nameProperty() {return name;}
	
    private StringProperty colour = new SimpleStringProperty();
    public final String getColour() {return colour.get();}
    public final void setColour(String value) {colour.set(value);}
    public StringProperty colourProperty() {return colour;}
    
    private StringProperty group = new SimpleStringProperty();
    public final String getGroup() {return group.get();}
    public final void setGroup(String value) {group.set(value);}
    public StringProperty groupProperty() {return group;}

	@Override
	public String getListName() {
		return getName();
	}

	@Override
	public int hashCode() {
		final int prime = 31;
		int result = 1;
		result = prime * result + ((name == null) ? 0 : name.hashCode());
		return result;
	}

	@Override
	public boolean equals(Object obj) {
		if (this == obj)
			return true;
		if (obj == null)
			return false;
		if (getClass() != obj.getClass())
			return false;
		TurboLabel other = (TurboLabel) obj;
		if (name == null) {
			if (other.name != null)
				return false;
		} else if (!getName().equals(other.getName()))
			return false;
		return true;
	}

	@Override
	public String toString() {
		return getGroup() + "/" + getName() + "/" + getColour();
	}
	
	public String getValue() {
		return getName();
	}
	public void setValue(String value) {
		setName(value);
	}

}

{'fraction_non_alphanumeric': 0.13064429769766198, 'fraction_numerical': 0.004640371229698376, 'mean_word_length': 3.9902048085485307, 'pattern_counts': {'":': 0, '<': 11, '<?xml version=': 0, '>': 13, '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': '2455996', 'n_tokens_mistral': 1926, 'n_tokens_neox': 1709, 'n_words': 473}