<commit_before>/**
 * This file is licensed under the University of Illinois/NCSA Open Source License. See LICENSE.TXT for details.
 */
package edu.illinois.bundleupdater;

import org.eclipse.core.runtime.ILog;
import org.eclipse.core.runtime.IStatus;
import org.eclipse.core.runtime.Platform;
import org.eclipse.core.runtime.Status;
import org.eclipse.equinox.p2.core.IProvisioningAgentProvider;
import org.osgi.framework.BundleActivator;
import org.osgi.framework.BundleContext;
import org.osgi.framework.ServiceReference;

public class Activator implements BundleActivator {

	public static final String PLUGIN_ID= "edu.illinois.bundleupdater"; //$NON-NLS-1$

	private static Activator plugin;

	private ServiceReference provisioningAgentProviderServiceReference;

	private IProvisioningAgentProvider provisioningAgentProvider;

	/*
	 * (non-Javadoc)
	 * 
	 * @see
	 * org.osgi.framework.BundleActivator#start(org.osgi.framework.BundleContext
	 * )
	 */
	public void start(BundleContext bundleContext) throws Exception {
		provisioningAgentProviderServiceReference= bundleContext.getServiceReference(IProvisioningAgentProvider.SERVICE_NAME);
		if (provisioningAgentProviderServiceReference != null) {
			provisioningAgentProvider= (IProvisioningAgentProvider)bundleContext.getService(provisioningAgentProviderServiceReference);
		}
		plugin= this;
	}

	/*
	 * (non-Javadoc)
	 * 
	 * @see
	 * org.osgi.framework.BundleActivator#stop(org.osgi.framework.BundleContext)
	 */
	public void stop(BundleContext bundleContext) throws Exception {
		provisioningAgentProviderServiceReference= null;
		provisioningAgentProvider= null;
		plugin= null;
	}

	public static Activator getDefault() {
		return plugin;
	}

	public ServiceReference getAgentProviderServiceReference() {
		return provisioningAgentProviderServiceReference;
	}

	public IProvisioningAgentProvider getProvisioningAgentProvider() {
		return provisioningAgentProvider;
	}

	private ILog getLog() {
		return Platform.getLog(Platform.getBundle(PLUGIN_ID));
	}

	public void log(IStatus status) {
		getLog().log(status);
	}

	public void logErrorStatus(String message, Exception e) {
		log(new Status(Status.ERROR, PLUGIN_ID, message, e));
	}

}<commit_msg>The Activator now extends AbstractUIPlugin<commit_after>/**
 * This file is licensed under the University of Illinois/NCSA Open Source License. See LICENSE.TXT for details.
 */
package edu.illinois.bundleupdater;

import org.eclipse.core.runtime.ILog;
import org.eclipse.core.runtime.IStatus;
import org.eclipse.core.runtime.Platform;
import org.eclipse.core.runtime.Status;
import org.eclipse.equinox.p2.core.IProvisioningAgentProvider;
import org.eclipse.ui.plugin.AbstractUIPlugin;
import org.osgi.framework.BundleActivator;
import org.osgi.framework.BundleContext;
import org.osgi.framework.ServiceReference;

public class Activator extends AbstractUIPlugin {

	public static final String PLUGIN_ID= "edu.illinois.bundleupdater"; //$NON-NLS-1$

	private static Activator plugin;

	private ServiceReference provisioningAgentProviderServiceReference;

	private IProvisioningAgentProvider provisioningAgentProvider;

	/*
	 * (non-Javadoc)
	 * 
	 * @see
	 * org.osgi.framework.BundleActivator#start(org.osgi.framework.BundleContext
	 * )
	 */
	public void start(BundleContext bundleContext) throws Exception {
		provisioningAgentProviderServiceReference= bundleContext.getServiceReference(IProvisioningAgentProvider.SERVICE_NAME);
		if (provisioningAgentProviderServiceReference != null) {
			provisioningAgentProvider= (IProvisioningAgentProvider)bundleContext.getService(provisioningAgentProviderServiceReference);
		}
		plugin= this;
	}

	/*
	 * (non-Javadoc)
	 * 
	 * @see
	 * org.osgi.framework.BundleActivator#stop(org.osgi.framework.BundleContext)
	 */
	public void stop(BundleContext bundleContext) throws Exception {
		provisioningAgentProviderServiceReference= null;
		provisioningAgentProvider= null;
		plugin= null;
	}

	public static Activator getDefault() {
		return plugin;
	}

	public ServiceReference getAgentProviderServiceReference() {
		return provisioningAgentProviderServiceReference;
	}

	public IProvisioningAgentProvider getProvisioningAgentProvider() {
		return provisioningAgentProvider;
	}

	public void log(IStatus status) {
		getLog().log(status);
	}

	public void logErrorStatus(String message, Exception e) {
		log(new Status(Status.ERROR, PLUGIN_ID, message, e));
	}

}
{'fraction_non_alphanumeric': 0.08876811594202899, 'fraction_numerical': 0.0009057971014492754, 'mean_word_length': 5.848062015503876, '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': '2372008', 'n_tokens_mistral': 1350, 'n_tokens_neox': 1277, 'n_words': 255}