<commit_before>package ubic.gemma.web.jetty;

/*
 * The Gemma project
 * 
 * Copyright (c) 2006 University of British Columbia
 * 
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *       http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 *
 */
import java.net.URL;

import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.mortbay.jetty.Server;

/**
 * Start Jetty from a run configuration
 * 
 * @author keshav
 * @version $Id$
 */
public class Jetty {
    /**
     * Used for logging.
     */
    private static Log log = LogFactory.getLog( Jetty.class );

    /**
     * Construct.
     */
    Jetty() {
        super();
    }

    /**
     * Main function, starts the jetty server.
     * 
     * @param args
     */
    public static void main( String[] args ) {
        Server jettyServer = null;
        try {
            URL jettyConfig = new URL( "file:gemma-web/etc/conf/jetty.xml" );

            log.debug( "jetty config:" + jettyConfig );

            jettyServer = new Server( jettyConfig );
            jettyServer.start();
        } catch ( Exception e ) {
            log.fatal( "Could not start the Jetty server: " + e );
            if ( jettyServer != null ) {
                try {
                    jettyServer.stop();
                } catch ( Exception e1 ) {
                    log.fatal( "Unable to stop the jetty server: " + e1 );
                }
            }
            System.exit( 0 );
        }
    }
}
<commit_msg>updates<commit_after>package ubic.gemma.web.jetty;

/*
 * The Gemma project
 * 
 * Copyright (c) 2006 University of British Columbia
 * 
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *       http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 *
 */
import java.net.URL;

import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.mortbay.jetty.Server;

/**
 * Start Jetty from a run configuration
 * 
 * @author keshav
 * @version $Id$
 */
public class Jetty {
    /**
     * Used for logging.
     */
    private static Log log = LogFactory.getLog( Jetty.class );

    /**
     * Construct.
     */
    Jetty() {
        super();
    }

    /**
     * Main function, starts the jetty server.
     * 
     * @param args
     */
    public static void main( String[] args ) {
        Server jettyServer = null;
        try {
            URL jettyConfig = new URL( "file:gemma-web/etc/conf/jetty.xml" );

            log.debug( "jetty config:" + jettyConfig );

            jettyServer = new Server( jettyConfig );
            jettyServer.start();
        } catch ( Exception e ) {
            log
                    .fatal( "Could not start the Jetty server.  Have you tried adding servlet-api.jar, jsp-api.jar, tomcat-juli.jar, and jasper.jar to your classpath?  The error is: "
                            + e );
            if ( jettyServer != null ) {
                try {
                    jettyServer.stop();
                } catch ( Exception e1 ) {
                    log.fatal( "Unable to stop the jetty server: " + e1 );
                }
            }
            System.exit( 0 );
        }
    }
}

{'fraction_non_alphanumeric': 0.10227272727272728, 'fraction_numerical': 0.005434782608695652, 'mean_word_length': 1.9533187454412837, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 2, 'xml': 2}, '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': '4888758', 'n_tokens_mistral': 1164, 'n_tokens_neox': 1118, 'n_words': 384}