<commit_before>package br.com.MDSGPP.ChamadaParlamentar.servlets;

import java.io.IOException;
import java.sql.SQLException;
import java.util.ArrayList;

import javax.servlet.RequestDispatcher;
import javax.servlet.ServletException;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

import br.com.MDSGPP.ChamadaParlamentar.control.SessoesEReunioesControl;
import br.com.MDSGPP.ChamadaParlamentar.dao.SessoesEReunioesDao;
import br.com.MDSGPP.ChamadaParlamentar.model.SessoesEReunioes;

public class SessaoPorNomeServlet extends HttpServlet{

	private static final long serialVersionUID = 1L;

	protected void service (HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
		RequestDispatcher rd = null;
		SessoesEReunioes sessao = new SessoesEReunioes();

		String descricao = request.getParameter("descricao");
		try {
			int pagina = 1;
			int deputadosPorPagina = 20;
			
			if(request.getParameter("pagina") != null) {
				pagina = Integer.parseInt(request.getParameter("pagina"));
			}
			sessao = SessoesEReunioesControl.passarSessao(descricao);
			
			if(sessao.getDeputadosPresentes().size() != 0) {
								
				int numeroDeputados = sessao.getDeputadosPresentes().size();
				int noDePaginas = ((int) Math.ceil(numeroDeputados * 1.0 / deputadosPorPagina))-1;
				
				sessao.setDeputadosPresentes(SessoesEReunioesControl.
						arrumarListaDeputados(pagina-1, deputadosPorPagina, sessao.getDeputadosPresentes()));
				
				
				request.setAttribute("quantosDeputados", numeroDeputados);
				request.setAttribute("noDePaginas", noDePaginas);
				request.setAttribute("paginaAtual", pagina);				
				request.setAttribute("sessao", sessao);
				rd = request.getRequestDispatcher("SessaoPorNome.jsp");
			}
			else {
				rd = request.getRequestDispatcher("SessaoNaoEncontrada.jsp");
			}
		} catch (ClassNotFoundException e) {
			rd = request.getRequestDispatcher("Erro.jsp");
		} catch (SQLException e) {
			rd = request.getRequestDispatcher("Erro.jsp");
		}

		rd.forward(request, response);

	}
}
<commit_msg>Comment the method of class SessaoPorNomeServlet<commit_after>package br.com.MDSGPP.ChamadaParlamentar.servlets;

import java.io.IOException;
import java.sql.SQLException;
import java.util.ArrayList;

import javax.servlet.RequestDispatcher;
import javax.servlet.ServletException;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

import br.com.MDSGPP.ChamadaParlamentar.control.SessoesEReunioesControl;
import br.com.MDSGPP.ChamadaParlamentar.dao.SessoesEReunioesDao;
import br.com.MDSGPP.ChamadaParlamentar.model.SessoesEReunioes;

public class SessaoPorNomeServlet extends HttpServlet{

	private static final long serialVersionUID = 1L;
	
	/**
	 * This method is the only method of the servlet, it's responsible to get
	 * the session asked for the user and send the request to the right jsp
	 * page.
	 */

	protected void service (HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
		RequestDispatcher rd = null;
		SessoesEReunioes sessao = new SessoesEReunioes();

		String descricao = request.getParameter("descricao");
		try {
			int pagina = 1;
			int deputadosPorPagina = 20;
			
			if(request.getParameter("pagina") != null) {
				pagina = Integer.parseInt(request.getParameter("pagina"));
			}
			sessao = SessoesEReunioesControl.passarSessao(descricao);
			
			if(sessao.getDeputadosPresentes().size() != 0) {
								
				int numeroDeputados = sessao.getDeputadosPresentes().size();
				int noDePaginas = ((int) Math.ceil(numeroDeputados * 1.0 / deputadosPorPagina))-1;
				
				sessao.setDeputadosPresentes(SessoesEReunioesControl.
						arrumarListaDeputados(pagina-1, deputadosPorPagina, sessao.getDeputadosPresentes()));
				
				
				request.setAttribute("quantosDeputados", numeroDeputados);
				request.setAttribute("noDePaginas", noDePaginas);
				request.setAttribute("paginaAtual", pagina);				
				request.setAttribute("sessao", sessao);
				rd = request.getRequestDispatcher("SessaoPorNome.jsp");
			}
			else {
				rd = request.getRequestDispatcher("SessaoNaoEncontrada.jsp");
			}
		} catch (ClassNotFoundException e) {
			rd = request.getRequestDispatcher("Erro.jsp");
		} catch (SQLException e) {
			rd = request.getRequestDispatcher("Erro.jsp");
		}

		rd.forward(request, response);

	}
}

{'fraction_non_alphanumeric': 0.10438459826396616, 'fraction_numerical': 0.0040062319163142665, 'mean_word_length': 4.936591809775429, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, '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': '4673514', 'n_tokens_mistral': 1696, 'n_tokens_neox': 1479, 'n_words': 249}