<commit_before>/*
 * Copyright © 2017 ZTE and others.  All rights reserved.
 *
 * This program and the accompanying materials are made available under the
 * terms of the Eclipse Public License v1.0 which accompanies this distribution,
 * and is available at http://www.eclipse.org/legal/epl-v10.html
 */
package com.highstreet.technologies.odl.app.impl;

import com.highstreet.technologies.odl.app.impl.tools.DataBrokerHolder;
import com.highstreet.technologies.odl.app.impl.tools.MountPointServiceHolder;
import org.opendaylight.controller.md.sal.binding.api.DataBroker;
import org.opendaylight.controller.md.sal.binding.api.MountPointService;
import org.opendaylight.controller.sal.binding.api.BindingAwareBroker;
import org.opendaylight.controller.sal.binding.api.RpcProviderRegistry;
import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.route.rev150105.RouteService;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

import static com.highstreet.technologies.odl.app.impl.tools.RPCHolder.rpc;

public class RouteProvider
{
    public RouteProvider(
            final DataBroker dataBroker, final RpcProviderRegistry rpcRegistry, final MountPointService mountService)
    {
        this.dataBroker = dataBroker;
        this.rpcRegistry = rpcRegistry;
        this.mountService = mountService;
    }

    private static final Logger LOG = LoggerFactory.getLogger(RouteProvider.class);
    private final DataBroker dataBroker;
    private final RpcProviderRegistry rpcRegistry;
    private final MountPointService mountService;
    private BindingAwareBroker.RpcRegistration<RouteService> service;

    /**
     * Method called when the blueprint container is created.
     */
    public void init()
    {
        LOG.info("RouteProvider Session Initiated");
        service = rpcRegistry.addRpcImplementation(
                RouteService.class, rpc = new RouteRPC(dataBroker));
        MountPointServiceHolder.setMountPointService(mountService);
        DataBrokerHolder.setDataBroker(dataBroker);
    }

    /**
     * Method called when the blueprint container is destroyed.
     */
    public void close()
    {
        LOG.info("RouteProvider Closed");
        if (service != null)
            service.close();
    }
}<commit_msg>refactoring : add push date to info<commit_after>/*
 * Copyright © 2017 ZTE and others.  All rights reserved.
 *
 * This program and the accompanying materials are made available under the
 * terms of the Eclipse Public License v1.0 which accompanies this distribution,
 * and is available at http://www.eclipse.org/legal/epl-v10.html
 */
package com.highstreet.technologies.odl.app.impl;

import com.highstreet.technologies.odl.app.impl.tools.DataBrokerHolder;
import com.highstreet.technologies.odl.app.impl.tools.MountPointServiceHolder;
import org.opendaylight.controller.md.sal.binding.api.DataBroker;
import org.opendaylight.controller.md.sal.binding.api.MountPointService;
import org.opendaylight.controller.sal.binding.api.BindingAwareBroker;
import org.opendaylight.controller.sal.binding.api.RpcProviderRegistry;
import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.route.rev150105.RouteService;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

import static com.highstreet.technologies.odl.app.impl.tools.RPCHolder.rpc;

public class RouteProvider
{
    public RouteProvider(
            final DataBroker dataBroker, final RpcProviderRegistry rpcRegistry, final MountPointService mountService)
    {
        this.dataBroker = dataBroker;
        this.rpcRegistry = rpcRegistry;
        this.mountService = mountService;
    }

    private static final Logger LOG = LoggerFactory.getLogger(RouteProvider.class);
    private final DataBroker dataBroker;
    private final RpcProviderRegistry rpcRegistry;
    private final MountPointService mountService;
    private BindingAwareBroker.RpcRegistration<RouteService> service;

    /**
     * Method called when the blueprint container is created.
     */
    public void init()
    {
        LOG.info("RouteProvider Session Initiated --- created at 11:33-0627-2017");
        service = rpcRegistry.addRpcImplementation(
                RouteService.class, rpc = new RouteRPC(dataBroker));
        MountPointServiceHolder.setMountPointService(mountService);
        DataBrokerHolder.setDataBroker(dataBroker);
    }

    /**
     * Method called when the blueprint container is destroyed.
     */
    public void close()
    {
        LOG.info("RouteProvider Closed");
        if (service != null)
            service.close();
    }
}
{'fraction_non_alphanumeric': 0.08745910577971647, 'fraction_numerical': 0.010032715376226827, 'mean_word_length': 3.727835051546392, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, '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': '1570921', 'n_tokens_mistral': 1354, 'n_tokens_neox': 1302, 'n_words': 288}