<commit_before>package al.jdi.dao.beans;

import javax.inject.Inject;

import org.hibernate.Query;
import org.hibernate.Session;
import org.hibernate.Transaction;
import org.joda.time.DateTime;

import al.jdi.dao.model.Campanha;
import al.jdi.dao.model.DefinicaoPadrao;
import al.jdi.dao.model.EstadoCliente;
import al.jdi.dao.model.Filtro;
import al.jdi.dao.model.Grupo;
import al.jdi.dao.model.HistoricoCliente;
import al.jdi.dao.model.InformacaoCliente;
import al.jdi.dao.model.Log;
import al.jdi.dao.model.MotivoFinalizacao;
import al.jdi.dao.model.RestricaoHorario;
import al.jdi.dao.model.Rota;
import al.jdi.dao.model.WebLog;

class DefaultDaoFactory implements DaoFactory {

  private final SessionHandler sessionHandler;
  private Session session;
  private Transaction transaction;

  @Inject
  public DefaultDaoFactory(SessionHandler sessionHandler) {
    this.sessionHandler = sessionHandler;
    session = sessionHandler.getSession();
  }

  @Override
  public void beginTransaction() {
    transaction = session.beginTransaction();
  }

  @Override
  public void close() {
    session.close();
  }

  @Override
  public void commit() {
    transaction.commit();
    transaction = null;
  }

  @Override
  public AgendamentoDao getAgendamentoDao() {
    return new DefaultAgendamentoDao(session);
  }

  @Override<commit_msg>Removed Inject annotation<commit_after>package al.jdi.dao.beans;

import org.hibernate.Query;
import org.hibernate.Session;
import org.hibernate.Transaction;
import org.joda.time.DateTime;

import al.jdi.dao.model.Campanha;
import al.jdi.dao.model.DefinicaoPadrao;
import al.jdi.dao.model.EstadoCliente;
import al.jdi.dao.model.Filtro;
import al.jdi.dao.model.Grupo;
import al.jdi.dao.model.HistoricoCliente;
import al.jdi.dao.model.InformacaoCliente;
import al.jdi.dao.model.Log;
import al.jdi.dao.model.MotivoFinalizacao;
import al.jdi.dao.model.RestricaoHorario;
import al.jdi.dao.model.Rota;
import al.jdi.dao.model.WebLog;

class DefaultDaoFactory implements DaoFactory {

  private final SessionHandler sessionHandler;
  private Session session;
  private Transaction transaction;

  public DefaultDaoFactory(SessionHandler sessionHandler) {
    this.sessionHandler = sessionHandler;
    session = sessionHandler.getSession();
  }

  @Override
  public void beginTransaction() {
    transaction = session.beginTransaction();
  }

  @Override
  public void close() {
    session.close();
  }

  @Override
  public void commit() {
    transaction.commit();
    transaction = null;
  }

  @Override
  public AgendamentoDao getAgendamentoDao() {
    return new DefaultAgendamentoDao(session);
  }

  @Override
{'fraction_non_alphanumeric': 0.10343525858814646, 'fraction_numerical': 0.0, 'mean_word_length': 4.532359081419624, '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': '6271374', 'n_tokens_mistral': 891, 'n_tokens_neox': 893, 'n_words': 166}