<commit_before>package aQute.junit;

import java.io.*;
import java.lang.reflect.*;
import java.util.*;

import junit.framework.*;

import org.junit.runner.*;
import org.junit.runner.manipulation.*;
import org.osgi.framework.*;

import aQute.junit.constants.*;

public class Activator implements BundleActivator, TesterConstants, Runnable {
	BundleContext		context;
	volatile boolean	active;
	int					port		= -1;
	boolean				continuous	= false;
	boolean				trace		= false;
	PrintStream			out			= System.err;
	JUnitEclipseReport	jUnitEclipseReport;
	volatile Thread		thread;

	public Activator() {
	}

	public void start(BundleContext context) throws Exception {
		this.context = context;
		active = true;
		if (context.getProperty(TESTER_SEPARATETHREAD) == null) {			
			Hashtable<String,String> ht = new Hashtable<String,String>();
			ht.put("main.thread", "true");
			ht.put(Constants.SERVICE_DESCRIPTION, "JUnit tester");
			context.registerService(Runnable.class.getName(), this, ht);
		} else {
			thread = new Thread(this,"bnd Runtime Test Bundle");
			thread.start();
		}
	}
<commit_msg>#340 junit Activator cannot use services on MiniFramework<commit_after>package aQute.junit;

import java.io.*;
import java.lang.reflect.*;
import java.util.*;

import junit.framework.*;

import org.junit.runner.*;
import org.junit.runner.manipulation.*;
import org.osgi.framework.*;

import aQute.junit.constants.*;

public class Activator implements BundleActivator, TesterConstants, Runnable {
	BundleContext		context;
	volatile boolean	active;
	int					port		= -1;
	boolean				continuous	= false;
	boolean				trace		= false;
	PrintStream			out			= System.err;
	JUnitEclipseReport	jUnitEclipseReport;
	volatile Thread		thread;

	public Activator() {
	}

	public void start(BundleContext context) throws Exception {
		this.context = context;
		active = true;
		if (!Boolean.valueOf(context.getProperty(TESTER_SEPARATETHREAD)) && 
				Boolean.valueOf(context.getProperty("launch.services"))) { // can't register services on mini framework
			Hashtable<String,String> ht = new Hashtable<String,String>();
			ht.put("main.thread", "true");
			ht.put(Constants.SERVICE_DESCRIPTION, "JUnit tester");
			context.registerService(Runnable.class.getName(), this, ht);
		} else {
			thread = new Thread(this,"bnd Runtime Test Bundle");
			thread.start();
		}
	}

{'fraction_non_alphanumeric': 0.1206308610400682, 'fraction_numerical': 0.002131287297527707, 'mean_word_length': 4.470862470862471, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 7, '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': '4144381', 'n_tokens_mistral': 820, 'n_tokens_neox': 745, 'n_words': 178}