<commit_before>package org.ops4j.pax.wicket.test;

import java.io.File;
import java.net.URL;

import javax.servlet.http.HttpServlet;

import org.ops4j.pax.wicket.HttpTracker;
import org.ops4j.pax.wicket.ResourceInfo;
import org.ops4j.pax.wicket.ServletInfo;
import org.ops4j.pax.wicket.SimpleWicketServlet;
import org.osgi.framework.BundleActivator;
import org.osgi.framework.BundleContext;
import org.osgi.service.http.HttpService;
import org.osgi.util.tracker.ServiceTracker;

public class Activator implements BundleActivator 
{

    private ServiceTracker m_HttpTracker;
 
    public void start( BundleContext bundleContext )
        throws Exception
    {
        debug( "Initializing the servlet." );
        HttpServlet servlet = new SimpleWicketServlet( bundleContext, HomePage.class, LoginPage.class, TestWebSession.class );
        String userDir = System.getProperty( "user.dir" );
        File contextDir = new File( userDir, "webapps/hello" );
        contextDir.mkdirs();
        URL contextRoot = contextDir.toURL();
        ServletInfo[] servletInfos = new ServletInfo[] { new ServletInfo( "/helloapp", servlet, null ) };
        ResourceInfo[] resourceInfos = new ResourceInfo[] { new ResourceInfo( "/hello", "/hello" ) };
        HttpTracker tracker = new HttpTracker( bundleContext, servletInfos, resourceInfos, "/hello", contextRoot );
 
        m_HttpTracker = new ServiceTracker( bundleContext, HttpService.class.getName(), tracker );<commit_msg>small updates<commit_after>package org.ops4j.pax.wicket.test;

import java.io.File;
import java.net.URL;
import java.util.Dictionary;
import java.util.Hashtable;

import javax.servlet.http.HttpServlet;

import org.ops4j.pax.wicket.HttpTracker;
import org.ops4j.pax.wicket.ResourceInfo;
import org.ops4j.pax.wicket.ServletInfo;
import org.ops4j.pax.wicket.SimpleWicketServlet;
import org.osgi.framework.BundleActivator;
import org.osgi.framework.BundleContext;
import org.osgi.service.http.HttpService;
import org.osgi.util.tracker.ServiceTracker;

public class Activator implements BundleActivator 
{

    private ServiceTracker m_HttpTracker;
 
    public void start( BundleContext bundleContext )
        throws Exception
    {
        debug( "Initializing the servlet." );
        HttpServlet servlet = new SimpleWicketServlet( bundleContext, HomePage.class, LoginPage.class, TestWebSession.class );
        Dictionary initParams = new Hashtable();
		ServletInfo[] servletInfos = new ServletInfo[] { new ServletInfo( "/hellowicket", servlet, initParams  ) };
        ResourceInfo[] resourceInfos = new ResourceInfo[] { new ResourceInfo( "/hello", "/hello" ) };
        HttpTracker tracker = new HttpTracker( bundleContext, servletInfos, resourceInfos);
 
        m_HttpTracker = new ServiceTracker( bundleContext, HttpService.class.getName(), tracker );
{'fraction_non_alphanumeric': 0.10269121813031161, 'fraction_numerical': 0.0035410764872521247, 'mean_word_length': 4.350378787878788, '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': '5326709', 'n_tokens_mistral': 842, 'n_tokens_neox': 823, 'n_words': 187}