<commit_before>/* 
@ITMillApache2LicenseForJavaFiles@
 */

package com.vaadin.launcher;

import java.util.HashMap;
import java.util.Map;

import org.mortbay.jetty.Connector;
import org.mortbay.jetty.Server;
import org.mortbay.jetty.nio.SelectChannelConnector;
import org.mortbay.jetty.webapp.WebAppContext;

import com.vaadin.launcher.util.BrowserLauncher;

/**
 * Class for running Jetty servlet container within Eclipse project.
 * 
 */
public class DevelopmentServerLauncher {

    private final static String serverPort = "8888";

    /**
     * Main function for running Jetty.
     * 
     * Command line Arguments are passed through to Jetty, see runServer method
     * for options.
     * 
     * @param args
     */
    public static void main(String[] args) {

        // Pass-through of arguments for Jetty
        final Map<String, String> serverArgs = parseArguments(args);

        // Start Jetty
        System.out.println("Starting Jetty servlet container.");
        final String url = runServer(serverArgs, "Development Server Mode");

        // Start Browser
        System.out.println("Starting Web Browser.");
        if (!serverArgs.containsKey("nogui") && url != null) {

            // Open browser into application URL
            BrowserLauncher.openBrowser(url);
        }

    }

    /**
     * Run the server with specified arguments.
     * 
     * @param serverArgs
     * @return
     */
    protected static String runServer(Map<String, String> serverArgs,
            String mode) {

        // Add help for System.out
        System.out
                .println("-------------------------------------------------\n"
                        + "Starting Vaadin in "
                        + mode
                        + ".\n"
                        + "Running in http://localhost:"<commit_msg>Print web browser start message only when starting it<commit_after>/* 
@ITMillApache2LicenseForJavaFiles@
 */

package com.vaadin.launcher;

import java.util.HashMap;
import java.util.Map;

import org.mortbay.jetty.Connector;
import org.mortbay.jetty.Server;
import org.mortbay.jetty.nio.SelectChannelConnector;
import org.mortbay.jetty.webapp.WebAppContext;

import com.vaadin.launcher.util.BrowserLauncher;

/**
 * Class for running Jetty servlet container within Eclipse project.
 * 
 */
public class DevelopmentServerLauncher {

    private final static String serverPort = "8888";

    /**
     * Main function for running Jetty.
     * 
     * Command line Arguments are passed through to Jetty, see runServer method
     * for options.
     * 
     * @param args
     */
    public static void main(String[] args) {

        // Pass-through of arguments for Jetty
        final Map<String, String> serverArgs = parseArguments(args);

        // Start Jetty
        System.out.println("Starting Jetty servlet container.");
        final String url = runServer(serverArgs, "Development Server Mode");

        // Start Browser
        if (!serverArgs.containsKey("nogui") && url != null) {
            System.out.println("Starting Web Browser.");

            // Open browser into application URL
            BrowserLauncher.openBrowser(url);
        }

    }

    /**
     * Run the server with specified arguments.
     * 
     * @param serverArgs
     * @return
     */
    protected static String runServer(Map<String, String> serverArgs,
            String mode) {

        // Add help for System.out
        System.out
                .println("-------------------------------------------------\n"
                        + "Starting Vaadin in "
                        + mode
                        + ".\n"
                        + "Running in http://localhost:"
{'fraction_non_alphanumeric': 0.12135922330097088, 'fraction_numerical': 0.002696871628910464, 'mean_word_length': 1.9413164155432197, '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': '4906433', 'n_tokens_mistral': 1027, 'n_tokens_neox': 948, 'n_words': 267}