<commit_before>package br.com.compdevbooks.alphacosmetics.dao.mock.cadastro;

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

import br.com.compdevbooks.alphacosmetics.dao.IClienteDAO;
import br.com.compdevbooks.alphacosmetics.entity.pessoa.ClienteEntity;

public class MockClienteDAO implements IClienteDAO {
	
	private static List<ClienteEntity> clientes = new ArrayList<>();
	/*
	static {
		clientes.add(new ClienteEntity((long)1,"<NAME>","<EMAIL>","6581232323"));
		clientes.add(new ClienteEntity((long)2,"<NAME>","<EMAIL>","6612345678"));
		clientes.add(new ClienteEntity((long)3,"<NAME>","<EMAIL>","8343214321"));
		clientes.add(new ClienteEntity((long)4,"<NAME>","<EMAIL>","1122223333"));
		clientes.add(new ClienteEntity((long)5,"CRISTIANE","<EMAIL>","2167891234"));
	}
	*/
	private static MockClienteDAO singleton = null;
	
	public MockClienteDAO(){	}
	
	public static MockClienteDAO getInstance() {
		if (singleton == null)
			singleton = new MockClienteDAO();
		
		return singleton;
	}
	
	@Override
	public void save(ClienteEntity entity) {
		if (clientes.indexOf(entity)<0)
			clientes.add(entity);
	}

	@Override
	public void delete(ClienteEntity entity) {
		clientes.remove(entity);
	}

	@Override
	public ClienteEntity getById(Long id) {
		for (ClienteEntity vo : clientes)
			if (vo.getId().equals(id))
				return vo;
		return null;
	}

	@Override
	public List<ClienteEntity> getByNome(String nome) {
		ArrayList<ClienteEntity> resultado = new ArrayList<>();
		for (ClienteEntity vo : clientes)
			if (vo.getNome().toUpperCase().contains(nome.toUpperCase()))
				resultado.add(vo);		
		return resultado;
	}

}<commit_msg>Adiionado o filtro por cnpj no cliente e realizou adição de cliente<commit_after>package br.com.compdevbooks.alphacosmetics.dao.mock.cadastro;

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

import br.com.compdevbooks.alphacosmetics.dao.IClienteDAO;
import br.com.compdevbooks.alphacosmetics.entity.pessoa.ClienteEntity;

public class MockClienteDAO implements IClienteDAO {
	
	private static List<ClienteEntity> clientes = new ArrayList<>();
	
	static {
		clientes.add(new ClienteEntity(1L,"<NAME>","<NAME>","11122233344455","000"));
		clientes.add(new ClienteEntity(1L,"<NAME>","<NAME>","12345678901234","1111"));
		clientes.add(new ClienteEntity(1L,"<NAME>","<NAME>","12874698314278","2222"));
		clientes.add(new ClienteEntity(1L,"<NAME>","<NAME>","1122223333","875"));
		clientes.add(new ClienteEntity(1L,"<NAME>","<NAME>","2167891234","9658"));
                
        }
	
	private static MockClienteDAO singleton = null;
	
	public MockClienteDAO(){	}
	
	public static MockClienteDAO getInstance() {
		if (singleton == null)
			singleton = new MockClienteDAO();
		
		return singleton;
	}
	
	@Override
	public void save(ClienteEntity entity) {
		if (clientes.indexOf(entity)<0)
			clientes.add(entity);
	}

	@Override
	public void delete(ClienteEntity entity) {
		clientes.remove(entity);
	}

	@Override
	public ClienteEntity getById(Long id) {
		for (ClienteEntity vo : clientes)
			if (vo.getId().equals(id))
				return vo;
		return null;
	}

	@Override
	public List<ClienteEntity> getByNome(String nome) {
		ArrayList<ClienteEntity> resultado = new ArrayList<>();
		for (ClienteEntity vo : clientes)
			if (vo.getNome().toUpperCase().contains(nome.toUpperCase()))
				resultado.add(vo);		
		return resultado;
	}
        
     
        
        public List<ClienteEntity> getByCNPJ(String CNPJ) {
            ArrayList<ClienteEntity> resultado = new ArrayList<>();
            for (ClienteEntity vo : clientes){
                if (vo.getCNPJ().contains(CNPJ)){
                    resultado.add(vo);
                }
						
            }
			
		return resultado;  
    }

}
{'fraction_non_alphanumeric': 0.14193721491816474, 'fraction_numerical': 0.038100348806010195, 'mean_word_length': 4.364028776978417, 'pattern_counts': {'":': 0, '<': 37, '<?xml version=': 0, '>': 35, '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': '1225337', 'n_tokens_mistral': 1464, 'n_tokens_neox': 1269, 'n_words': 224}