<commit_before>package prototype;

import java.io.ByteArrayInputStream;
import java.io.ByteArrayOutputStream;
import java.io.ObjectInputStream;
import java.io.ObjectOutputStream;
import java.util.HashMap;

/**
 *
 * @author douglas
 */
public class Main {
    static HashMap<String, Refeicao>  refeicoes = new HashMap<>();

    public static void main(String[] args) {
        DiretorRefeicao criaRefeicao = new DiretorRefeicao();

        System.out.println("Refeição não vegetariana: ");
        Refeicao refeicao1 = criaRefeicao.preparaNaoVegetariana("laranja", "suco", false);
        refeicoes.put("laranja/suco" , refeicao1 );

        System.out.println("Refeição vegetariana: ");
        Refeicao refeicao2 = criaRefeicao.preparaVegetariana("uva", "refrigerante", true);
        refeicoes.put("guarana/refrigerante" , refeicao2 );

        Refeicao  refeicaoClone1 = (Refeicao) refeicoes.get("laranja/suco").clone();
        Refeicao  refeicaoClone2 = (Refeicao) refeicoes.get("guarana/refrigerante").clone();
        refeicao1.getBebida().setSabor("morango");

        System.out.println("\nClone refeicao 1 " + refeicaoClone1.getBebida().getSabor());
        System.out.println("Refeicao1 " + refeicao1.getBebida().getSabor());

        Refeicao novaRefeicao = (Refeicao) deepClone(refeicao1);
        novaRefeicao.getBebida().setSabor("abacaxi");

        System.out.println("\nNova Refeicao1: " + novaRefeicao.getBebida().getSabor());
        System.out.println("Refeicao1 " + refeicao1.getBebida().getSabor());
    }

    /*
     * This method makes a "deep clone" of any Java object it is given.
     */
    public static Object deepClone(Object object) {
        try {
            ByteArrayOutputStream baos = new ByteArrayOutputStream();
            ObjectOutputStream oos = new ObjectOutputStream(baos);
            oos.writeObject(object);
            ByteArrayInputStream bais = new ByteArrayInputStream(baos.toByteArray());
            ObjectInputStream ois = new ObjectInputStream(bais);
            return ois.readObject();
        } catch (Exception e) {
            e.printStackTrace();
            return null;
        }
    }
}
<commit_msg>Saltando linha nos prints do main.<commit_after>package prototype;

import java.io.ByteArrayInputStream;
import java.io.ByteArrayOutputStream;
import java.io.ObjectInputStream;
import java.io.ObjectOutputStream;
import java.util.HashMap;

/**
 *
 * @author douglas
 */
public class Main {
    static HashMap<String, Refeicao>  refeicoes = new HashMap<>();

    public static void main(String[] args) {
        DiretorRefeicao criaRefeicao = new DiretorRefeicao();

        System.out.println("\nRefeição não vegetariana: ");
        Refeicao refeicao1 = criaRefeicao.preparaNaoVegetariana("laranja", "suco", false);
        refeicoes.put("laranja/suco" , refeicao1 );

        System.out.println("\nRefeição vegetariana: ");
        Refeicao refeicao2 = criaRefeicao.preparaVegetariana("uva", "refrigerante", true);
        refeicoes.put("guarana/refrigerante" , refeicao2 );

        Refeicao  refeicaoClone1 = (Refeicao) refeicoes.get("laranja/suco").clone();
        Refeicao  refeicaoClone2 = (Refeicao) refeicoes.get("guarana/refrigerante").clone();
        refeicao1.getBebida().setSabor("morango");

        System.out.println("\nClone refeicao 1 " + refeicaoClone1.getBebida().getSabor());
        System.out.println("Refeicao1 " + refeicao1.getBebida().getSabor());

        Refeicao novaRefeicao = (Refeicao) deepClone(refeicao1);
        novaRefeicao.getBebida().setSabor("abacaxi");

        System.out.println("\nNova Refeicao1: " + novaRefeicao.getBebida().getSabor());
        System.out.println("Refeicao1 " + refeicao1.getBebida().getSabor());
    }

    /*
     * This method makes a "deep clone" of any Java object it is given.
     */
    public static Object deepClone(Object object) {
        try {
            ByteArrayOutputStream baos = new ByteArrayOutputStream();
            ObjectOutputStream oos = new ObjectOutputStream(baos);
            oos.writeObject(object);
            ByteArrayInputStream bais = new ByteArrayInputStream(baos.toByteArray());
            ObjectInputStream ois = new ObjectInputStream(bais);
            return ois.readObject();
        } catch (Exception e) {
            e.printStackTrace();
            return null;
        }
    }
}

{'fraction_non_alphanumeric': 0.1204957539591462, 'fraction_numerical': 0.006885471654808354, 'mean_word_length': 3.1783317353787153, 'pattern_counts': {'":': 0, '<': 7, '<?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': '1565690', 'n_tokens_mistral': 1461, 'n_tokens_neox': 1433, 'n_words': 245}