<commit_before>package org.iochibity;

import java.util.List;
import java.util.LinkedList;

public class ServiceManager
{
    public static List<CoServiceProvider> coServiceProviders;

    static {
	coServiceProviders = new LinkedList<CoServiceProvider>();
    }

    // OCGetNumberOfResources
    public static native int resourceCount();

    public static native void registerPlatformProvider(String platform_id, // setPlatformInfo
					      String manufacturer_name,
					      String manufacturer_url,
					      String model_number,
					      String date_of_manufacture,
					      String platform_version,
					      String operating_system_version,
					      String hardware_version,
					      String firmware_version,
					      String support_url,
					      String system_time);

    public static native void registerDeviceProvider(String deviceName, // setDeviceInfo
					    String[] types,
					    String specVersion,
					    String[] dataModelVersions);

    // OCSetDefaultDeviceEntityHandler
    public static native void registerDefaultServiceRoutine
	(Object /*OCDeviceEntityHandler*/ serviceRoutine,
	 Object /*void* */ callbackParam);

    // public static native int OCCreateResource(Object /*OCResourceHandle* */ handle,
    public synchronized static native ServiceProvider
	registerServiceProvider(ServiceProvider serviceProvider);

    public synchronized static void registerCoServiceProvider(CoServiceProvider coServiceProvider)
    {
	System.out.println("registerCoServiceProvider ENTRY");
	coServiceProviders.add(coServiceProvider);
    }



    // public synchronized static native ResourceLocal registerServiceProvider(String Uri,
    // 							String[] resourceTypeName,
    // 							String[] resourceInterfaceName,
    // 							IServiceProvider serviceRoutine,
    // 							// CallbackParam /*void* */ callbackParam,
    // 							byte   /*uint8_t*/ policies);

    // public static native ResourceLocal registerWatchableProvider(String Uri,
    // 								 String[] resourceTypeName,
    // 								 String[] resourceInterfaceName,
    // 								 IServiceProvider serviceRoutine,
    // 								 byte   /*uint8_t*/ policies);

    ////////////////////////////////////////////////////////////////
    // stack/internal/ocresourcehandler.h:
    // OCResource *FindResourceByUri(const char* resourceUri);
    // bool IsVirtualResource(const char* resourceUri);
    // OCStackResult GetPlatformInfo(OCPlatformInfo** info);

}
<commit_msg>synchronize registration methods in ServiceManager<commit_after>package org.iochibity;

import java.util.List;
import java.util.LinkedList;

public class ServiceManager
{
    public static List<CoServiceProvider> coServiceProviders;

    static {
	coServiceProviders = new LinkedList<CoServiceProvider>();
    }

    // OCGetNumberOfResources
    public static native int resourceCount();

    public static native void registerPlatformProvider(String platform_id, // setPlatformInfo
					      String manufacturer_name,
					      String manufacturer_url,
					      String model_number,
					      String date_of_manufacture,
					      String platform_version,
					      String operating_system_version,
					      String hardware_version,
					      String firmware_version,
					      String support_url,
					      String system_time);

    public static native void registerDeviceProvider(String deviceName, // setDeviceInfo
					    String[] types,
					    String specVersion,
					    String[] dataModelVersions);

    // OCSetDefaultDeviceEntityHandler
    public static native void registerDefaultServiceRoutine
	(Object /*OCDeviceEntityHandler*/ serviceRoutine,
	 Object /*void* */ callbackParam);

    // public static native int OCCreateResource(Object /*OCResourceHandle* */ handle,
    public synchronized static native
	ServiceProvider	registerServiceProvider(ServiceProvider serviceProvider);

    public synchronized static
	void registerCoServiceProvider(CoServiceProvider coServiceProvider)
    {
	System.out.println("registerCoServiceProvider ENTRY");
	coServiceProviders.add(coServiceProvider);
    }



    // public synchronized static native ResourceLocal registerServiceProvider(String Uri,
    // 							String[] resourceTypeName,
    // 							String[] resourceInterfaceName,
    // 							IServiceProvider serviceRoutine,
    // 							// CallbackParam /*void* */ callbackParam,
    // 							byte   /*uint8_t*/ policies);

    // public static native ResourceLocal registerWatchableProvider(String Uri,
    // 								 String[] resourceTypeName,
    // 								 String[] resourceInterfaceName,
    // 								 IServiceProvider serviceRoutine,
    // 								 byte   /*uint8_t*/ policies);

    ////////////////////////////////////////////////////////////////
    // stack/internal/ocresourcehandler.h:
    // OCResource *FindResourceByUri(const char* resourceUri);
    // bool IsVirtualResource(const char* resourceUri);
    // OCStackResult GetPlatformInfo(OCPlatformInfo** info);

}

{'fraction_non_alphanumeric': 0.09923969587835134, 'fraction_numerical': 0.0008003201280512205, 'mean_word_length': 2.775679758308157, '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': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1457122', 'n_tokens_mistral': 1453, 'n_tokens_neox': 1182, 'n_words': 292}