<commit_before>package org.oskari.service.util;

import fi.mml.map.mapwindow.service.db.OskariMapLayerGroupServiceIbatisImpl;
import fi.mml.map.mapwindow.service.db.OskariMapLayerGroupService;
import fi.mml.portti.service.db.permissions.PermissionsService;
import fi.mml.portti.service.db.permissions.PermissionsServiceIbatisImpl;
import fi.mml.portti.service.search.SearchService;
import fi.mml.portti.service.search.SearchServiceImpl;
import fi.nls.oskari.map.layer.DataProviderService;
import fi.nls.oskari.map.layer.DataProviderServiceMybatisImpl;
import fi.nls.oskari.map.layer.OskariLayerService;
import fi.nls.oskari.map.layer.OskariLayerServiceMybatisImpl;
import fi.nls.oskari.map.layer.group.link.OskariLayerGroupLinkService;
import fi.nls.oskari.map.layer.group.link.OskariLayerGroupLinkServiceMybatisImpl;
import fi.nls.oskari.map.view.ViewService;
import fi.nls.oskari.map.view.AppSetupServiceMybatisImpl;
import fi.nls.oskari.service.capabilities.CapabilitiesCacheService;
import fi.nls.oskari.service.capabilities.CapabilitiesCacheServiceMybatisImpl;
import fi.nls.oskari.wfs.WFSLayerConfigurationService;
import fi.nls.oskari.wfs.WFSLayerConfigurationServiceIbatisImpl;

public class ServiceFactory {

    private static DataProviderService dataProviderService;
    private static OskariLayerService mapLayerService;
    private static ViewService viewService;
    private static OskariMapLayerGroupService oskariMapLayerGroupService;
    private static OskariLayerGroupLinkService layerGroupLinkService;
    private static PermissionsService permissionsService;
    private static SearchService searchService;
    private static CapabilitiesCacheService capabilitiesCacheService;
    private static WFSLayerConfigurationService wfsLayerService;

    public static DataProviderService getDataProviderService() {
        if (dataProviderService == null) {
            dataProviderService = new DataProviderServiceMybatisImpl();
        }
        return dataProviderService;
    }

    public static OskariLayerService getMapLayerService() {
        if (mapLayerService == null) {
            mapLayerService = new OskariLayerServiceMybatisImpl();
        }
        return mapLayerService;
    }

    public static ViewService getViewService() {
        if (viewService == null) {
            viewService = new AppSetupServiceMybatisImpl();
        }
        return viewService;
    }

    public static OskariMapLayerGroupService getOskariMapLayerGroupService() {
        if (oskariMapLayerGroupService == null) {
            oskariMapLayerGroupService = new OskariMapLayerGroupServiceIbatisImpl();
        }
        return oskariMapLayerGroupService;
    }

    public static OskariLayerGroupLinkService getOskariLayerGroupLinkService() {
        if (layerGroupLinkService == null) {
            layerGroupLinkService = new OskariLayerGroupLinkServiceMybatisImpl();
        }
        return layerGroupLinkService;
    }

    public static PermissionsService getPermissionsService() {
        if (permissionsService == null) {
            permissionsService = new PermissionsServiceIbatisImpl();
        }
        return permissionsService;
    }

    public static SearchService getSearchService() {
        if (searchService == null) {
            searchService = new SearchServiceImpl();
        }
        return searchService;
    }

    public static CapabilitiesCacheService getCapabilitiesCacheService() {
        if (capabilitiesCacheService == null) {
            capabilitiesCacheService = new CapabilitiesCacheServiceMybatisImpl();
        }
        return capabilitiesCacheService;
    }

    public static WFSLayerConfigurationService getWfsLayerService() {
        if (wfsLayerService == null) {
            wfsLayerService = new WFSLayerConfigurationServiceIbatisImpl();
        }
        return wfsLayerService;
    }
}
<commit_msg>Migrate ServiceFactory<commit_after>package org.oskari.service.util;

