<commit_before>package ee.ut.cs.rum.database;

import java.util.Enumeration;

import org.osgi.framework.BundleContext;
import org.osgi.framework.ServiceReference;
import org.osgi.util.tracker.ServiceTrackerCustomizer;

import ee.ut.cs.rum.database.RumEmfService;
import ee.ut.cs.rum.database.internal.Activator;

@SuppressWarnings({ "rawtypes", "unchecked" })
public class EmfTrackerCustomizer implements ServiceTrackerCustomizer {
	private final BundleContext context;

	public EmfTrackerCustomizer(BundleContext context) {
		this.context = context;
	}

	@Override
	public Object addingService(ServiceReference reference) {

		RumEmfService service = (RumEmfService) context.getService(reference);
		Activator.getLogger().info("Emf registered in bundle: " + context.getBundle().getSymbolicName());

		Activator.getLogger().info("EmfTrackerCustomizer getSymbolicName: " + reference.getBundle().getSymbolicName());
		Activator.getLogger().info("EmfTrackerCustomizer toString       : " + reference.getBundle().toString());
		Activator.getLogger().info("EmfTrackerCustomizer getLocation    : " + reference.getBundle().getLocation());

		for (Enumeration e = reference.getBundle().getHeaders().keys(); e.hasMoreElements();) {
			Object key = e.nextElement();
			Activator.getLogger().info("EmfTrackerCustomizer headers      : " + key + " - " + reference.getBundle().getHeaders().get(key));
		}

		return service;
	}

	@Override
	public void modifiedService(ServiceReference reference, Object service) {
		removedService(reference, service);
		addingService(reference);
		Activator.getLogger().info("Emf modified in bundle: " + context.getBundle().getSymbolicName());
	}

	@Override
	public void removedService(ServiceReference reference, Object service) {
		context.ungetService(reference);
		Activator.getLogger().info("Emf in removed bundle: " + context.getBundle().getSymbolicName());
		//TODO: Handle removal of EntityManager
	}
}
<commit_msg>Removed printing of bundle info from RuM_Database<commit_after>package ee.ut.cs.rum.database;

import org.osgi.framework.BundleContext;
import org.osgi.framework.ServiceReference;
import org.osgi.util.tracker.ServiceTrackerCustomizer;

import ee.ut.cs.rum.database.RumEmfService;
import ee.ut.cs.rum.database.internal.Activator;

@SuppressWarnings({ "rawtypes", "unchecked" })
public class EmfTrackerCustomizer implements ServiceTrackerCustomizer {
	private final BundleContext context;

	public EmfTrackerCustomizer(BundleContext context) {
		this.context = context;
	}

	@Override
	public Object addingService(ServiceReference reference) {
		RumEmfService service = (RumEmfService) context.getService(reference);
		
		return service;
	}

	@Override
	public void modifiedService(ServiceReference reference, Object service) {
		removedService(reference, service);
		addingService(reference);
		Activator.getLogger().info("Emf modified in bundle: " + context.getBundle().getSymbolicName());
	}

	@Override
	public void removedService(ServiceReference reference, Object service) {
		context.ungetService(reference);
		Activator.getLogger().info("Emf in removed bundle: " + context.getBundle().getSymbolicName());
		//TODO: Handle removal of EntityManager
	}
}

{'fraction_non_alphanumeric': 0.11367781155015197, 'fraction_numerical': 0.0, 'mean_word_length': 5.038532110091743, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, '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': '1564082', 'n_tokens_mistral': 987, 'n_tokens_neox': 937, 'n_words': 180}