<commit_before>package __TOP_LEVEL_PACKAGE__.server;

import java.util.Date;

import org.springframework.context.ApplicationListener;
import org.springframework.context.event.ContextRefreshedEvent;
import org.springframework.stereotype.Component;

import __TOP_LEVEL_PACKAGE__.server.domain.Employee;
import __TOP_LEVEL_PACKAGE__.server.domain.Report;

@Component
public class DataPopulator implements ApplicationListener<ContextRefreshedEvent> {

	@Override
	public void onApplicationEvent(ContextRefreshedEvent event) {
		if (event.getApplicationContext().getParent() == null) {
			Employee abc = new Employee();
			abc.setUserName("abc");
			abc.setDisplayName("<NAME>");
			abc.persist();

			Long id = abc.getId();
			abc.setSupervisorId(id);
			abc.persist();

			Employee def = new Employee();
			def.setUserName("def");
			def.setDisplayName("<NAME>");
			def.setSupervisorId(id);
			def.persist();

			Employee ghi = new Employee();
			ghi.setUserName("ghi");<commit_msg>ROO-760 Google Web Toolkit (GWT) Integration. Modified DataPopulator template for check first for existing employees before populating<commit_after>package __TOP_LEVEL_PACKAGE__.server;

import java.util.Date;

import org.springframework.context.ApplicationListener;
import org.springframework.context.event.ContextRefreshedEvent;
import org.springframework.stereotype.Component;

import __TOP_LEVEL_PACKAGE__.server.domain.Employee;
import __TOP_LEVEL_PACKAGE__.server.domain.Report;

@Component
public class DataPopulator implements ApplicationListener<ContextRefreshedEvent> {

	@Override
	public void onApplicationEvent(ContextRefreshedEvent event) {
		if (event.getApplicationContext().getParent() == null && Employee.findAllEmployees().isEmpty()) {
			Employee abc = new Employee();
			abc.setUserName("abc");
			abc.setDisplayName("<NAME>");
			abc.persist();

			Long id = abc.getId();
			abc.setSupervisorId(id);
			abc.merge();

			Employee def = new Employee();
			def.setUserName("def");
			def.setDisplayName("<NAME>");
			def.setSupervisorId(id);
			def.persist();

			Employee ghi = new Employee();
			ghi.setUserName("ghi");
{'fraction_non_alphanumeric': 0.1179245283018868, 'fraction_numerical': 0.0014150943396226414, 'mean_word_length': 5.733333333333333, 'pattern_counts': {'":': 0, '<': 9, '<?xml version=': 0, '>': 9, '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': '1121670', 'n_tokens_mistral': 702, 'n_tokens_neox': 621, 'n_words': 122}