<commit_before>/*
 * SIP Communicator, the OpenSource Java VoIP and Instant Messaging client.
 *
 * Distributable under LGPL license.
 * See terms of license at gnu.org.
 */
package net.java.sip.communicator.impl.media;

import net.java.sip.communicator.service.configuration.*;
import net.java.sip.communicator.service.fileaccess.*;
import net.java.sip.communicator.service.gui.*;
import net.java.sip.communicator.service.media.*;
import net.java.sip.communicator.service.netaddr.*;
import net.java.sip.communicator.service.resources.*;
import net.java.sip.communicator.util.*;

import org.osgi.framework.*;

/**
 * Invoke "Service Binder" to parse the service XML and register
 * all services.
 *
 * @author <NAME>
 * @author <NAME>
 */
public class MediaActivator
    implements BundleActivator
{
    private final Logger logger = Logger.getLogger(MediaActivator.class.getName());

    private static MediaServiceImpl mediaServiceImpl = null;

    private static BundleContext        bundleContext         = null;
    private static ConfigurationService configurationService  = null;
    private static NetworkAddressManagerService networkAddressManagerService
                                                              = null;
    private static FileAccessService    fileAccessService     = null;
    private static ResourceManagementService resources;

    private ServiceRegistration mediaServiceRegistration      = null;

    /**
     * Called when this bundle is started so the Framework can perform the
     * bundle-specific activities necessary to start this bundle.
     *
     * @param context The execution context of the bundle being started.
     * @throws Exception If this method throws an exception, this bundle is
     *   marked as stopped and the Framework will remove this bundle's
     *   listeners, unregister all services registered by this bundle, and
     *   release all services used by this bundle.
     */
    public void start(BundleContext context)
        throws Exception
    {
        logger.debug("Started.");

        MediaActivator.bundleContext = context;

        // MediaService
        mediaServiceImpl = new MediaServiceImpl();
        mediaServiceImpl.start();

        mediaServiceRegistration =
            context.registerService(MediaService.class.getName(),
                mediaServiceImpl, null);
        logger.debug("Media Service ... [REGISTERED]");

        // MediaConfigurationForm
        context.registerService(ConfigurationForm.class.getName(),
            new LazyConfigurationForm(
                "net.java.sip.communicator.impl.media.MediaConfigurationPanel",
                getClass().getClassLoader(),
                "plugin.mediaconfig.PLUGIN_ICON",
                "impl.media.configform.TITLE",
                40),
            null);

        //we use the nist-sdp stack to make parse sdp and we need to set the
        //following property to make sure that it would accept java generated
        //IPv6 addresses that contain address scope zones.
        System.setProperty("gov.nist.core.STRIP_ADDR_SCOPES", "true");
    }

    /**
     * Returns a reference to a ConfigurationService implementation currently
     * registered in the bundle context or null if no such implementation was
     * found.
     *
     * @return a currently valid implementation of the ConfigurationService.
     */
    public static ConfigurationService getConfigurationService()
    {<commit_msg>Disables the legacy media service<commit_after>/*
 * SIP Communicator, the OpenSource Java VoIP and Instant Messaging client.
 *
 * Distributable under LGPL license.
 * See terms of license at gnu.org.
 */
package net.java.sip.communicator.impl.media;

import net.java.sip.communicator.service.configuration.*;
import net.java.sip.communicator.service.fileaccess.*;
import net.java.sip.communicator.service.gui.*;
import net.java.sip.communicator.service.media.*;
import net.java.sip.communicator.service.netaddr.*;
import net.java.sip.communicator.service.resources.*;
import net.java.sip.communicator.util.*;

import org.osgi.framework.*;

/**
 * Invoke "Service Binder" to parse the service XML and register
 * all services.
 *
 * @author <NAME>
 * @author <NAME>
 */
public class MediaActivator
    implements BundleActivator
{
    private final Logger logger = Logger.getLogger(MediaActivator.class.getName());

    private static MediaServiceImpl mediaServiceImpl = null;

    private static BundleContext        bundleContext         = null;
    private static ConfigurationService configurationService  = null;
    private static NetworkAddressManagerService networkAddressManagerService
                                                              = null;
    private static FileAccessService    fileAccessService     = null;
    private static ResourceManagementService resources;

    private ServiceRegistration mediaServiceRegistration      = null;

    /**
     * Called when this bundle is started so the Framework can perform the
     * bundle-specific activities necessary to start this bundle.
     *
     * @param context The execution context of the bundle being started.
     * @throws Exception If this method throws an exception, this bundle is
     *   marked as stopped and the Framework will remove this bundle's
     *   listeners, unregister all services registered by this bundle, and
     *   release all services used by this bundle.
     */
    public void start(BundleContext context)
        throws Exception
    {
        logger.debug("Started.");
/*
        MediaActivator.bundleContext = context;

        // MediaService
        mediaServiceImpl = new MediaServiceImpl();
        mediaServiceImpl.start();

        mediaServiceRegistration =
            context.registerService(MediaService.class.getName(),
                mediaServiceImpl, null);
        logger.debug("Media Service ... [REGISTERED]");

        // MediaConfigurationForm
        context.registerService(ConfigurationForm.class.getName(),
            new LazyConfigurationForm(
                "net.java.sip.communicator.impl.media.MediaConfigurationPanel",
                getClass().getClassLoader(),
                "plugin.mediaconfig.PLUGIN_ICON",
                "impl.media.configform.TITLE",
                40),
              null);

        //we use the nist-sdp stack to make parse sdp and we need to set the
        //following property to make sure that it would accept java generated
        //IPv6 addresses that contain address scope zones.
        System.setProperty("gov.nist.core.STRIP_ADDR_SCOPES", "true");
*/
    }

    /**
     * Returns a reference to a ConfigurationService implementation currently
     * registered in the bundle context or null if no such implementation was
     * found.
     *
     * @return a currently valid implementation of the ConfigurationService.
     */
    public static ConfigurationService getConfigurationService()
    {
{'fraction_non_alphanumeric': 0.07806423736137116, 'fraction_numerical': 0.0008641797493878727, 'mean_word_length': 2.7373519913885898, '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': 4, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5010480', 'n_tokens_mistral': 1709, 'n_tokens_neox': 1645, 'n_words': 530}