<commit_before>package fr.univrouen.poste.services;

import java.util.HashSet;
import java.util.List;
import java.util.Set;

import org.apache.log4j.Logger;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Propagation;
import org.springframework.transaction.annotation.Transactional;
import org.springframework.util.StopWatch;

import fr.univrouen.poste.domain.GalaxieEntry;
import fr.univrouen.poste.domain.User;
import fr.univrouen.poste.exceptions.EsupDematEcWarnException;

@Service
public class GalaxieEntriesService {
	
	private final Logger logger = Logger.getLogger(getClass());
	
	@Autowired 
	GalaxieEntryService galaxieEntryService;
	
	@Autowired 
    private LogService logService;

    public void generateCandidatsPostes() {
    	
		StopWatch chrono = new StopWatch();
        chrono.start();

		generateCandidats();      
        
    	generatePostes();  
        
    	generateCandidatures();  

        chrono.stop();
		logger.info("La génération des candidats/postes/candidature a été effectuée en " + chrono.getTotalTimeMillis()/1000.0 + " sec.");
    }


    private void generateCandidatures() {
		List<GalaxieEntry> galaxieEntrys;<commit_msg>Debug #9 - generateCandidatsPostes ne doit pas être appelé en parallèle<commit_after>package fr.univrouen.poste.services;

import java.util.HashSet;
import java.util.List;
import java.util.Set;

import org.apache.log4j.Logger;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Propagation;
import org.springframework.transaction.annotation.Transactional;
import org.springframework.util.StopWatch;

import fr.univrouen.poste.domain.GalaxieEntry;
import fr.univrouen.poste.domain.User;
import fr.univrouen.poste.exceptions.EsupDematEcWarnException;

@Service
public class GalaxieEntriesService {
	
	private final Logger logger = Logger.getLogger(getClass());
	
	@Autowired 
	GalaxieEntryService galaxieEntryService;
	
	@Autowired 
    private LogService logService;

    public synchronized void generateCandidatsPostes() {
    	
		StopWatch chrono = new StopWatch();
        chrono.start();

		generateCandidats();      
        
    	generatePostes();  
        
    	generateCandidatures();  

        chrono.stop();
		logger.info("La génération des candidats/postes/candidature a été effectuée en " + chrono.getTotalTimeMillis()/1000.0 + " sec.");
    }


    private void generateCandidatures() {
		List<GalaxieEntry> galaxieEntrys;
{'fraction_non_alphanumeric': 0.09309423884013736, 'fraction_numerical': 0.0049599389545974815, 'mean_word_length': 4.40618556701031, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, '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': '6272966', 'n_tokens_mistral': 823, 'n_tokens_neox': 793, 'n_words': 147}