<commit_before>package twitchlsgui;

import java.util.ArrayList;

/**
 * 
 * @author Niklas 28.06.2014
 * 
 */
public class StreamCheck implements Runnable {

    private ArrayList<Thread> threads = new ArrayList<Thread>();
    private ArrayList<GenericStream> streamList;

    @Override
    public void run() {
	while (true) {
	    streamList = Main_GUI.selectStreamService("twitch.tv")
		    .getStreamList();

	    if (streamList.size() > 0) {
		if (Main_GUI.currentStreamService.equals(Main_GUI
			.selectStreamService("twitch.tv").getUrl())) {
		    Main_GUI.updateStatus.setText("Updating");
		} else {
		    Main_GUI.updateStatus.setText("");
		}

		for (int i = 0; i < streamList.size(); i++) {
		    threads.add(new Thread(new CheckThread(i)));
		}
		for (int i = 0; i < streamList.size(); i++) {
		    threads.get(i).start();
		}
		for (int i = 0; i < streamList.size(); i++) {
		    try {
			threads.get(i).join();
		    } catch (InterruptedException e) {
			e.printStackTrace();
		    }
		}
		for (int i = 0; i < Main_GUI.streamListModel.getSize(); i++) {
		    Main_GUI.streamListModel.setElementAt(
			    Main_GUI.streamListModel.getElementAt(i), i);
		}
	    }

	    if (Main_GUI.currentStreamName == "") {
		if (Main_GUI.currentStreamService.equals(Main_GUI
			.selectStreamService("twitch.tv").getUrl())) {
		    Main_GUI.updateStatus.setText("Finished updating");
		} else {
		    Main_GUI.updateStatus.setText("");
		}
	    } else {
		if (Main_GUI.currentStreamService.equals(Main_GUI
			.selectStreamService("twitch.tv").getUrl())) {
		    for (int i = 0; i < streamList.size(); i++) {
			TwitchStream ts = (TwitchStream) streamList.get(i);
			if (ts.getChannel().equals(Main_GUI.currentStreamName)) {
			    if (ts.isOnline()) {
				Main_GUI.onlineStatus.setText(ts
					.getOnlineString());
				Main_GUI.setPreviewImage(ts.getPreview());
			    } else {
				Main_GUI.onlineStatus
					.setText("Stream is Offline");
			    }
			}
		    }
		} else {
		    Main_GUI.onlineStatus.setText("");
		}
<commit_msg>fixed bug with status bar text not changing when a stream is selected<commit_after>package twitchlsgui;

import java.util.ArrayList;

/**
 * 
 * @author Niklas 28.06.2014
 * 
 */
public class StreamCheck implements Runnable {

    private ArrayList<Thread> threads = new ArrayList<Thread>();
    private ArrayList<GenericStream> streamList;

    @Override
    public void run() {
	while (true) {
	    streamList = Main_GUI.selectStreamService("twitch.tv")
		    .getStreamList();

	    if (streamList.size() > 0) {
		if (Main_GUI.currentStreamService.equals(Main_GUI
			.selectStreamService("twitch.tv").getUrl())) {
		    Main_GUI.updateStatus.setText("Updating");
		} else {
		    Main_GUI.updateStatus.setText("");
		}

		for (int i = 0; i < streamList.size(); i++) {
		    threads.add(new Thread(new CheckThread(i)));
		}
		for (int i = 0; i < streamList.size(); i++) {
		    threads.get(i).start();
		}
		for (int i = 0; i < streamList.size(); i++) {
		    try {
			threads.get(i).join();
		    } catch (InterruptedException e) {
			e.printStackTrace();
		    }
		}
		for (int i = 0; i < Main_GUI.streamListModel.getSize(); i++) {
		    Main_GUI.streamListModel.setElementAt(
			    Main_GUI.streamListModel.getElementAt(i), i);
		}
	    }

	    if (Main_GUI.currentStreamService.equals(Main_GUI
		    .selectStreamService("twitch.tv").getUrl())) {
		Main_GUI.updateStatus.setText("Finished updating");
	    } else {
		Main_GUI.updateStatus.setText("");
	    }
	    if (Main_GUI.currentStreamName != "") {
		if (Main_GUI.currentStreamService.equals(Main_GUI
			.selectStreamService("twitch.tv").getUrl())) {
		    for (int i = 0; i < streamList.size(); i++) {
			TwitchStream ts = (TwitchStream) streamList.get(i);
			if (ts.getChannel().equals(Main_GUI.currentStreamName)) {
			    if (ts.isOnline()) {
				Main_GUI.onlineStatus.setText(ts
					.getOnlineString());
				Main_GUI.setPreviewImage(ts.getPreview());
			    } else {
				Main_GUI.onlineStatus
					.setText("Stream is Offline");
			    }
			}
		    }
		} else {
		    Main_GUI.onlineStatus.setText("");
		}

{'fraction_non_alphanumeric': 0.1530214424951267, 'fraction_numerical': 0.00682261208576998, 'mean_word_length': 3.159067882472138, 'pattern_counts': {'":': 0, '<': 19, '<?xml version=': 0, '>': 11, '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': '4130370', 'n_tokens_mistral': 1559, 'n_tokens_neox': 1333, 'n_words': 245}