<commit_before>package com.lue.server;

import java.util.ArrayList;
import java.util.Iterator;
import java.util.List;

import javax.xml.bind.annotation.XmlElement;
import javax.xml.bind.annotation.XmlRootElement;

import com.lue.client.tests.SleepTestParameters;
import com.lue.common.Schedule;
import com.lue.common.Schedule.ScheduleElement;

@XmlRootElement
public class ScheduleStorage implements Iterable<Schedule>{
	@XmlElement
	protected List<Schedule> schedules;

	public ScheduleStorage() {
		schedules = new ArrayList<Schedule>();	
	}

	public static Schedule generateDebugSchedule() {
		Schedule schedule= new Schedule();	
		SleepTestParameters testParameters = new SleepTestParameters(2000);
		ScheduleElement sleepTest = new ScheduleElement("com.lue.client.tests.SleepTest", testParameters, null);	
		schedule.addScheduleElement(sleepTest);
		return schedule;
	}

	public static ScheduleStorage generateDebugScheduleStorage(int clientCount) {
		ScheduleStorage cSchedule = new ScheduleStorage();
		for(int i = 0; i < clientCount; i++){
			cSchedule.addEmptySchedule();
			cSchedule.putSchedule(i, generateDebugSchedule());
		}
		return cSchedule;
	}

	private void addEmptySchedule() {
		schedules.add(new Schedule());
	}


	public List<Schedule> getSchedules() {
		return schedules;
	}

	public Schedule getSchedule(int scheduleRunnerId) {
		if (schedules.size() > scheduleRunnerId)
			return schedules.get(scheduleRunnerId);
		return null;
	}

	public boolean putSchedule(int scheduleRunnerId, Schedule schedule) {
		if(schedules.size()<= scheduleRunnerId)
			return false;
		schedules.set(scheduleRunnerId, schedule);
		return true;
	}

	public Iterator<Schedule> iterator() {
		return new ScheduleIterator();
	}

	private class ScheduleIterator implements Iterator<Schedule> {
		int cursor;

		public ScheduleIterator() {
			cursor = 0;
		}

		@Override
		public boolean hasNext() {
			return cursor < schedules.size();
		}

		@Override
		public Schedule next() {
			return schedules.get(cursor++);
		}

		@Override
		public void remove() {
			throw new UnsupportedOperationException();
		}
	}
}
<commit_msg>Deleted method getSchedules from ScheduleStorage since it is not needed anymore. <commit_after>package com.lue.server;

import java.util.ArrayList;
import java.util.Iterator;
import java.util.List;

import javax.xml.bind.annotation.XmlElement;
import javax.xml.bind.annotation.XmlRootElement;

import com.lue.client.tests.SleepTestParameters;
import com.lue.common.Schedule;
import com.lue.common.Schedule.ScheduleElement;

@XmlRootElement
public class ScheduleStorage implements Iterable<Schedule>{
	@XmlElement
	protected List<Schedule> schedules;

	public ScheduleStorage() {
		schedules = new ArrayList<Schedule>();	
	}

	public static Schedule generateDebugSchedule() {
		Schedule schedule= new Schedule();	
		SleepTestParameters testParameters = new SleepTestParameters(2000);
		ScheduleElement sleepTest = new ScheduleElement("com.lue.client.tests.SleepTest", testParameters, null);	
		schedule.addScheduleElement(sleepTest);
		return schedule;
	}

	public static ScheduleStorage generateDebugScheduleStorage(int clientCount) {
		ScheduleStorage cSchedule = new ScheduleStorage();
		for(int i = 0; i < clientCount; i++){
			cSchedule.addEmptySchedule();
			cSchedule.putSchedule(i, generateDebugSchedule());
		}
		return cSchedule;
	}

	private void addEmptySchedule() {
		schedules.add(new Schedule());
	}

	public Schedule getSchedule(int scheduleRunnerId) {
		for(Schedule s : schedules) {
			if(s.getScheduleRunnerId() == scheduleRunnerId)
				return s;
		}
		return null;
	}

	public boolean putSchedule(int scheduleRunnerId, Schedule schedule) {
		if(schedules.size()<= scheduleRunnerId)
			return false;
		schedules.set(scheduleRunnerId, schedule);
		return true;
	}

	public Iterator<Schedule> iterator() {
		return new ScheduleIterator();
	}

	private class ScheduleIterator implements Iterator<Schedule> {
		int cursor;

		public ScheduleIterator() {
			cursor = 0;
		}

		@Override
		public boolean hasNext() {
			return cursor < schedules.size();
		}

		@Override
		public Schedule next() {
			return schedules.get(cursor++);
		}

		@Override
		public void remove() {
			throw new UnsupportedOperationException();
		}
	}
}

{'fraction_non_alphanumeric': 0.10103141115799344, 'fraction_numerical': 0.0028129395218002813, 'mean_word_length': 5.02683615819209, 'pattern_counts': {'":': 0, '<': 20, '<?xml version=': 0, '>': 15, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 4}, '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': '369975', 'n_tokens_mistral': 1348, 'n_tokens_neox': 1200, 'n_words': 300}