<commit_before>package com.backend.models;

import org.bson.types.ObjectId;

import com.backend.models.enums.Division;
import com.fasterxml.jackson.annotation.JsonProperty;

public class SchoolFloatSmallest extends School implements ISchoolScore
{
	public final Float 	floatSmallest;
	
	// SchoolFloatSmallest is for situation where a smaller float is better.
	public SchoolFloatSmallest(
			@JsonProperty("_id") 			ObjectId 	_schoolId,
			@JsonProperty("name") 			String 		_name,
			@JsonProperty("floatSmallest") 	Float 		_floatSmallest
			)
	{
		super(_schoolId, _name);
		floatSmallest = _floatSmallest;
	}
	
	public SchoolFloatSmallest(School school, Float _floatSmallest)
	{
		super(school._id, school.name);
		floatSmallest = _floatSmallest;
	}
	
	public double getPercentage(ISchoolScore _best)
	{
		SchoolFloatSmallest best = (SchoolFloatSmallest)_best;
		// Don't divide by 0
		if(best.floatSmallest.intValue() == 0)
			return 0;
			
		return (best.floatSmallest.doubleValue() / floatSmallest.doubleValue());
	}
	
	public String getDisplay()
	{
		if(floatSmallest == Float.MAX_VALUE)
		{
			return "-";
		}
		else
		{
			return floatSmallest.toString();
		}
	}
	
	public String getDisplayLong()
	{
		if(floatSmallest == Float.MAX_VALUE)
		{
			return "-";
		}
		else
		{
			return floatSmallest.toString();
		}
	}
}<commit_msg>Fixed crash in the skills competition.<commit_after>package com.backend.models;

import org.bson.types.ObjectId;

import com.backend.models.enums.Division;
import com.fasterxml.jackson.annotation.JsonProperty;

public class SchoolFloatSmallest extends School implements ISchoolScore
{
	public final Float 	floatSmallest;
	
	// SchoolFloatSmallest is for situation where a smaller float is better.
	public SchoolFloatSmallest(
			@JsonProperty("_id") 			ObjectId 	_schoolId,
			@JsonProperty("name") 			String 		_name,
			@JsonProperty("floatSmallest") 	Float 		_floatSmallest
			)
	{
		super(_schoolId, _name);
		floatSmallest = _floatSmallest;
	}
	
	public SchoolFloatSmallest(School school, Float _floatSmallest)
	{
		super(school._id, school.name);
		floatSmallest = _floatSmallest;
	}
	
	public double getPercentage(ISchoolScore _best)
	{
		SchoolFloatSmallest best = (SchoolFloatSmallest)_best;
		// Don't divide by 0
		if(best.floatSmallest.intValue() == 0)
			return 0;
			
		return (best.floatSmallest.doubleValue() / floatSmallest.doubleValue());
	}
	
	public String getDisplay()
	{
		if(floatSmallest == Float.MAX_VALUE)
		{
			return "-";
		}
		else
		{
			return floatSmallest.toString();
		}
	}
	
	public String getDisplayLong()
	{
		return floatSmallest.toString();
	}
}
{'fraction_non_alphanumeric': 0.10148798168637925, 'fraction_numerical': 0.002289202594429607, 'mean_word_length': 4.131115459882583, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, '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': '4824589', 'n_tokens_mistral': 981, 'n_tokens_neox': 854, 'n_words': 179}