<commit_before>package model;

import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;
import java.util.NoSuchElementException;

public class Test {
	public static void main(String[] args) {
		GenericFrame pessoa = new GenericFrame("Pessoa");
        InstanceFrame diogo = new InstanceFrame("Diogo", pessoa);

        pessoa.set("respira?", true);
        System.out.println("respira? = " + diogo.get("respira?"));

        diogo.ifAdded("idade", o -> System.out.println("Já tem " + o + "? Tem carinha de novinho..."));
        diogo.set("idade", 24);

        System.out.println("idade = " + diogo.get("idade", Integer.class));

        diogo.ifNeeded("estaNaRural?", () -> "Provavelmente não");
        System.out.println("estaNaRural? = " + diogo.get("estaNaRural?"));

        diogo.set("estaNaRural?", true);

        System.out.println("estaNaRural? = " + diogo.get("estaNaRural?"));

        diogo.addConstraint("notaDeCalculoII", new TypeConstraint(Number.class));

        try {
            diogo.set("notaDeCalculoII", "string-qualquer");
        } catch (IllegalArgumentException e) {
            System.out.println(e.getMessage());
        }

        diogo.set("notaDeCalculoII", 5.0f);
        System.out.println("notaDeCalculoII = " + diogo.get("notaDeCalculoII"));

        String[] apelidos = {"dioguinho", "lolito", "zigoto"};
        diogo.addConstraint("apelido", new ContainsConstraint(Arrays.asList(apelidos)));

        diogo.set("apelido", "lolito");

        try {
            diogo.set("apelido", "bonitinho");
        } catch (IllegalArgumentException e) {
            System.out.println(e.getMessage());
        }

        try {
			diogo.get("fotosNoVikings");
		} catch (NoSuchElementException e) {
			System.out.println(e.getMessage());
		}
	}
}
<commit_msg>Adds range constraint use example<commit_after>package model;

import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;
import java.util.NoSuchElementException;

public class Test {
	public static void main(String[] args) {
		GenericFrame pessoa = new GenericFrame("Pessoa");
        InstanceFrame diogo = new InstanceFrame("Diogo", pessoa);

        pessoa.set("respira?", true);
        System.out.println("respira? = " + diogo.get("respira?"));

        diogo.ifAdded("idade", o -> System.out.println("Já tem " + o + "? Tem carinha de novinho..."));
        diogo.set("idade", 24);

        System.out.println("idade = " + diogo.get("idade", Integer.class));

        diogo.ifNeeded("estaNaRural?", () -> "Provavelmente não");
        System.out.println("estaNaRural? = " + diogo.get("estaNaRural?"));

        diogo.set("estaNaRural?", true);

        System.out.println("estaNaRural? = " + diogo.get("estaNaRural?"));

        diogo.addConstraint("notaDeCalculoII", new TypeConstraint(Number.class));
        diogo.addConstraint("notaDeCalculoII", new RangeConstraint(0.0f, 10.0f));

        try {
            diogo.set("notaDeCalculoII", "string-qualquer");
        } catch (IllegalArgumentException e) {
            System.out.println(e.getMessage());
        }

        try {
            diogo.set("notaDeCalculoII", -5.0f);
        } catch (IllegalArgumentException e) {
            System.out.println(e.getMessage());
        }

        diogo.set("notaDeCalculoII", 5.0f);
        System.out.println("notaDeCalculoII = " + diogo.get("notaDeCalculoII"));

        String[] apelidos = {"dioguinho", "lolito", "zigoto"};
        diogo.addConstraint("apelido", new ContainsConstraint(Arrays.asList(apelidos)));

        diogo.set("apelido", "lolito");

        try {
            diogo.set("apelido", "bonitinho");
        } catch (IllegalArgumentException e) {
            System.out.println(e.getMessage());
        }

        try {
			diogo.get("fotosNoVikings");
		} catch (NoSuchElementException e) {
			System.out.println(e.getMessage());
		}
	}
}

{'fraction_non_alphanumeric': 0.16087516087516088, 'fraction_numerical': 0.003861003861003861, 'mean_word_length': 2.9491869918699187, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 7, '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': '5749860', 'n_tokens_mistral': 1315, 'n_tokens_neox': 1253, 'n_words': 197}