<commit_before>package com.sonie.web.util;

import java.text.ParseException;
import java.util.Date;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.scheduling.TaskScheduler;
import org.springframework.scheduling.annotation.EnableScheduling;
import org.springframework.scheduling.support.CronTrigger;
import org.springframework.web.client.RestTemplate;

import com.sonie.web.resources.weather.SunStatusResponse;
import com.sonie.web.usecase.TwitterUseCase;

import resources.internal.Configuration;
import resources.internal.General;
import resources.internal.Hue;
import resources.internal.Hue.Scene.Sunstatus;
import resources.internal.HueSetSceneRequest;

@EnableScheduling
public class CronJobUtil {
	private static final Logger LOG = LoggerFactory.getLogger(CronJobUtil.class);

	@Autowired
	private static TwitterUseCase twitterUseCase;

	private CronJobUtil() {

	}

	public static void setDailySunJobs(TaskScheduler scheduler, Configuration config) throws ParseException {
		Sunstatus sunstatus = config.getHue().getScene().getSunstatus();
		General general = config.getGeneral();

		if (sunstatus.isEnabled()) {
			RestTemplate restTemplate = new RestTemplate();
			SunStatusResponse response = restTemplate.getForObject("http://api.sunrise-sunset.org/json?lat="
					+ general.getLatitude() + "&lng=" + general.getLongitude() + "&date=today",
					SunStatusResponse.class);

			String set = DateUtil.convert12UTFTo24WithTimeZone(response.getResults().getSunset(),
					general.getTimeZone());
			String adjustedSunsetTime = DateUtil.addOrRemoveMinutes(set,
					config.getHue().getScene().getSunstatus().getSunsetAdjustedMinutes());
<commit_msg>[HUESRV-1] Clean up<commit_after>package com.sonie.web.util;

import java.text.ParseException;
import java.util.Date;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.scheduling.TaskScheduler;
import org.springframework.scheduling.annotation.EnableScheduling;
import org.springframework.scheduling.support.CronTrigger;
import org.springframework.web.client.RestTemplate;

import com.sonie.web.resources.weather.SunStatusResponse;

import resources.internal.Configuration;
import resources.internal.General;
import resources.internal.Hue;
import resources.internal.Hue.Scene.Sunstatus;
import resources.internal.HueSetSceneRequest;

@EnableScheduling
public class CronJobUtil {
	private static final Logger LOG = LoggerFactory.getLogger(CronJobUtil.class);

	private CronJobUtil() {

	}

	public static void setDailySunJobs(TaskScheduler scheduler, Configuration config) throws ParseException {
		Sunstatus sunstatus = config.getHue().getScene().getSunstatus();
		General general = config.getGeneral();

		if (sunstatus.isEnabled()) {
			RestTemplate restTemplate = new RestTemplate();
			SunStatusResponse response = restTemplate.getForObject("http://api.sunrise-sunset.org/json?lat="
					+ general.getLatitude() + "&lng=" + general.getLongitude() + "&date=today",
					SunStatusResponse.class);

			String set = DateUtil.convert12UTFTo24WithTimeZone(response.getResults().getSunset(),
					general.getTimeZone());
			String adjustedSunsetTime = DateUtil.addOrRemoveMinutes(set,
					config.getHue().getScene().getSunstatus().getSunsetAdjustedMinutes());

{'fraction_non_alphanumeric': 0.10759115361625822, 'fraction_numerical': 0.0038852361028093247, 'mean_word_length': 6.3238512035010945, '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': '5038158', 'n_tokens_mistral': 1047, 'n_tokens_neox': 959, 'n_words': 169}