<commit_before>package com.frascu.bot.newsbot.schedule;

import java.util.ArrayList;
import java.util.List;
import java.util.Timer;
import java.util.TimerTask;

import org.apache.log4j.Logger;
import org.telegram.telegrambots.ApiContextInitializer;
import org.telegram.telegrambots.TelegramBotsApi;
import org.telegram.telegrambots.exceptions.TelegramApiException;

import com.frascu.bot.newsbot.dao.DaoBase;
import com.frascu.bot.newsbot.dao.NewsDao;
import com.frascu.bot.newsbot.dto.NewsDto;
import com.frascu.bot.newsbot.rss.FeedMessage;
import com.frascu.bot.newsbot.rss.RSSFeedParser;
import com.frascu.bot.newsbot.telegram.BotConfig;
import com.frascu.bot.newsbot.telegram.handler.CommandsHandler;
import com.frascu.bot.newsbot.telegram.handler.NewsHandler;
import com.frascu.bot.newsbot.util.NewsUtil;

/**
 * This class contains the task that checks the news and sends them to the
 * users.
 * 
 * @author franc
 *
 */
public class ScheduledTask extends TimerTask {

	private static final Logger LOGGER = Logger.getLogger(ScheduledTask.class);

	private static final int INTERVAL_SECONDS = 60;

	private NewsDao newsDao = new NewsDao();

	// Add your task here
	public void run() {
		try {
			List<NewsDto> newsDtos = readAndSaveFeed();

			List<NewsDto> newsToSend = new ArrayList<>();
			List<NewsDto> newsSimilar = new ArrayList<>();
			NewsUtil.findSimilarNews(newsToSend, newsSimilar, newsDtos);

			// Send news to users and to admin
			NewsHandler newsHandler = new NewsHandler();
			newsHandler.sendNewsToAllUsers(newsToSend);
			newsDao.setNewsAsSent(newsToSend);
			newsHandler.sendNewsToAdmin(newsSimilar);

		} catch (Exception e) {
			LOGGER.error(e);
		}
	}
<commit_msg>remove the check for a news already sent<commit_after>package com.frascu.bot.newsbot.schedule;

import java.util.List;
import java.util.Timer;
import java.util.TimerTask;

import org.apache.log4j.Logger;
import org.telegram.telegrambots.ApiContextInitializer;
import org.telegram.telegrambots.TelegramBotsApi;
import org.telegram.telegrambots.exceptions.TelegramApiException;

import com.frascu.bot.newsbot.dao.DaoBase;
import com.frascu.bot.newsbot.dao.NewsDao;
import com.frascu.bot.newsbot.dto.NewsDto;
import com.frascu.bot.newsbot.rss.FeedMessage;
import com.frascu.bot.newsbot.rss.RSSFeedParser;
import com.frascu.bot.newsbot.telegram.BotConfig;
import com.frascu.bot.newsbot.telegram.handler.CommandsHandler;
import com.frascu.bot.newsbot.telegram.handler.NewsHandler;

/**
 * This class contains the task that checks the news and sends them to the
 * users.
 * 
 * @author franc
 *
 */
public class ScheduledTask extends TimerTask {

	private static final Logger LOGGER = Logger.getLogger(ScheduledTask.class);

	private static final int INTERVAL_SECONDS = 60;

	private NewsDao newsDao = new NewsDao();

	// Add your task here
	public void run() {
		try {
			List<NewsDto> newsDtos = readAndSaveFeed();
			new NewsHandler().sendNewsToAllUsers(newsDtos);
		} catch (Exception e) {
			LOGGER.error(e);
		}
	}

{'fraction_non_alphanumeric': 0.10535061482220007, 'fraction_numerical': 0.0019940179461615153, 'mean_word_length': 4.913555992141454, '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': '7487194', 'n_tokens_mistral': 1078, 'n_tokens_neox': 1032, 'n_words': 210}