<commit_before>package org.csstudio.runtimetests;

import java.util.ArrayList;
import java.util.Collections;
import java.util.List;

import org.csstudio.platform.logging.CentralLogger;
import org.csstudio.sds.ui.runmode.RunModeService;
import org.eclipse.core.resources.IResource;
import org.eclipse.core.runtime.IPath;
import org.eclipse.ui.IWorkbench;
import org.eclipse.ui.PlatformUI;

public class DisplayRunner implements Runnable {

	private List<IResource> displays;
	private List<IResource> runningDisplays;

	public DisplayRunner(IResource[] members) {
		displays = new ArrayList<IResource>();
		for (IResource iResource : members) {
			if (iResource.getName().contains("css-sds")) {
				displays.add(iResource);
			}
		}
	}

	@Override
	public void run() {

		try {
			waitForWorkbench();
			while (true) {
				if (runningDisplays.size() > 0) {
					Collections.shuffle(runningDisplays);
					closeDisplay(runningDisplays.get(0));
				}
				Thread.sleep(10000);
				if (runningDisplays.size() < 10) {
					Collections.shuffle(displays);
					openDisplay(displays.get(0));
				}
				Thread.sleep(30000);
			}
		} catch (InterruptedException e) {<commit_msg>*** empty log message ***<commit_after>package org.csstudio.runtimetests;

import java.util.ArrayList;
import java.util.Collections;
import java.util.List;
import java.util.Random;

import org.csstudio.platform.logging.CentralLogger;
import org.csstudio.sds.ui.runmode.RunModeService;
import org.eclipse.core.resources.IResource;
import org.eclipse.core.runtime.IPath;
import org.eclipse.ui.IWorkbench;
import org.eclipse.ui.PlatformUI;

public class DisplayRunner implements Runnable {

	private List<IResource> displays = new ArrayList<IResource>();
	private List<IResource> runningDisplays = new ArrayList<IResource>();

	public DisplayRunner(IResource[] members) {
		for (IResource iResource : members) {
			if (iResource.getName().contains("css-sds")) {
				displays.add(iResource);
			}
		}
	}

	@Override
	public void run() {

		try {
			waitForWorkbench();
			while (true) {
				Random rand = new Random();
				Double randomNumber = rand.nextDouble();
				if (randomNumber < 0.5) {
					if (runningDisplays.size() > 0) {
						Collections.shuffle(runningDisplays);
						closeDisplay(runningDisplays.get(0));
						runningDisplays.remove(0);
					}
				}
				Thread.sleep(5000);
				randomNumber = rand.nextDouble();
				if (randomNumber < 0.5) {
					if ((runningDisplays.size() < 10) && (displays.size() > 0)) {
						Collections.shuffle(displays);
						openDisplay(displays.get(0));
						runningDisplays.add(displays.get(0));
					}
				}
				Thread.sleep(30000);
			}
		} catch (InterruptedException e) {
{'fraction_non_alphanumeric': 0.13040238450074515, 'fraction_numerical': 0.013412816691505217, 'mean_word_length': 4.094876660341556, 'pattern_counts': {'":': 0, '<': 14, '<?xml version=': 0, '>': 13, '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': '3441758', 'n_tokens_mistral': 1051, 'n_tokens_neox': 855, 'n_words': 160}