import fi.mml.map.mapwindow.service.db.OskariMapLayerGroupServiceIbatisImpl;
import fi.mml.map.mapwindow.service.db.OskariMapLayerGroupService;
import fi.mml.portti.service.search.SearchService;
import fi.mml.portti.service.search.SearchServiceImpl;
import fi.nls.oskari.map.layer.DataProviderService;
import fi.nls.oskari.map.layer.DataProviderServiceMybatisImpl;
import fi.nls.oskari.map.layer.OskariLayerService;
import fi.nls.oskari.map.layer.OskariLayerServiceMybatisImpl;
import fi.nls.oskari.map.layer.group.link.OskariLayerGroupLinkService;
import fi.nls.oskari.map.layer.group.link.OskariLayerGroupLinkServiceMybatisImpl;
import fi.nls.oskari.map.view.ViewService;
import fi.nls.oskari.map.view.AppSetupServiceMybatisImpl;
import fi.nls.oskari.service.capabilities.CapabilitiesCacheService;
import fi.nls.oskari.service.capabilities.CapabilitiesCacheServiceMybatisImpl;
import fi.nls.oskari.wfs.WFSLayerConfigurationService;
import fi.nls.oskari.wfs.WFSLayerConfigurationServiceIbatisImpl;
import org.oskari.permissions.PermissionService;
import org.oskari.permissions.PermissionServiceMybatisImpl;

public class ServiceFactory {

    private static DataProviderService dataProviderService;
    private static OskariLayerService mapLayerService;
    private static ViewService viewService;
    private static OskariMapLayerGroupService oskariMapLayerGroupService;
    private static OskariLayerGroupLinkService layerGroupLinkService;
    private static PermissionService permissionsService;
    private static SearchService searchService;
    private static CapabilitiesCacheService capabilitiesCacheService;
    private static WFSLayerConfigurationService wfsLayerService;

    public static DataProviderService getDataProviderService() {
        if (dataProviderService == null) {
            dataProviderService = new DataProviderServiceMybatisImpl();
        }
        return dataProviderService;
    }

    public static OskariLayerService getMapLayerService() {
        if (mapLayerService == null) {
            mapLayerService = new OskariLayerServiceMybatisImpl();
        }
        return mapLayerService;
    }

    public static ViewService getViewService() {
        if (viewService == null) {
            viewService = new AppSetupServiceMybatisImpl();
        }
        return viewService;
    }

    public static OskariMapLayerGroupService getOskariMapLayerGroupService() {
        if (oskariMapLayerGroupService == null) {
            oskariMapLayerGroupService = new OskariMapLayerGroupServiceIbatisImpl();
        }
        return oskariMapLayerGroupService;
    }

    public static OskariLayerGroupLinkService getOskariLayerGroupLinkService() {
        if (layerGroupLinkService == null) {
            layerGroupLinkService = new OskariLayerGroupLinkServiceMybatisImpl();
        }
        return layerGroupLinkService;
    }

    public static PermissionService getPermissionsService() {
        if (permissionsService == null) {
            permissionsService = new PermissionServiceMybatisImpl();
        }
        return permissionsService;
    }

    public static SearchService getSearchService() {
        if (searchService == null) {
            searchService = new SearchServiceImpl();
        }
        return searchService;
    }

    public static CapabilitiesCacheService getCapabilitiesCacheService() {
        if (capabilitiesCacheService == null) {
            capabilitiesCacheService = new CapabilitiesCacheServiceMybatisImpl();
        }
        return capabilitiesCacheService;
    }

    public static WFSLayerConfigurationService getWfsLayerService() {
        if (wfsLayerService == null) {
            wfsLayerService = new WFSLayerConfigurationServiceIbatisImpl();
        }
        return wfsLayerService;
    }
}

{'fraction_non_alphanumeric': 0.06853582554517133, 'fraction_numerical': 0.0, 'mean_word_length': 3.926470588235294, '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': '2770431', 'n_tokens_mistral': 2133, 'n_tokens_neox': 2117, 'n_words': 371}