<commit_before>package com.payu.hackathon.server;


import javax.servlet.ServletException;

import org.glassfish.jersey.servlet.ServletContainer;
import org.glassfish.jersey.servlet.ServletProperties;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.EnableAutoConfiguration;
import org.springframework.boot.builder.SpringApplicationBuilder;
import org.springframework.boot.context.embedded.ServletRegistrationBean;
import org.springframework.boot.context.web.SpringBootServletInitializer;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.ComponentScan;
import org.springframework.context.annotation.Configuration;

import com.payu.hackathon.discovery.server.ServiceRegister;
import com.payu.hackathon.server.config.JerseyConfig;
import com.payu.hackathon.server.config.ServiceRegisterPostProcessor;
import com.payu.hackathon.server.model.OrderDatabase;

@ComponentScan(basePackages = "com.payu.hackathon.server")
@Configuration
@EnableAutoConfiguration
public class MainConfiguration extends SpringBootServletInitializer {

    private static final String appAddress = "http://localhost:8080/";
    private static String zooKeeperUri = "localhost:2181";

    public static void main(String[] args) throws Exception {
        SpringApplication.run(new Object[]{
                MainConfiguration.class}, args);
        ServiceRegister serviceRegister = new ServiceRegister("com.payu.hackathon.server.service",
                appAddress, zooKeeperUri);
        serviceRegister.registerServices();
    }

    @Bean
    public ServletRegistrationBean jerseyServlet() throws ServletException {

        ServletContainer servlet = new ServletContainer();
        ServletRegistrationBean registration = new ServletRegistrationBean(servlet,
                "/server/*");
        registration.addInitParameter(ServletProperties.JAXRS_APPLICATION_CLASS, JerseyConfig.class.getName());
        return registration;
    }

    @Bean
    public OrderDatabase orderDatabase() {
        return new OrderDatabase();
    }

    @Override<commit_msg>discovery client - method impl<commit_after>package com.payu.hackathon.server;


import com.payu.hackathon.discovery.server.ServiceRegister;
import com.payu.hackathon.server.config.JerseyConfig;
import com.payu.hackathon.server.config.ServiceRegisterPostProcessor;
import com.payu.hackathon.server.model.OrderDatabase;
import org.glassfish.jersey.servlet.ServletContainer;
import org.glassfish.jersey.servlet.ServletProperties;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.EnableAutoConfiguration;
import org.springframework.boot.builder.SpringApplicationBuilder;
import org.springframework.boot.context.embedded.ServletRegistrationBean;
import org.springframework.boot.context.web.SpringBootServletInitializer;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.ComponentScan;
import org.springframework.context.annotation.Configuration;

import javax.servlet.ServletException;

@ComponentScan(basePackages = "com.payu.hackathon.server")
@Configuration
@EnableAutoConfiguration
public class MainConfiguration extends SpringBootServletInitializer {

    private static final String appAddress = "http://localhost:8080/";
    private static String zooKeeperUri = "localhost:7777";

    public static void main(String[] args) throws Exception {
        SpringApplication.run(new Object[]{
                MainConfiguration.class}, args);
        ServiceRegister serviceRegister = new ServiceRegister("com.payu.hackathon.server.service",
                appAddress, zooKeeperUri);
        serviceRegister.registerServices();
    }

    @Bean
    public ServletRegistrationBean jerseyServlet() throws ServletException {

        ServletContainer servlet = new ServletContainer();
        ServletRegistrationBean registration = new ServletRegistrationBean(servlet,
                "/server/*");
        registration.addInitParameter(ServletProperties.JAXRS_APPLICATION_CLASS, JerseyConfig.class.getName());
        return registration;
    }

    @Bean
    public OrderDatabase orderDatabase() {
        return new OrderDatabase();
    }

    @Override
{'fraction_non_alphanumeric': 0.0853601496725912, 'fraction_numerical': 0.0037418147801683817, 'mean_word_length': 4.883081155433287, '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': '2498417', 'n_tokens_mistral': 1089, 'n_tokens_neox': 1035, 'n_words': 196}