id stringlengths 7 14 | test_class dict | test_case dict | focal_class dict | focal_method dict | repository dict |
|---|---|---|---|---|---|
85692970_7 | {
"fields": [],
"file": "rmi/src/test/java/com/github/thorbenkuck/netcom2/network/client/RemoteAccessBlockRegistrationTest.java",
"identifier": "RemoteAccessBlockRegistrationTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n\tpublic void getResponse() throws Exception {\n\t\t// Arrange\n\t\tRemoteAccessBlockRegistration registration = new RemoteAccessBlockRegistration();\n\t\tUUID id = UUID.randomUUID();\n\t\tRemoteAccessCommunicationResponse response = new RemoteAccessCommunicationResponse(id, null, null);\n\n\t\t// A... | {
"fields": [
{
"declarator": "semaphoreMap = new HashMap<>()",
"modifier": "private final",
"original_string": "private final Map<UUID, Semaphore> semaphoreMap = new HashMap<>();",
"type": "Map<UUID, Semaphore>",
"var_name": "semaphoreMap"
},
{
"declarator": "responseM... | {
"body": "@APILevel\n\tRemoteAccessCommunicationResponse getResponse(UUID uuid) {\n\t\tNetCom2Utils.parameterNotNull(uuid);\n\t\tsynchronized (responseMap) {\n\t\t\treturn responseMap.get(uuid);\n\t\t}\n\t}",
"class_method_signature": "RemoteAccessBlockRegistration.getResponse(UUID uuid)",
"constructor": false,
... | {
"created": null,
"fork": null,
"fork_count": 1,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 85692970,
"size": 2370,
"stargazer_count": 9,
"stars": null,
"updates": null,
"url": "https://github.com/ThorbenKuck/NetCom2"
} |
85692970_23 | {
"fields": [],
"file": "core/src/test/java/com/github/thorbenkuck/netcom2/pipeline/EmptyReceivePipelineConditionTest.java",
"identifier": "EmptyReceivePipelineConditionTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n\tpublic void testEmptyReceivePipelineCondition() {\n\t\t// Arrange\n\t\tQueuedReceivePipeline<ReceivePipelineTestObject> pipeline = new QueuedReceivePipeline<>(ReceivePipelineTestObject.class);\n\t\tReceivePipelineTestObject object = new ReceivePipelineTestObject();\n\n\t\t// Act\n\t\tpipeline.addF... | {
"fields": [],
"file": "core/src/main/java/com/github/thorbenkuck/netcom2/pipeline/EmptyReceivePipelineCondition.java",
"identifier": "EmptyReceivePipelineCondition",
"interfaces": "implements ReceivePipelineCondition<T>",
"methods": [
{
"class_method_signature": "EmptyReceivePipelineCondition.requ... | {
"body": "@Override\n\tpublic ReceivePipelineCondition<T> require(BiPredicate<Session, T> userPredicate) {\n\t\treturn this;\n\t}",
"class_method_signature": "EmptyReceivePipelineCondition.require(BiPredicate<Session, T> userPredicate)",
"constructor": false,
"full_signature": "@Override public ReceivePipeline... | {
"created": null,
"fork": null,
"fork_count": 1,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 85692970,
"size": 2370,
"stargazer_count": 9,
"stars": null,
"updates": null,
"url": "https://github.com/ThorbenKuck/NetCom2"
} |
85692970_35 | {
"fields": [
{
"declarator": "registration",
"modifier": "private",
"original_string": "private CommunicationRegistration registration;",
"type": "CommunicationRegistration",
"var_name": "registration"
}
],
"file": "core/src/test/java/com/github/thorbenkuck/netcom2/network/s... | {
"body": "@Test\n\tpublic void setConnection() throws Exception {\n\t\t// Arrange\n\t\tNativeClient client = new NativeClient(registration);\n\t\tConnection connection = mock(Connection.class);\n\n\t\t// Act\n\t\tclient.setConnection(TestConnectionKey.class, connection);\n\n\t\t// Assert\n\t\tOptional<Connection> op... | {
"fields": [
{
"declarator": "communicationRegistration",
"modifier": "private final",
"original_string": "private final CommunicationRegistration communicationRegistration;",
"type": "CommunicationRegistration",
"var_name": "communicationRegistration"
},
{
"declarator... | {
"body": "@Override\n\tpublic void setConnection(Class<?> identifier, Connection connection) {\n\t\tNetCom2Utils.parameterNotNull(identifier, connection);\n\t\tsynchronized (connectionMap) {\n\t\t\tconnectionMap.put(identifier, connection);\n\t\t}\n\t\tconnection.addShutdownHook(this::removeConnection);\n\t}",
"cl... | {
"created": null,
"fork": null,
"fork_count": 1,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 85692970,
"size": 2370,
"stargazer_count": 9,
"stars": null,
"updates": null,
"url": "https://github.com/ThorbenKuck/NetCom2"
} |
85692970_62 | {
"fields": [],
"file": "cache/src/test/java/com/github/thorbenkuck/netcom2/network/shared/cache/NativeCacheTest.java",
"identifier": "NativeCacheTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n\tpublic void addGeneralObserver() throws Exception {\n\t\t// Arrange\n\t\tNativeCache cache = new NativeCache();\n\t\tGeneralCacheObserver observer = new GeneralCacheObserver() {\n\t\t\t@Override\n\t\t\tpublic void newEntry(final Object o, final CacheObservable observable) {\n\n\t\t\t}\n\n\t\t\t@Ov... | {
"fields": [
{
"declarator": "internals = new HashMap<>()",
"modifier": "private final",
"original_string": "private final Map<Class<?>, Object> internals = new HashMap<>();",
"type": "Map<Class<?>, Object>",
"var_name": "internals"
},
{
"declarator": "semaphore = new ... | {
"body": "@Override\n\tpublic void addGeneralObserver(final GeneralCacheObserver observer) {\n\t\tlogging.debug(\"Adding Observer(\" + observer + \") to \" + toString());\n\t\tlogging.warn(\"It is recommended to use \" + CacheObserver.class);\n\t\tNetCom2Utils.parameterNotNull(observer);\n\t\taddObserver(observer);\... | {
"created": null,
"fork": null,
"fork_count": 1,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 85692970,
"size": 2370,
"stargazer_count": 9,
"stars": null,
"updates": null,
"url": "https://github.com/ThorbenKuck/NetCom2"
} |
85692970_19 | {
"fields": [],
"file": "rmi/src/test/java/com/github/thorbenkuck/netcom2/network/server/NativeRemoteObjectRegistrationTest.java",
"identifier": "NativeRemoteObjectRegistrationTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n\tpublic void unhook() throws Exception {\n\t\t//Arrange\n\t\tNativeRemoteObjectRegistration remoteObjectRegistration = new NativeRemoteObjectRegistration();\n\t\tTestRemoteObjectWithInterface object = spy(new TestRemoteObjectWithInterface());\n\t\tString methodName = \"anInterfaceMethod\";\n\t\tStr... | {
"fields": [
{
"declarator": "PRIMITIVE_MAPPING",
"modifier": "private static final",
"original_string": "private static final Map<Class<?>, Class<?>> PRIMITIVE_MAPPING;",
"type": "Map<Class<?>, Class<?>>",
"var_name": "PRIMITIVE_MAPPING"
},
{
"declarator": "mapping = ... | {
"body": "@Override\n\tpublic final void unhook(final Object object) {\n\t\tNetCom2Utils.parameterNotNull(object);\n\t\tfinal List<Class> classList = new ArrayList<>(Arrays.asList(object.getClass().getInterfaces()));\n\t\tclassList.add(object.getClass().getSuperclass());\n\t\tclassList.add(object.getClass());\n\t\tu... | {
"created": null,
"fork": null,
"fork_count": 1,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 85692970,
"size": 2370,
"stargazer_count": 9,
"stars": null,
"updates": null,
"url": "https://github.com/ThorbenKuck/NetCom2"
} |
85692970_58 | {
"fields": [],
"file": "cache/src/test/java/com/github/thorbenkuck/netcom2/network/shared/cache/NativeCacheTest.java",
"identifier": "NativeCacheTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n\tpublic void getEmpty() throws Exception {\n\t\t// Arrange\n\t\tNativeCache cache = new NativeCache();\n\n\t\t// Act\n\t\tOptional<CacheElement> optional = cache.get(CacheElement.class);\n\n\t\t// Assert\n\t\tassertFalse(optional.isPresent());\n\t}",
"class_method_signature": "NativeCacheTest.get... | {
"fields": [
{
"declarator": "internals = new HashMap<>()",
"modifier": "private final",
"original_string": "private final Map<Class<?>, Object> internals = new HashMap<>();",
"type": "Map<Class<?>, Object>",
"var_name": "internals"
},
{
"declarator": "semaphore = new ... | {
"body": "@Override\n\t@SuppressWarnings(\"unchecked\")\n\tpublic <T> Optional<T> get(final Class<T> clazz) {\n\t\tNetCom2Utils.parameterNotNull(clazz);\n\t\tfinal Object retrieved;\n\t\tsynchronized (internals) {\n\t\t\tretrieved = internals.get(clazz);\n\t\t}\n\t\tif (retrieved != null && retrieved.getClass().equa... | {
"created": null,
"fork": null,
"fork_count": 1,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 85692970,
"size": 2370,
"stargazer_count": 9,
"stars": null,
"updates": null,
"url": "https://github.com/ThorbenKuck/NetCom2"
} |
85692970_53 | {
"fields": [
{
"declarator": "bridge",
"modifier": "private",
"original_string": "private SendBridge bridge;",
"type": "SendBridge",
"var_name": "bridge"
}
],
"file": "core/src/test/java/com/github/thorbenkuck/netcom2/network/shared/NativeSessionTest.java",
"identifier": "... | {
"body": "@Test\n\tpublic void primed() throws Exception {\n\t\t// Arrange\n\t\tNativeSession session = new NativeSession(bridge);\n\n\t\t// Act\n\t\tAwaiting awaiting = session.primed();\n\n\t\t// Assert\n\t\tassertFalse(Synchronize.isEmpty(awaiting));\n\t}",
"class_method_signature": "NativeSessionTest.primed()"... | {
"fields": [
{
"declarator": "sendBridge",
"modifier": "private final",
"original_string": "private final SendBridge sendBridge;",
"type": "SendBridge",
"var_name": "sendBridge"
},
{
"declarator": "identifiedValue = Value.synchronize(false)",
"modifier": "private... | {
"body": "@Override\n\tpublic Awaiting primed() {\n\t\treturn synchronize;\n\t}",
"class_method_signature": "NativeSession.primed()",
"constructor": false,
"full_signature": "@Override public Awaiting primed()",
"identifier": "primed",
"invocations": [],
"modifiers": "@Override public",
"parameters": "... | {
"created": null,
"fork": null,
"fork_count": 1,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 85692970,
"size": 2370,
"stargazer_count": 9,
"stars": null,
"updates": null,
"url": "https://github.com/ThorbenKuck/NetCom2"
} |
85692970_45 | {
"fields": [
{
"declarator": "bridge",
"modifier": "private",
"original_string": "private SendBridge bridge;",
"type": "SendBridge",
"var_name": "bridge"
}
],
"file": "core/src/test/java/com/github/thorbenkuck/netcom2/network/shared/NativeSessionTest.java",
"identifier": "... | {
"body": "@Test\n\tpublic void getIdentifier() throws Exception {\n\t\t// Arrange\n\t\tNativeSession session = new NativeSession(bridge);\n\n\t\t// Act\n\t\tString identifier = session.getIdentifier();\n\n\t\t// Assert\n\t\tassertEquals(\"\", identifier);\n\t}",
"class_method_signature": "NativeSessionTest.getIden... | {
"fields": [
{
"declarator": "sendBridge",
"modifier": "private final",
"original_string": "private final SendBridge sendBridge;",
"type": "SendBridge",
"var_name": "sendBridge"
},
{
"declarator": "identifiedValue = Value.synchronize(false)",
"modifier": "private... | {
"body": "@Override\n\tpublic String getIdentifier() {\n\t\treturn identifierValue.get();\n\t}",
"class_method_signature": "NativeSession.getIdentifier()",
"constructor": false,
"full_signature": "@Override public String getIdentifier()",
"identifier": "getIdentifier",
"invocations": [
"get"
],
"mo... | {
"created": null,
"fork": null,
"fork_count": 1,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 85692970,
"size": 2370,
"stargazer_count": 9,
"stars": null,
"updates": null,
"url": "https://github.com/ThorbenKuck/NetCom2"
} |
85692970_12 | {
"fields": [],
"file": "rmi/src/test/java/com/github/thorbenkuck/netcom2/network/server/NativeRemoteObjectRegistrationTest.java",
"identifier": "NativeRemoteObjectRegistrationTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test(expected=IllegalArgumentException.class)\n\tpublic void registerInvalidArrayLength() throws Exception {\n\t\t//Arrange\n\t\tNativeRemoteObjectRegistration remoteObjectRegistration = new NativeRemoteObjectRegistration();\n\t\tTestRemoteObject remoteObject = new TestRemoteObject();\n\t\tClass[] classes... | {
"fields": [
{
"declarator": "PRIMITIVE_MAPPING",
"modifier": "private static final",
"original_string": "private static final Map<Class<?>, Class<?>> PRIMITIVE_MAPPING;",
"type": "Map<Class<?>, Class<?>>",
"var_name": "PRIMITIVE_MAPPING"
},
{
"declarator": "mapping = ... | {
"body": "@Override\n\tpublic final void register(final Object object) {\n\t\tNetCom2Utils.parameterNotNull(object);\n\t\tregister(object, object.getClass());\n\t}",
"class_method_signature": "NativeRemoteObjectRegistration.register(final Object object)",
"constructor": false,
"full_signature": "@Override publ... | {
"created": null,
"fork": null,
"fork_count": 1,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 85692970,
"size": 2370,
"stargazer_count": 9,
"stars": null,
"updates": null,
"url": "https://github.com/ThorbenKuck/NetCom2"
} |
85692970_86 | {
"fields": [
{
"declarator": "socketAddress = new InetSocketAddress(8888)",
"modifier": "private static final",
"original_string": "private static final InetSocketAddress socketAddress = new InetSocketAddress(8888);",
"type": "InetSocketAddress",
"var_name": "socketAddress"
},
... | {
"body": "@Test(expected = ClientConnectionFailedException.class)\n\tpublic void acceptAllNextClients() throws Exception {\n\t\t// Arrange\n\t\tdoThrow(ClientConnectionFailedException.class).when(connectorCore).handleNext();\n\t\tserverStart.launch();\n\n\t\t// Act\n\t\tserverStart.acceptAllNextClients();\n\n\t\t// ... | {
"fields": [
{
"declarator": "addressValue = Value.emptySynchronized()",
"modifier": "private final",
"original_string": "private final Value<InetSocketAddress> addressValue = Value.emptySynchronized();",
"type": "Value<InetSocketAddress>",
"var_name": "addressValue"
},
{
... | {
"body": "@Override\n\tpublic final void acceptAllNextClients() throws ClientConnectionFailedException {\n\t\tfinal Logging logging = loggingValue.get();\n\t\tfinal Thread thread = Thread.currentThread();\n\t\tlogging.debug(\"Accepting all connecting Clients on \" + thread + \". This Thread will be blocked.\");\n\t\... | {
"created": null,
"fork": null,
"fork_count": 1,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 85692970,
"size": 2370,
"stargazer_count": 9,
"stars": null,
"updates": null,
"url": "https://github.com/ThorbenKuck/NetCom2"
} |
85692970_69 | {
"fields": [
{
"declarator": "clientStart",
"modifier": "private",
"original_string": "private NativeClientStart clientStart;",
"type": "NativeClientStart",
"var_name": "clientStart"
},
{
"declarator": "client",
"modifier": "private",
"original_string": "pr... | {
"body": "@Test\n\tpublic void registrationToServer() throws Exception {\n\t\t// Arrange\n\t\tNativeSender sender = new NativeSender();\n\t\tsender.setup(clientStart);\n\t\tTestCacheObserver<TestSendObject> observer = new TestCacheObserver<>(TestSendObject.class);\n\n\t\t// Act\n\t\tsender.registrationToServer(TestS... | {
"fields": [
{
"declarator": "logging = Logging.unified()",
"modifier": "private final",
"original_string": "private final Logging logging = Logging.unified();",
"type": "Logging",
"var_name": "logging"
},
{
"declarator": "clientValue = Value.emptySynchronized()",
... | {
"body": "@Override\n\tpublic <T> void registrationToServer(Class<T> clazz, CacheObserver<T> observer) {\n\t\tsynchronized (observerLimbo) {\n\t\t\tobserverLimbo.put(clazz, observer);\n\t\t}\n\t\tobjectToServer(new CacheRegistration(clazz));\n\t}",
"class_method_signature": "NativeSender.registrationToServer(Class... | {
"created": null,
"fork": null,
"fork_count": 1,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 85692970,
"size": 2370,
"stargazer_count": 9,
"stars": null,
"updates": null,
"url": "https://github.com/ThorbenKuck/NetCom2"
} |
85692970_28 | {
"fields": [
{
"declarator": "registration",
"modifier": "private",
"original_string": "private CommunicationRegistration registration;",
"type": "CommunicationRegistration",
"var_name": "registration"
}
],
"file": "core/src/test/java/com/github/thorbenkuck/netcom2/network/s... | {
"body": "@Test(expected = SendFailedException.class)\n\tpublic void send() throws Exception {\n\t\t// Arrange\n\t\tNativeClient client = new NativeClient(registration);\n\t\tConnection connection = mock(Connection.class);\n\t\twhen(connection.isOpen()).thenReturn(true);\n\t\twhen(connection.isConnected()).thenRetur... | {
"fields": [
{
"declarator": "communicationRegistration",
"modifier": "private final",
"original_string": "private final CommunicationRegistration communicationRegistration;",
"type": "CommunicationRegistration",
"var_name": "communicationRegistration"
},
{
"declarator... | {
"body": "@Override\n\tpublic void send(Object object, Connection connection) {\n\t\tlogging.debug(\"Sending over the provided Connection\");\n\t\tlogging.trace(\"Converting set Object to writable String\");\n\t\tString string = convert(object);\n\t\tlogging.trace(\"Extracting send as Task to the NetComThreadPool\")... | {
"created": null,
"fork": null,
"fork_count": 1,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 85692970,
"size": 2370,
"stargazer_count": 9,
"stars": null,
"updates": null,
"url": "https://github.com/ThorbenKuck/NetCom2"
} |
85692970_90 | {
"fields": [
{
"declarator": "socketAddress = new InetSocketAddress(8888)",
"modifier": "private static final",
"original_string": "private static final InetSocketAddress socketAddress = new InetSocketAddress(8888);",
"type": "InetSocketAddress",
"var_name": "socketAddress"
},
... | {
"body": "@Test(expected = ClientConnectionFailedException.class)\n\tpublic void acceptNextClientNotLaunched() throws Exception {\n\t\t// Arrange\n\t\tdoThrow(ClientConnectionFailedException.class).when(connectorCore).handleNext();\n\n\t\t// Act\n\t\tserverStart.acceptNextClient();\n\n\t\t// Assert\n\t\tfail();\n\t}... | {
"fields": [
{
"declarator": "addressValue = Value.emptySynchronized()",
"modifier": "private final",
"original_string": "private final Value<InetSocketAddress> addressValue = Value.emptySynchronized();",
"type": "Value<InetSocketAddress>",
"var_name": "addressValue"
},
{
... | {
"body": "@Override\n\tpublic final void acceptNextClient() throws ClientConnectionFailedException {\n\t\tfinal Logging logging = loggingValue.get();\n\t\tlogging.debug(\"Accepting next client.\");\n\t\tlogging.trace(\"Checking ConnectorCore value ..\");\n\t\tlogging.trace(\"Requesting next Client handling at Connec... | {
"created": null,
"fork": null,
"fork_count": 1,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 85692970,
"size": 2370,
"stargazer_count": 9,
"stars": null,
"updates": null,
"url": "https://github.com/ThorbenKuck/NetCom2"
} |
85692970_102 | {
"fields": [],
"file": "main/src/test/java/com/github/thorbenkuck/netcom2/network/server/NativeClientListTest.java",
"identifier": "NativeClientListTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n\t@Ignore\n\t// TODO change to correct behaviour!\n\tpublic void sessionStream() throws Exception {\n\t\t//Arrange\n\t\tClient client = mock(Client.class);\n\t\twhen(client.getID()).thenReturn(ClientID.fromString(UUID_SEED_1));\n\t\tSession clientSession = mock(Session.class);\n\t\twhen(client.getSe... | {
"fields": [
{
"declarator": "core",
"modifier": "private final",
"original_string": "private final List<Client> core;",
"type": "List<Client>",
"var_name": "core"
},
{
"declarator": "openValue",
"modifier": "private final",
"original_string": "private fina... | {
"body": "@Override\n\tpublic final Stream<Session> sessionStream() {\n\t\treturn snapShot().stream()\n\t\t\t\t.map(Client::getSession);\n\t}",
"class_method_signature": "NativeClientList.sessionStream()",
"constructor": false,
"full_signature": "@Override public final Stream<Session> sessionStream()",
"iden... | {
"created": null,
"fork": null,
"fork_count": 1,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 85692970,
"size": 2370,
"stargazer_count": 9,
"stars": null,
"updates": null,
"url": "https://github.com/ThorbenKuck/NetCom2"
} |
85692970_49 | {
"fields": [
{
"declarator": "bridge",
"modifier": "private",
"original_string": "private SendBridge bridge;",
"type": "SendBridge",
"var_name": "bridge"
}
],
"file": "core/src/test/java/com/github/thorbenkuck/netcom2/network/shared/NativeSessionTest.java",
"identifier": "... | {
"body": "@Test\n\tpublic void setProperties() throws Exception {\n\t\t// Arrange\n\t\tNativeSession session = new NativeSession(bridge);\n\t\tProperties newProperties = new Properties();\n\n\t\t// Act\n\t\tsession.setProperties(newProperties);\n\n\t\t// Assert\n\t\tassertEquals(newProperties, session.getProperties(... | {
"fields": [
{
"declarator": "sendBridge",
"modifier": "private final",
"original_string": "private final SendBridge sendBridge;",
"type": "SendBridge",
"var_name": "sendBridge"
},
{
"declarator": "identifiedValue = Value.synchronize(false)",
"modifier": "private... | {
"body": "@Override\n\tpublic void setProperties(Properties properties) {\n\t\tpropertiesValue.set(properties);\n\t}",
"class_method_signature": "NativeSession.setProperties(Properties properties)",
"constructor": false,
"full_signature": "@Override public void setProperties(Properties properties)",
"identif... | {
"created": null,
"fork": null,
"fork_count": 1,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 85692970,
"size": 2370,
"stargazer_count": 9,
"stars": null,
"updates": null,
"url": "https://github.com/ThorbenKuck/NetCom2"
} |
85692970_65 | {
"fields": [],
"file": "cache/src/test/java/com/github/thorbenkuck/netcom2/network/shared/cache/NativeCacheTest.java",
"identifier": "NativeCacheTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n\tpublic void reset() throws Exception {\n\t\t// Arrange\n\t\tNativeCache cache = new NativeCache();\n\t\tcache.addAndOverride(new CacheElement());\n\t\tGeneralCacheObserver observer = new GeneralCacheObserver() {\n\t\t\t@Override\n\t\t\tpublic void newEntry(final Object o, final CacheObservable obs... | {
"fields": [
{
"declarator": "internals = new HashMap<>()",
"modifier": "private final",
"original_string": "private final Map<Class<?>, Object> internals = new HashMap<>();",
"type": "Map<Class<?>, Object>",
"var_name": "internals"
},
{
"declarator": "semaphore = new ... | {
"body": "@Override\n\tpublic void reset() {\n\t\tlogging.debug(\"Resetting Cache!\");\n\t\tclearObservers();\n\t\tlogging.trace(\"Clearing all previously cached instances ..\");\n\t\tinternals.clear();\n\t}",
"class_method_signature": "NativeCache.reset()",
"constructor": false,
"full_signature": "@Override p... | {
"created": null,
"fork": null,
"fork_count": 1,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 85692970,
"size": 2370,
"stargazer_count": 9,
"stars": null,
"updates": null,
"url": "https://github.com/ThorbenKuck/NetCom2"
} |
85692970_32 | {
"fields": [
{
"declarator": "registration",
"modifier": "private",
"original_string": "private CommunicationRegistration registration;",
"type": "CommunicationRegistration",
"var_name": "registration"
}
],
"file": "core/src/test/java/com/github/thorbenkuck/netcom2/network/s... | {
"body": "@Test\n\t@Ignore\n\t// TODO Adjust to new signature\n\tpublic void createNewConnection() throws Exception {\n\t\t// Arrange\n\t\tNativeClient client = new NativeClient(registration);\n\t\tConnection connection = mock(Connection.class);\n\t\twhen(connection.isOpen()).thenReturn(true);\n\t\twhen(connection.i... | {
"fields": [
{
"declarator": "communicationRegistration",
"modifier": "private final",
"original_string": "private final CommunicationRegistration communicationRegistration;",
"type": "CommunicationRegistration",
"var_name": "communicationRegistration"
},
{
"declarator... | {
"body": "@Override\n\tpublic void setConnection(Class<?> identifier, Connection connection) {\n\t\tNetCom2Utils.parameterNotNull(identifier, connection);\n\t\tsynchronized (connectionMap) {\n\t\t\tconnectionMap.put(identifier, connection);\n\t\t}\n\t\tconnection.addShutdownHook(this::removeConnection);\n\t}",
"cl... | {
"created": null,
"fork": null,
"fork_count": 1,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 85692970,
"size": 2370,
"stargazer_count": 9,
"stars": null,
"updates": null,
"url": "https://github.com/ThorbenKuck/NetCom2"
} |
85692970_0 | {
"fields": [
{
"declarator": "semaphore = new Semaphore(1)",
"modifier": "final",
"original_string": "final Semaphore semaphore = new Semaphore(1);",
"type": "Semaphore",
"var_name": "semaphore"
}
],
"file": "rmi/src/test/java/com/github/thorbenkuck/netcom2/network/client/Ja... | {
"body": "@Test\n\tpublic void invoke() throws Throwable {\n\t\t// Arrange\n\t\tUUID id = UUID.randomUUID();\n\t\tSender sender = mock(Sender.class);\n\t\tdoAnswer(invocationOnMock -> {\n\t\t\tcontinueSemaphore();\n\t\t\treturn null;\n\t\t}).when(sender).objectToServer(any(RemoteAccessCommunicationRequest.class));\n... | {
"fields": [
{
"declarator": "sender",
"modifier": "private final",
"original_string": "private final Sender sender;",
"type": "Sender",
"var_name": "sender"
},
{
"declarator": "remoteAccessBlockRegistration",
"modifier": "private final",
"original_string":... | {
"body": "@Override\n\tpublic Object invoke(final Object proxy, final Method method, final Object[] args) throws Throwable {\n\t\tRemoteAccessCommunicationRequest request = new RemoteAccessCommunicationRequest(method.getName(), clazz, uuid, args);\n\n\t\ttry {\n\t\t\tsender.objectToServer(request);\n\t\t} catch (Sen... | {
"created": null,
"fork": null,
"fork_count": 1,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 85692970,
"size": 2370,
"stargazer_count": 9,
"stars": null,
"updates": null,
"url": "https://github.com/ThorbenKuck/NetCom2"
} |
85692970_24 | {
"fields": [
{
"declarator": "registration",
"modifier": "private",
"original_string": "private CommunicationRegistration registration;",
"type": "CommunicationRegistration",
"var_name": "registration"
}
],
"file": "core/src/test/java/com/github/thorbenkuck/netcom2/network/s... | {
"body": "@Test\n\tpublic void disconnect() throws Exception {\n\t\t// Arrange\n\t\tNativeClient client = new NativeClient(registration);\n\t\tConnection mockedConnection = mock(Connection.class);\n\t\tclient.setConnection(TestConnectionKey.class, mockedConnection);\n\t\tSession session = client.getSession();\n\n\t\... | {
"fields": [
{
"declarator": "communicationRegistration",
"modifier": "private final",
"original_string": "private final CommunicationRegistration communicationRegistration;",
"type": "CommunicationRegistration",
"var_name": "communicationRegistration"
},
{
"declarator... | {
"body": "@Override\n\tpublic void disconnect() {\n\t\t// This looks like the synchronized\n\t\t// wall of death. It is done, to ensure\n\t\t// that we have full access over the\n\t\t// client on disconnect. Everything\n\t\t// that we need, has to be acquired.\n\t\t// We do not use a mutex, to not slow down\n\t\t// ... | {
"created": null,
"fork": null,
"fork_count": 1,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 85692970,
"size": 2370,
"stargazer_count": 9,
"stars": null,
"updates": null,
"url": "https://github.com/ThorbenKuck/NetCom2"
} |
85692970_73 | {
"fields": [
{
"declarator": "ADDRESS = \"localhost\"",
"modifier": "private static final",
"original_string": "private static final String ADDRESS = \"localhost\";",
"type": "String",
"var_name": "ADDRESS"
},
{
"declarator": "PORT = 1",
"modifier": "private stat... | {
"body": "@Test\n\tpublic void cache() throws Exception {\n\t\t// Arrange\n\t\tClientStart clientStart = new NativeClientStart(socketAddress, mockedClientCore);\n\n\t\tfinal AtomicBoolean success = new AtomicBoolean(false);\n\t\tCacheObserver<TestSendObject> observer = new TestObserver(success);\n\n\t\t// Act\n\t\tC... | {
"fields": [
{
"declarator": "addressValue = Value.emptySynchronized()",
"modifier": "private final",
"original_string": "private final Value<SocketAddress> addressValue = Value.emptySynchronized();",
"type": "Value<SocketAddress>",
"var_name": "addressValue"
},
{
"dec... | {
"body": "@Override\n\tpublic Cache cache() {\n\t\treturn cache;\n\t}",
"class_method_signature": "NativeClientStart.cache()",
"constructor": false,
"full_signature": "@Override public Cache cache()",
"identifier": "cache",
"invocations": [],
"modifiers": "@Override public",
"parameters": "()",
"retu... | {
"created": null,
"fork": null,
"fork_count": 1,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 85692970,
"size": 2370,
"stargazer_count": 9,
"stars": null,
"updates": null,
"url": "https://github.com/ThorbenKuck/NetCom2"
} |
85692970_72 | {
"fields": [
{
"declarator": "ADDRESS = \"localhost\"",
"modifier": "private static final",
"original_string": "private static final String ADDRESS = \"localhost\";",
"type": "String",
"var_name": "ADDRESS"
},
{
"declarator": "PORT = 1",
"modifier": "private stat... | {
"body": "@Test\n\tpublic void launch() throws Exception {\n\t\t// Arrange\n\t\tNativeClientStart clientStart = new NativeClientStart(new InetSocketAddress(ADDRESS, PORT), mockedClientCore);\n\n\t\t// Act\n\t\tclientStart.launch();\n\n\t\t// Assert\n\t\tassertTrue(clientStart.running());\n\t\tverify(mockedClientCore... | {
"fields": [
{
"declarator": "addressValue = Value.emptySynchronized()",
"modifier": "private final",
"original_string": "private final Value<SocketAddress> addressValue = Value.emptySynchronized();",
"type": "Value<SocketAddress>",
"var_name": "addressValue"
},
{
"dec... | {
"body": "@Override\n\tpublic synchronized void launch() throws StartFailedException {\n\t\tif (running.get()) {\n\t\t\tloggingValue.get().warn(\"ClientStart is already started! Cannot start an already started NetworkInterface!\");\n\t\t}\n\t\tSocketAddress socketAddress = addressValue.get();\n\t\tif (addressValue.i... | {
"created": null,
"fork": null,
"fork_count": 1,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 85692970,
"size": 2370,
"stargazer_count": 9,
"stars": null,
"updates": null,
"url": "https://github.com/ThorbenKuck/NetCom2"
} |
85692970_1 | {
"fields": [
{
"declarator": "semaphore = new Semaphore(1)",
"modifier": "final",
"original_string": "final Semaphore semaphore = new Semaphore(1);",
"type": "Semaphore",
"var_name": "semaphore"
}
],
"file": "rmi/src/test/java/com/github/thorbenkuck/netcom2/network/client/Ja... | {
"body": "@Test(expected = PipelineAccessException.class)\n\tpublic void setFallbackRunnable() throws Throwable {\n\t\t// Arrange\n\t\tUUID id = UUID.randomUUID();\n\t\tSender sender = mock(Sender.class);\n\t\tdoThrow(new SendFailedException(\"MockedSendFailed\")).when(sender).objectToServer(any());\n\t\tRemoteAcces... | {
"fields": [
{
"declarator": "sender",
"modifier": "private final",
"original_string": "private final Sender sender;",
"type": "Sender",
"var_name": "sender"
},
{
"declarator": "remoteAccessBlockRegistration",
"modifier": "private final",
"original_string":... | {
"body": "public void setFallbackRunnable(Runnable fallbackRunnable) {\n\t\tsynchronized (this) {\n\t\t\tthis.fallbackRunnable = fallbackRunnable;\n\t\t\tthis.fallbackInstance = null;\n\t\t}\n\t}",
"class_method_signature": "JavaRemoteInformationInvocationHandler.setFallbackRunnable(Runnable fallbackRunnable)",
... | {
"created": null,
"fork": null,
"fork_count": 1,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 85692970,
"size": 2370,
"stargazer_count": 9,
"stars": null,
"updates": null,
"url": "https://github.com/ThorbenKuck/NetCom2"
} |
85692970_25 | {
"fields": [
{
"declarator": "registration",
"modifier": "private",
"original_string": "private CommunicationRegistration registration;",
"type": "CommunicationRegistration",
"var_name": "registration"
}
],
"file": "core/src/test/java/com/github/thorbenkuck/netcom2/network/s... | {
"body": "@Test\n\tpublic void getSession() throws Exception {\n\t\t// Arrange\n\t\tNativeClient client = new NativeClient(registration);\n\n\t\t// Act\n\t\tSession session = client.getSession();\n\n\t\t// Assert\n\t\tassertNull(session);\n\t}",
"class_method_signature": "NativeClientTest.getSession()",
"constru... | {
"fields": [
{
"declarator": "communicationRegistration",
"modifier": "private final",
"original_string": "private final CommunicationRegistration communicationRegistration;",
"type": "CommunicationRegistration",
"var_name": "communicationRegistration"
},
{
"declarator... | {
"body": "@Override\n\tpublic Session getSession() {\n\t\tsynchronized (sessionValue) {\n\t\t\treturn sessionValue.get();\n\t\t}\n\t}",
"class_method_signature": "NativeClient.getSession()",
"constructor": false,
"full_signature": "@Override public Session getSession()",
"identifier": "getSession",
"invoca... | {
"created": null,
"fork": null,
"fork_count": 1,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 85692970,
"size": 2370,
"stargazer_count": 9,
"stars": null,
"updates": null,
"url": "https://github.com/ThorbenKuck/NetCom2"
} |
85692970_33 | {
"fields": [
{
"declarator": "registration",
"modifier": "private",
"original_string": "private CommunicationRegistration registration;",
"type": "CommunicationRegistration",
"var_name": "registration"
}
],
"file": "core/src/test/java/com/github/thorbenkuck/netcom2/network/s... | {
"body": "@Test\n\tpublic void getID() throws Exception {\n\t\t// Arrange\n\t\tNativeClient client = new NativeClient(registration);\n\n\t\t// Act\n\t\tClientID id = client.getID();\n\n\t\t// Assert\n\t\tassertTrue(ClientID.isEmpty(id));\n\t}",
"class_method_signature": "NativeClientTest.getID()",
"constructor":... | {
"fields": [
{
"declarator": "communicationRegistration",
"modifier": "private final",
"original_string": "private final CommunicationRegistration communicationRegistration;",
"type": "CommunicationRegistration",
"var_name": "communicationRegistration"
},
{
"declarator... | {
"body": "@Override\n\tpublic ClientID getID() {\n\t\treturn clientID;\n\t}",
"class_method_signature": "NativeClient.getID()",
"constructor": false,
"full_signature": "@Override public ClientID getID()",
"identifier": "getID",
"invocations": [],
"modifiers": "@Override public",
"parameters": "()",
"... | {
"created": null,
"fork": null,
"fork_count": 1,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 85692970,
"size": 2370,
"stargazer_count": 9,
"stars": null,
"updates": null,
"url": "https://github.com/ThorbenKuck/NetCom2"
} |
85692970_64 | {
"fields": [],
"file": "cache/src/test/java/com/github/thorbenkuck/netcom2/network/shared/cache/NativeCacheTest.java",
"identifier": "NativeCacheTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n\tpublic void clearObserversNoObserver() throws Exception {\n\t\t// Arrange\n\t\tNativeCache cache = new NativeCache();\n\n\t\t// Act\n\t\tcache.clearObservers();\n\n\t\t// Assert\n\t\tassertEquals(0, cache.countObservers());\n\t}",
"class_method_signature": "NativeCacheTest.clearObserversNoObserv... | {
"fields": [
{
"declarator": "internals = new HashMap<>()",
"modifier": "private final",
"original_string": "private final Map<Class<?>, Object> internals = new HashMap<>();",
"type": "Map<Class<?>, Object>",
"var_name": "internals"
},
{
"declarator": "semaphore = new ... | {
"body": "@Override\n\tpublic void clearObservers() {\n\t\tlogging.trace(\"Deleting all Observers currently registered ..\");\n\t\tlogging.trace(\"#Observers before: \" + countObservers());\n\t\tdeleteObservers();\n\t\tlogging.trace(\"#Observers after: \" + countObservers());\n\t}",
"class_method_signature": "Nati... | {
"created": null,
"fork": null,
"fork_count": 1,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 85692970,
"size": 2370,
"stargazer_count": 9,
"stars": null,
"updates": null,
"url": "https://github.com/ThorbenKuck/NetCom2"
} |
85692970_48 | {
"fields": [
{
"declarator": "bridge",
"modifier": "private",
"original_string": "private SendBridge bridge;",
"type": "SendBridge",
"var_name": "bridge"
}
],
"file": "core/src/test/java/com/github/thorbenkuck/netcom2/network/shared/NativeSessionTest.java",
"identifier": "... | {
"body": "@Test\n\tpublic void getProperties() throws Exception {\n\t\t// Arrange\n\t\tNativeSession session = new NativeSession(bridge);\n\n\t\t// Act\n\t\tProperties properties = session.getProperties();\n\n\t\t// Assert\n\t\tassertTrue(properties.isEmpty());\n\t}",
"class_method_signature": "NativeSessionTest.g... | {
"fields": [
{
"declarator": "sendBridge",
"modifier": "private final",
"original_string": "private final SendBridge sendBridge;",
"type": "SendBridge",
"var_name": "sendBridge"
},
{
"declarator": "identifiedValue = Value.synchronize(false)",
"modifier": "private... | {
"body": "@Override\n\tpublic Properties getProperties() {\n\t\treturn propertiesValue.get();\n\t}",
"class_method_signature": "NativeSession.getProperties()",
"constructor": false,
"full_signature": "@Override public Properties getProperties()",
"identifier": "getProperties",
"invocations": [
"get"
... | {
"created": null,
"fork": null,
"fork_count": 1,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 85692970,
"size": 2370,
"stargazer_count": 9,
"stars": null,
"updates": null,
"url": "https://github.com/ThorbenKuck/NetCom2"
} |
85692970_103 | {
"fields": [],
"file": "main/src/test/java/com/github/thorbenkuck/netcom2/network/server/NativeClientListTest.java",
"identifier": "NativeClientListTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n\t@Ignore\n\t// TODO change to correct behaviour!\n\tpublic void close() throws Exception {\n\t\t//Arrange\n\t\tClient aClient = mock(Client.class);\n\t\twhen(aClient.getID()).thenReturn(ClientID.fromString(UUID_SEED_1));\n\t\tClient anotherClient = mock(Client.class);\n\t\twhen(anotherClient.getID(... | {
"fields": [
{
"declarator": "core",
"modifier": "private final",
"original_string": "private final List<Client> core;",
"type": "List<Client>",
"var_name": "core"
},
{
"declarator": "openValue",
"modifier": "private final",
"original_string": "private fina... | {
"body": "@Override\n\tpublic final void close() {\n\t\tlogging.debug(\"Closing \" + this);\n\t\topenValue.set(false);\n\t}",
"class_method_signature": "NativeClientList.close()",
"constructor": false,
"full_signature": "@Override public final void close()",
"identifier": "close",
"invocations": [
"deb... | {
"created": null,
"fork": null,
"fork_count": 1,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 85692970,
"size": 2370,
"stargazer_count": 9,
"stars": null,
"updates": null,
"url": "https://github.com/ThorbenKuck/NetCom2"
} |
85692970_91 | {
"fields": [
{
"declarator": "socketAddress = new InetSocketAddress(8888)",
"modifier": "private static final",
"original_string": "private static final InetSocketAddress socketAddress = new InetSocketAddress(8888);",
"type": "InetSocketAddress",
"var_name": "socketAddress"
},
... | {
"body": "@Test\n\tpublic void cache() throws Exception {\n\t\t// Arrange\n\n\t\t// Act\n\t\tCache cache = serverStart.cache();\n\n\t\t// Assert\n\t\tassertNotNull(cache);\n\t}",
"class_method_signature": "NativeServerStartTest.cache()",
"constructor": false,
"full_signature": "@Test public void cache()",
"i... | {
"fields": [
{
"declarator": "addressValue = Value.emptySynchronized()",
"modifier": "private final",
"original_string": "private final Value<InetSocketAddress> addressValue = Value.emptySynchronized();",
"type": "Value<InetSocketAddress>",
"var_name": "addressValue"
},
{
... | {
"body": "@Override\n\tpublic final Cache cache() {\n\t\treturn cache;\n\t}",
"class_method_signature": "NativeServerStart.cache()",
"constructor": false,
"full_signature": "@Override public final Cache cache()",
"identifier": "cache",
"invocations": [],
"modifiers": "@Override public final",
"paramete... | {
"created": null,
"fork": null,
"fork_count": 1,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 85692970,
"size": 2370,
"stargazer_count": 9,
"stars": null,
"updates": null,
"url": "https://github.com/ThorbenKuck/NetCom2"
} |
85692970_29 | {
"fields": [
{
"declarator": "registration",
"modifier": "private",
"original_string": "private CommunicationRegistration registration;",
"type": "CommunicationRegistration",
"var_name": "registration"
}
],
"file": "core/src/test/java/com/github/thorbenkuck/netcom2/network/s... | {
"body": "@Test\n\t@Ignore\n\t// TODO Change to current signature\n\tpublic void send2() throws Exception {\n\t\t// Arrange\n\t\tNativeClient client = new NativeClient(registration);\n\t\tConnection connection = mock(Connection.class);\n\t\twhen(connection.isOpen()).thenReturn(true);\n\t\twhen(connection.isConnected... | {
"fields": [
{
"declarator": "communicationRegistration",
"modifier": "private final",
"original_string": "private final CommunicationRegistration communicationRegistration;",
"type": "CommunicationRegistration",
"var_name": "communicationRegistration"
},
{
"declarator... | {
"body": "@Override\n\tpublic void send(Object object, Connection connection) {\n\t\tlogging.debug(\"Sending over the provided Connection\");\n\t\tlogging.trace(\"Converting set Object to writable String\");\n\t\tString string = convert(object);\n\t\tlogging.trace(\"Extracting send as Task to the NetComThreadPool\")... | {
"created": null,
"fork": null,
"fork_count": 1,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 85692970,
"size": 2370,
"stargazer_count": 9,
"stars": null,
"updates": null,
"url": "https://github.com/ThorbenKuck/NetCom2"
} |
85692970_87 | {
"fields": [
{
"declarator": "socketAddress = new InetSocketAddress(8888)",
"modifier": "private static final",
"original_string": "private static final InetSocketAddress socketAddress = new InetSocketAddress(8888);",
"type": "InetSocketAddress",
"var_name": "socketAddress"
},
... | {
"body": "@Test\n\tpublic void acceptAllNextClientsNotLaunched() throws Exception {\n\t\t// Arrange\n\n\t\t// Act\n\t\tserverStart.acceptAllNextClients();\n\n\t\t// Assert\n\t\tverify(logging, atLeastOnce()).trace(any(String.class));\n\t}",
"class_method_signature": "NativeServerStartTest.acceptAllNextClientsNotLa... | {
"fields": [
{
"declarator": "addressValue = Value.emptySynchronized()",
"modifier": "private final",
"original_string": "private final Value<InetSocketAddress> addressValue = Value.emptySynchronized();",
"type": "Value<InetSocketAddress>",
"var_name": "addressValue"
},
{
... | {
"body": "@Override\n\tpublic final void acceptAllNextClients() throws ClientConnectionFailedException {\n\t\tfinal Logging logging = loggingValue.get();\n\t\tfinal Thread thread = Thread.currentThread();\n\t\tlogging.debug(\"Accepting all connecting Clients on \" + thread + \". This Thread will be blocked.\");\n\t\... | {
"created": null,
"fork": null,
"fork_count": 1,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 85692970,
"size": 2370,
"stargazer_count": 9,
"stars": null,
"updates": null,
"url": "https://github.com/ThorbenKuck/NetCom2"
} |
85692970_68 | {
"fields": [
{
"declarator": "clientStart",
"modifier": "private",
"original_string": "private NativeClientStart clientStart;",
"type": "NativeClientStart",
"var_name": "clientStart"
},
{
"declarator": "client",
"modifier": "private",
"original_string": "pr... | {
"body": "@Test\n\tpublic void objectToServer() throws Exception {\n\t\t// Arrange\n\t\tNativeSender sender = new NativeSender();\n\t\tsender.setup(clientStart);\n\t\tTestSendObject testSendObject = new TestSendObject();\n\n\t\t// Act\n\t\tsender.objectToServer(testSendObject);\n\n\t\t// Assert\n\t\tverify(client).s... | {
"fields": [
{
"declarator": "logging = Logging.unified()",
"modifier": "private final",
"original_string": "private final Logging logging = Logging.unified();",
"type": "Logging",
"var_name": "logging"
},
{
"declarator": "clientValue = Value.emptySynchronized()",
... | {
"body": "@Override\n\tpublic void objectToServer(Object o) {\n\t\tclientValue.get()\n\t\t\t\t.send(o);\n\t}",
"class_method_signature": "NativeSender.objectToServer(Object o)",
"constructor": false,
"full_signature": "@Override public void objectToServer(Object o)",
"identifier": "objectToServer",
"invoca... | {
"created": null,
"fork": null,
"fork_count": 1,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 85692970,
"size": 2370,
"stargazer_count": 9,
"stars": null,
"updates": null,
"url": "https://github.com/ThorbenKuck/NetCom2"
} |
85692970_13 | {
"fields": [],
"file": "rmi/src/test/java/com/github/thorbenkuck/netcom2/network/server/NativeRemoteObjectRegistrationTest.java",
"identifier": "NativeRemoteObjectRegistrationTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test(expected = IllegalArgumentException.class)\n\tpublic void hookNull() throws Exception {\n\t\t//Arrange\n\t\tNativeRemoteObjectRegistration remoteObjectRegistration = new NativeRemoteObjectRegistration();\n\n\t\t//Act\n\t\tremoteObjectRegistration.hook(null);\n\n\t\t//Assert\n\t\tfail();\n\t}",
"cla... | {
"fields": [
{
"declarator": "PRIMITIVE_MAPPING",
"modifier": "private static final",
"original_string": "private static final Map<Class<?>, Class<?>> PRIMITIVE_MAPPING;",
"type": "Map<Class<?>, Class<?>>",
"var_name": "PRIMITIVE_MAPPING"
},
{
"declarator": "mapping = ... | {
"body": "@Override\n\tpublic final void hook(final Object object) {\n\t\tNetCom2Utils.parameterNotNull(object);\n\t\tfinal List<Class<?>> classList = new ArrayList<>(Arrays.asList(object.getClass().getInterfaces()));\n\t\tclassList.add(object.getClass().getSuperclass());\n\t\tclassList.add(object.getClass());\n\t\t... | {
"created": null,
"fork": null,
"fork_count": 1,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 85692970,
"size": 2370,
"stargazer_count": 9,
"stars": null,
"updates": null,
"url": "https://github.com/ThorbenKuck/NetCom2"
} |
85692970_44 | {
"fields": [
{
"declarator": "bridge",
"modifier": "private",
"original_string": "private SendBridge bridge;",
"type": "SendBridge",
"var_name": "bridge"
}
],
"file": "core/src/test/java/com/github/thorbenkuck/netcom2/network/shared/NativeSessionTest.java",
"identifier": "... | {
"body": "@Test\n\tpublic void setIdentified() throws Exception {\n\t\t// Arrange\n\t\tNativeSession session = new NativeSession(bridge);\n\n\t\t// Act\n\t\tsession.setIdentified(true);\n\n\t\t// Assert\n\t\tassertTrue(session.isIdentified());\n\t}",
"class_method_signature": "NativeSessionTest.setIdentified()",
... | {
"fields": [
{
"declarator": "sendBridge",
"modifier": "private final",
"original_string": "private final SendBridge sendBridge;",
"type": "SendBridge",
"var_name": "sendBridge"
},
{
"declarator": "identifiedValue = Value.synchronize(false)",
"modifier": "private... | {
"body": "@Override\n\tpublic void setIdentified(boolean identified) {\n\t\tidentifiedValue.set(identified);\n\t}",
"class_method_signature": "NativeSession.setIdentified(boolean identified)",
"constructor": false,
"full_signature": "@Override public void setIdentified(boolean identified)",
"identifier": "se... | {
"created": null,
"fork": null,
"fork_count": 1,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 85692970,
"size": 2370,
"stargazer_count": 9,
"stars": null,
"updates": null,
"url": "https://github.com/ThorbenKuck/NetCom2"
} |
85692970_52 | {
"fields": [
{
"declarator": "bridge",
"modifier": "private",
"original_string": "private SendBridge bridge;",
"type": "SendBridge",
"var_name": "bridge"
}
],
"file": "core/src/test/java/com/github/thorbenkuck/netcom2/network/shared/NativeSessionTest.java",
"identifier": "... | {
"body": "@Test(expected = IllegalArgumentException.class)\n\tpublic void sendNull() throws Exception {\n\t\t// Arrange\n\t\tNativeSession session = new NativeSession(bridge);\n\n\t\t// Act\n\t\tsession.send(null);\n\n\t\t// Assert\n\t\tfail();\n\t}",
"class_method_signature": "NativeSessionTest.sendNull()",
"co... | {
"fields": [
{
"declarator": "sendBridge",
"modifier": "private final",
"original_string": "private final SendBridge sendBridge;",
"type": "SendBridge",
"var_name": "sendBridge"
},
{
"declarator": "identifiedValue = Value.synchronize(false)",
"modifier": "private... | {
"body": "@Override\n\tpublic void send(Object o) {\n\t\tNetCom2Utils.parameterNotNull(o);\n\t\tsendBridge.send(o);\n\t}",
"class_method_signature": "NativeSession.send(Object o)",
"constructor": false,
"full_signature": "@Override public void send(Object o)",
"identifier": "send",
"invocations": [
"pa... | {
"created": null,
"fork": null,
"fork_count": 1,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 85692970,
"size": 2370,
"stargazer_count": 9,
"stars": null,
"updates": null,
"url": "https://github.com/ThorbenKuck/NetCom2"
} |
85692970_100 | {
"fields": [
{
"declarator": "socketAddress = new InetSocketAddress(8888)",
"modifier": "private static final",
"original_string": "private static final InetSocketAddress socketAddress = new InetSocketAddress(8888);",
"type": "InetSocketAddress",
"var_name": "socketAddress"
},
... | {
"body": "@Test(expected = UnknownClientException.class)\n\tpublic void createNewConnectionWithoutClient() throws Exception {\n\t\t// Arrange\n\n\t\t// Act\n\t\tAwaiting awaiting = serverStart.createNewConnection(mock(Session.class), TestConnectionKey.class);\n\n\t\t// Assert\n\t\tfail();\n\t}",
"class_method_sign... | {
"fields": [
{
"declarator": "addressValue = Value.emptySynchronized()",
"modifier": "private final",
"original_string": "private final Value<InetSocketAddress> addressValue = Value.emptySynchronized();",
"type": "Value<InetSocketAddress>",
"var_name": "addressValue"
},
{
... | {
"body": "@Override\n\tpublic final Awaiting createNewConnection(final Session session, final Class key) {\n\t\tfinal Client client = clientList.getClient(session).orElseThrow(() -> new UnknownClientException(\"No Client found for \" + session));\n\t\treturn client.createNewConnection(key);\n\t}",
"class_method_si... | {
"created": null,
"fork": null,
"fork_count": 1,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 85692970,
"size": 2370,
"stargazer_count": 9,
"stars": null,
"updates": null,
"url": "https://github.com/ThorbenKuck/NetCom2"
} |
85692970_92 | {
"fields": [
{
"declarator": "socketAddress = new InetSocketAddress(8888)",
"modifier": "private static final",
"original_string": "private static final InetSocketAddress socketAddress = new InetSocketAddress(8888);",
"type": "InetSocketAddress",
"var_name": "socketAddress"
},
... | {
"body": "@Test\n\tpublic void disconnect() throws Exception {\n\t\t// Arrange\n\t\tserverStart.launch();\n\n\t\t// Act\n\t\tserverStart.disconnect();\n\n\t\t// Assert\n\t\tassertFalse(serverStart.running());\n\t}",
"class_method_signature": "NativeServerStartTest.disconnect()",
"constructor": false,
"full_sig... | {
"fields": [
{
"declarator": "addressValue = Value.emptySynchronized()",
"modifier": "private final",
"original_string": "private final Value<InetSocketAddress> addressValue = Value.emptySynchronized();",
"type": "Value<InetSocketAddress>",
"var_name": "addressValue"
},
{
... | {
"body": "@Override\n\tpublic final void disconnect() {\n\t\tsoftStop();\n\t\tconnectorCoreValue.get().disconnect();\n\t}",
"class_method_signature": "NativeServerStart.disconnect()",
"constructor": false,
"full_signature": "@Override public final void disconnect()",
"identifier": "disconnect",
"invocation... | {
"created": null,
"fork": null,
"fork_count": 1,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 85692970,
"size": 2370,
"stargazer_count": 9,
"stars": null,
"updates": null,
"url": "https://github.com/ThorbenKuck/NetCom2"
} |
85692970_84 | {
"fields": [
{
"declarator": "socketAddress = new InetSocketAddress(8888)",
"modifier": "private static final",
"original_string": "private static final InetSocketAddress socketAddress = new InetSocketAddress(8888);",
"type": "InetSocketAddress",
"var_name": "socketAddress"
},
... | {
"body": "@Test\n\tpublic void launch() throws Exception {\n\t\t// Arrange\n\n\t\t// Act\n\t\tserverStart.launch();\n\n\t\t// Assert\n\t\tassertTrue(serverStart.running());\n\t\tverify(connectorCore).establishConnection(any());\n\t\tverify(connectorCore, never()).disconnect();\n\t}",
"class_method_signature": "Nat... | {
"fields": [
{
"declarator": "addressValue = Value.emptySynchronized()",
"modifier": "private final",
"original_string": "private final Value<InetSocketAddress> addressValue = Value.emptySynchronized();",
"type": "Value<InetSocketAddress>",
"var_name": "addressValue"
},
{
... | {
"body": "@Override\n\tpublic final synchronized void launch() throws StartFailedException {\n\t\tif (running.get()) {\n\t\t\tloggingValue.get().warn(\"ServerStart is already started! Cannot start an already started NetworkInterface!\");\n\t\t}\n\t\tfinal Logging logging = loggingValue.get();\n\t\tlogging.debug(\"La... | {
"created": null,
"fork": null,
"fork_count": 1,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 85692970,
"size": 2370,
"stargazer_count": 9,
"stars": null,
"updates": null,
"url": "https://github.com/ThorbenKuck/NetCom2"
} |
85692970_10 | {
"fields": [],
"file": "rmi/src/test/java/com/github/thorbenkuck/netcom2/network/client/JavaInvocationHandlerProducerTest.java",
"identifier": "JavaInvocationHandlerProducerTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test(expected = IllegalArgumentException.class)\n\tpublic void produceClassNull() throws Exception {\n\t\t// Arrange\n\t\tJavaInvocationHandlerProducer producer = new JavaInvocationHandlerProducer(mock(Sender.class), mock(RemoteAccessBlockRegistration.class));\n\n\t\t// Act\n\t\tproducer.produce(UUID.from... | {
"fields": [
{
"declarator": "sender",
"modifier": "@APILevel\n\tprivate final",
"original_string": "@APILevel\n\tprivate final Sender sender;",
"type": "Sender",
"var_name": "sender"
},
{
"declarator": "remoteAccessBlockRegistration",
"modifier": "@APILevel\n\tp... | {
"body": "@Override\n\tpublic <T> JavaRemoteInformationInvocationHandler<T> produce(final UUID uuid, final Class<T> clazz) {\n\t\tNetCom2Utils.parameterNotNull(clazz, uuid);\n\t\treturn new JavaRemoteInformationInvocationHandler<>(sender, remoteAccessBlockRegistration, clazz, uuid);\n\t}",
"class_method_signature"... | {
"created": null,
"fork": null,
"fork_count": 1,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 85692970,
"size": 2370,
"stargazer_count": 9,
"stars": null,
"updates": null,
"url": "https://github.com/ThorbenKuck/NetCom2"
} |
85692970_47 | {
"fields": [
{
"declarator": "bridge",
"modifier": "private",
"original_string": "private SendBridge bridge;",
"type": "SendBridge",
"var_name": "bridge"
}
],
"file": "core/src/test/java/com/github/thorbenkuck/netcom2/network/shared/NativeSessionTest.java",
"identifier": "... | {
"body": "@Test(expected = IllegalArgumentException.class)\n\tpublic void setIdentifierNull() throws Exception {\n\t\t// Arrange\n\t\tNativeSession session = new NativeSession(bridge);\n\n\t\t// Act\n\t\tsession.setIdentifier(null);\n\n\t\t// Assert\n\t\tfail();\n\t}",
"class_method_signature": "NativeSessionTest.... | {
"fields": [
{
"declarator": "sendBridge",
"modifier": "private final",
"original_string": "private final SendBridge sendBridge;",
"type": "SendBridge",
"var_name": "sendBridge"
},
{
"declarator": "identifiedValue = Value.synchronize(false)",
"modifier": "private... | {
"body": "@Override\n\tpublic void setIdentifier(String identifier) {\n\t\tidentifierValue.set(identifier);\n\t}",
"class_method_signature": "NativeSession.setIdentifier(String identifier)",
"constructor": false,
"full_signature": "@Override public void setIdentifier(String identifier)",
"identifier": "setId... | {
"created": null,
"fork": null,
"fork_count": 1,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 85692970,
"size": 2370,
"stargazer_count": 9,
"stars": null,
"updates": null,
"url": "https://github.com/ThorbenKuck/NetCom2"
} |
85692970_51 | {
"fields": [
{
"declarator": "bridge",
"modifier": "private",
"original_string": "private SendBridge bridge;",
"type": "SendBridge",
"var_name": "bridge"
}
],
"file": "core/src/test/java/com/github/thorbenkuck/netcom2/network/shared/NativeSessionTest.java",
"identifier": "... | {
"body": "@Test\n\tpublic void send() throws Exception {\n\t\t// Arrange\n\t\tNativeSession session = new NativeSession(bridge);\n\t\tTestObject testObject = new TestObject();\n\n\t\t// Act\n\t\tsession.send(testObject);\n\n\t\t// Assert\n\t\tverify(bridge).send(eq(testObject));\n\t}",
"class_method_signature": "N... | {
"fields": [
{
"declarator": "sendBridge",
"modifier": "private final",
"original_string": "private final SendBridge sendBridge;",
"type": "SendBridge",
"var_name": "sendBridge"
},
{
"declarator": "identifiedValue = Value.synchronize(false)",
"modifier": "private... | {
"body": "@Override\n\tpublic void send(Object o) {\n\t\tNetCom2Utils.parameterNotNull(o);\n\t\tsendBridge.send(o);\n\t}",
"class_method_signature": "NativeSession.send(Object o)",
"constructor": false,
"full_signature": "@Override public void send(Object o)",
"identifier": "send",
"invocations": [
"pa... | {
"created": null,
"fork": null,
"fork_count": 1,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 85692970,
"size": 2370,
"stargazer_count": 9,
"stars": null,
"updates": null,
"url": "https://github.com/ThorbenKuck/NetCom2"
} |
85692970_71 | {
"fields": [
{
"declarator": "clientStart",
"modifier": "private",
"original_string": "private NativeClientStart clientStart;",
"type": "NativeClientStart",
"var_name": "clientStart"
},
{
"declarator": "client",
"modifier": "private",
"original_string": "pr... | {
"body": "@Test\n\tpublic void reset() throws Exception {\n\t\t// Arrange\n\t\tNativeSender sender = new NativeSender();\n\t\tsender.setup(clientStart);\n\t\tTestCacheObserver<TestSendObject> observer = new TestCacheObserver<>(TestSendObject.class);\n\n\t\t// Act\n\t\tsender.registrationToServer(TestSendObject.class... | {
"fields": [
{
"declarator": "logging = Logging.unified()",
"modifier": "private final",
"original_string": "private final Logging logging = Logging.unified();",
"type": "Logging",
"var_name": "logging"
},
{
"declarator": "clientValue = Value.emptySynchronized()",
... | {
"body": "@Override\n\tpublic void reset() {\n\t\tsynchronized (observerLimbo) {\n\t\t\tobserverLimbo.forEach((key, value) -> cache.removeCacheObserver(value));\n\t\t\tobserverLimbo.clear();\n\t\t}\n\t}",
"class_method_signature": "NativeSender.reset()",
"constructor": false,
"full_signature": "@Override publi... | {
"created": null,
"fork": null,
"fork_count": 1,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 85692970,
"size": 2370,
"stargazer_count": 9,
"stars": null,
"updates": null,
"url": "https://github.com/ThorbenKuck/NetCom2"
} |
85692970_26 | {
"fields": [
{
"declarator": "registration",
"modifier": "private",
"original_string": "private CommunicationRegistration registration;",
"type": "CommunicationRegistration",
"var_name": "registration"
}
],
"file": "core/src/test/java/com/github/thorbenkuck/netcom2/network/s... | {
"body": "@Test\n\tpublic void setSession() throws Exception {\n\t\t// Arrange\n\t\tNativeClient client = new NativeClient(registration);\n\t\tSession prev = client.getSession();\n\n\t\t// Act\n\t\tclient.setSession(mock(Session.class));\n\n\t\t// Assert\n\t\tassertNotEquals(prev, client.getSession());\n\t}",
"cla... | {
"fields": [
{
"declarator": "communicationRegistration",
"modifier": "private final",
"original_string": "private final CommunicationRegistration communicationRegistration;",
"type": "CommunicationRegistration",
"var_name": "communicationRegistration"
},
{
"declarator... | {
"body": "@Override\n\tpublic void setSession(final Session session) {\n\t\tsynchronized (sessionValue) {\n\t\t\tsessionValue.set(session);\n\t\t}\n\t}",
"class_method_signature": "NativeClient.setSession(final Session session)",
"constructor": false,
"full_signature": "@Override public void setSession(final S... | {
"created": null,
"fork": null,
"fork_count": 1,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 85692970,
"size": 2370,
"stargazer_count": 9,
"stars": null,
"updates": null,
"url": "https://github.com/ThorbenKuck/NetCom2"
} |
85692970_2 | {
"fields": [
{
"declarator": "semaphore = new Semaphore(1)",
"modifier": "final",
"original_string": "final Semaphore semaphore = new Semaphore(1);",
"type": "Semaphore",
"var_name": "semaphore"
}
],
"file": "rmi/src/test/java/com/github/thorbenkuck/netcom2/network/client/Ja... | {
"body": "@Test\n\tpublic void setFallbackInstance() throws Throwable {\n\t\t// Arrange\n\t\tUUID id = UUID.randomUUID();\n\t\tSender sender = mock(Sender.class);\n\t\tAtomicBoolean done = new AtomicBoolean(false);\n\t\tdoThrow(new SendFailedException(\"MockedSendFailed\")).when(sender).objectToServer(any());\n\t\tR... | {
"fields": [
{
"declarator": "sender",
"modifier": "private final",
"original_string": "private final Sender sender;",
"type": "Sender",
"var_name": "sender"
},
{
"declarator": "remoteAccessBlockRegistration",
"modifier": "private final",
"original_string":... | {
"body": "public <S extends T> void setFallbackInstance(S fallbackInstance) {\n\t\tsynchronized (this) {\n\t\t\tthis.fallbackInstance = fallbackInstance;\n\t\t\tthis.fallbackRunnable = null;\n\t\t}\n\t}",
"class_method_signature": "JavaRemoteInformationInvocationHandler.setFallbackInstance(S fallbackInstance)",
... | {
"created": null,
"fork": null,
"fork_count": 1,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 85692970,
"size": 2370,
"stargazer_count": 9,
"stars": null,
"updates": null,
"url": "https://github.com/ThorbenKuck/NetCom2"
} |
85692970_30 | {
"fields": [
{
"declarator": "registration",
"modifier": "private",
"original_string": "private CommunicationRegistration registration;",
"type": "CommunicationRegistration",
"var_name": "registration"
}
],
"file": "core/src/test/java/com/github/thorbenkuck/netcom2/network/s... | {
"body": "@Test\n\tpublic void getConnectionNotSet() throws Exception {\n\t\t// Arrange\n\t\tNativeClient client = new NativeClient(registration);\n\n\t\t// Act\n\t\tOptional<Connection> optional = client.getConnection(TestConnectionKey.class);\n\n\t\t// Assert\n\t\tassertFalse(optional.isPresent());\n\t}",
"class... | {
"fields": [
{
"declarator": "communicationRegistration",
"modifier": "private final",
"original_string": "private final CommunicationRegistration communicationRegistration;",
"type": "CommunicationRegistration",
"var_name": "communicationRegistration"
},
{
"declarator... | {
"body": "@Override\n\tpublic Optional<Connection> getConnection(Class connectionKey) {\n\t\tsynchronized (connectionMap) {\n\t\t\treturn Optional.ofNullable(connectionMap.get(connectionKey));\n\t\t}\n\t}",
"class_method_signature": "NativeClient.getConnection(Class connectionKey)",
"constructor": false,
"full... | {
"created": null,
"fork": null,
"fork_count": 1,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 85692970,
"size": 2370,
"stargazer_count": 9,
"stars": null,
"updates": null,
"url": "https://github.com/ThorbenKuck/NetCom2"
} |
85692970_67 | {
"fields": [],
"file": "cache/src/test/java/com/github/thorbenkuck/netcom2/network/shared/cache/NativeCacheTest.java",
"identifier": "NativeCacheTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n\tpublic void countObserversTwo() throws Exception {\n\t\t// Arrange\n\t\tNativeCache cache = new NativeCache();\n\t\tGeneralCacheObserver observer = new GeneralCacheObserver() {\n\t\t\t@Override\n\t\t\tpublic void newEntry(final Object o, final CacheObservable observable) {\n\n\t\t\t}\n\n\t\t\t@Ove... | {
"fields": [
{
"declarator": "internals = new HashMap<>()",
"modifier": "private final",
"original_string": "private final Map<Class<?>, Object> internals = new HashMap<>();",
"type": "Map<Class<?>, Object>",
"var_name": "internals"
},
{
"declarator": "semaphore = new ... | {
"body": "@Override\n\tpublic void addGeneralObserver(final GeneralCacheObserver observer) {\n\t\tlogging.debug(\"Adding Observer(\" + observer + \") to \" + toString());\n\t\tlogging.warn(\"It is recommended to use \" + CacheObserver.class);\n\t\tNetCom2Utils.parameterNotNull(observer);\n\t\taddObserver(observer);\... | {
"created": null,
"fork": null,
"fork_count": 1,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 85692970,
"size": 2370,
"stargazer_count": 9,
"stars": null,
"updates": null,
"url": "https://github.com/ThorbenKuck/NetCom2"
} |
85692970_88 | {
"fields": [
{
"declarator": "socketAddress = new InetSocketAddress(8888)",
"modifier": "private static final",
"original_string": "private static final InetSocketAddress socketAddress = new InetSocketAddress(8888);",
"type": "InetSocketAddress",
"var_name": "socketAddress"
},
... | {
"body": "@Test\n\tpublic void setPort() throws Exception {\n\t\t// Arrange\n\n\t\t// Act\n\t\tserverStart.setPort(1);\n\n\t\t// Assert\n\t\tassertEquals(1, serverStart.getPort());\n\t}",
"class_method_signature": "NativeServerStartTest.setPort()",
"constructor": false,
"full_signature": "@Test public void set... | {
"fields": [
{
"declarator": "addressValue = Value.emptySynchronized()",
"modifier": "private final",
"original_string": "private final Value<InetSocketAddress> addressValue = Value.emptySynchronized();",
"type": "Value<InetSocketAddress>",
"var_name": "addressValue"
},
{
... | {
"body": "@Override\n\tpublic final void setPort(final int to) {\n\t\tif (running.get()) {\n\t\t\treturn;\n\t\t}\n\t\tsynchronized (addressValue) {\n\t\t\tfinal InetSocketAddress current = addressValue.get();\n\t\t\taddressValue.set(new InetSocketAddress(current.getAddress(), to));\n\t\t}\n\t}",
"class_method_sign... | {
"created": null,
"fork": null,
"fork_count": 1,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 85692970,
"size": 2370,
"stargazer_count": 9,
"stars": null,
"updates": null,
"url": "https://github.com/ThorbenKuck/NetCom2"
} |
85692970_66 | {
"fields": [],
"file": "cache/src/test/java/com/github/thorbenkuck/netcom2/network/shared/cache/NativeCacheTest.java",
"identifier": "NativeCacheTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n\tpublic void countObserversOne() throws Exception {\n\t\t// Arrange\n\t\tNativeCache cache = new NativeCache();\n\t\tGeneralCacheObserver observer = new GeneralCacheObserver() {\n\t\t\t@Override\n\t\t\tpublic void newEntry(final Object o, final CacheObservable observable) {\n\n\t\t\t}\n\n\t\t\t@Ove... | {
"fields": [
{
"declarator": "internals = new HashMap<>()",
"modifier": "private final",
"original_string": "private final Map<Class<?>, Object> internals = new HashMap<>();",
"type": "Map<Class<?>, Object>",
"var_name": "internals"
},
{
"declarator": "semaphore = new ... | {
"body": "@Override\n\tpublic void addGeneralObserver(final GeneralCacheObserver observer) {\n\t\tlogging.debug(\"Adding Observer(\" + observer + \") to \" + toString());\n\t\tlogging.warn(\"It is recommended to use \" + CacheObserver.class);\n\t\tNetCom2Utils.parameterNotNull(observer);\n\t\taddObserver(observer);\... | {
"created": null,
"fork": null,
"fork_count": 1,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 85692970,
"size": 2370,
"stargazer_count": 9,
"stars": null,
"updates": null,
"url": "https://github.com/ThorbenKuck/NetCom2"
} |
85692970_89 | {
"fields": [
{
"declarator": "socketAddress = new InetSocketAddress(8888)",
"modifier": "private static final",
"original_string": "private static final InetSocketAddress socketAddress = new InetSocketAddress(8888);",
"type": "InetSocketAddress",
"var_name": "socketAddress"
},
... | {
"body": "@Test(expected = ClientConnectionFailedException.class)\n\tpublic void acceptNextClient() throws Exception {\n\t\t// Arrange\n\t\tdoThrow(ClientConnectionFailedException.class).when(connectorCore).handleNext();\n\t\tserverStart.launch();\n\n\t\t// Act\n\t\tserverStart.acceptNextClient();\n\n\t\t// Assert\n... | {
"fields": [
{
"declarator": "addressValue = Value.emptySynchronized()",
"modifier": "private final",
"original_string": "private final Value<InetSocketAddress> addressValue = Value.emptySynchronized();",
"type": "Value<InetSocketAddress>",
"var_name": "addressValue"
},
{
... | {
"body": "@Override\n\tpublic final void acceptNextClient() throws ClientConnectionFailedException {\n\t\tfinal Logging logging = loggingValue.get();\n\t\tlogging.debug(\"Accepting next client.\");\n\t\tlogging.trace(\"Checking ConnectorCore value ..\");\n\t\tlogging.trace(\"Requesting next Client handling at Connec... | {
"created": null,
"fork": null,
"fork_count": 1,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 85692970,
"size": 2370,
"stargazer_count": 9,
"stars": null,
"updates": null,
"url": "https://github.com/ThorbenKuck/NetCom2"
} |
85692970_31 | {
"fields": [
{
"declarator": "registration",
"modifier": "private",
"original_string": "private CommunicationRegistration registration;",
"type": "CommunicationRegistration",
"var_name": "registration"
}
],
"file": "core/src/test/java/com/github/thorbenkuck/netcom2/network/s... | {
"body": "@Test\n\tpublic void getConnection() throws Exception {\n\t\t// Arrange\n\t\tNativeClient client = new NativeClient(registration);\n\t\tConnection connection = mock(Connection.class);\n\t\tclient.setConnection(TestConnectionKey.class, connection);\n\n\t\t// Act\n\t\tOptional<Connection> optional = client.g... | {
"fields": [
{
"declarator": "communicationRegistration",
"modifier": "private final",
"original_string": "private final CommunicationRegistration communicationRegistration;",
"type": "CommunicationRegistration",
"var_name": "communicationRegistration"
},
{
"declarator... | {
"body": "@Override\n\tpublic Optional<Connection> getConnection(Class connectionKey) {\n\t\tsynchronized (connectionMap) {\n\t\t\treturn Optional.ofNullable(connectionMap.get(connectionKey));\n\t\t}\n\t}",
"class_method_signature": "NativeClient.getConnection(Class connectionKey)",
"constructor": false,
"full... | {
"created": null,
"fork": null,
"fork_count": 1,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 85692970,
"size": 2370,
"stargazer_count": 9,
"stars": null,
"updates": null,
"url": "https://github.com/ThorbenKuck/NetCom2"
} |
85692970_27 | {
"fields": [
{
"declarator": "registration",
"modifier": "private",
"original_string": "private CommunicationRegistration registration;",
"type": "CommunicationRegistration",
"var_name": "registration"
}
],
"file": "core/src/test/java/com/github/thorbenkuck/netcom2/network/s... | {
"body": "@Test(expected = IllegalArgumentException.class)\n\tpublic void addDisconnectedHandlerNull() throws Exception {\n\t\t// Arrange\n\t\tNativeClient client = new NativeClient(registration);\n\n\t\t// Act\n\t\tclient.addDisconnectedHandler(null);\n\n\t\t// Assert\n\t\tfail();\n\t}",
"class_method_signature":... | {
"fields": [
{
"declarator": "communicationRegistration",
"modifier": "private final",
"original_string": "private final CommunicationRegistration communicationRegistration;",
"type": "CommunicationRegistration",
"var_name": "communicationRegistration"
},
{
"declarator... | {
"body": "@Override\n\tpublic void addDisconnectedHandler(ClientDisconnectedHandler disconnectedHandler) {\n\t\tsynchronized (disconnectedPipeline) {\n\t\t\tdisconnectedPipeline.add(disconnectedHandler);\n\t\t}\n\t}",
"class_method_signature": "NativeClient.addDisconnectedHandler(ClientDisconnectedHandler disconne... | {
"created": null,
"fork": null,
"fork_count": 1,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 85692970,
"size": 2370,
"stargazer_count": 9,
"stars": null,
"updates": null,
"url": "https://github.com/ThorbenKuck/NetCom2"
} |
85692970_3 | {
"fields": [],
"file": "rmi/src/test/java/com/github/thorbenkuck/netcom2/network/client/RemoteAccessBlockRegistrationTest.java",
"identifier": "RemoteAccessBlockRegistrationTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n\tpublic void clearSemaphore() throws Exception {\n\t\t// Arrange\n\t\tRemoteAccessBlockRegistration registration = new RemoteAccessBlockRegistration();\n\t\tUUID id = UUID.randomUUID();\n\n\t\t// Act\n\t\tSemaphore semaphore = registration.await(new RemoteAccessCommunicationRequest(\"\", Example.cl... | {
"fields": [
{
"declarator": "semaphoreMap = new HashMap<>()",
"modifier": "private final",
"original_string": "private final Map<UUID, Semaphore> semaphoreMap = new HashMap<>();",
"type": "Map<UUID, Semaphore>",
"var_name": "semaphoreMap"
},
{
"declarator": "responseM... | {
"body": "@APILevel\n\tvoid clearSemaphore(UUID uuid) {\n\t\tNetCom2Utils.parameterNotNull(uuid);\n\t\tsynchronized (semaphoreMap) {\n\t\t\tsemaphoreMap.remove(uuid);\n\t\t}\n\t}",
"class_method_signature": "RemoteAccessBlockRegistration.clearSemaphore(UUID uuid)",
"constructor": false,
"full_signature": "@API... | {
"created": null,
"fork": null,
"fork_count": 1,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 85692970,
"size": 2370,
"stargazer_count": 9,
"stars": null,
"updates": null,
"url": "https://github.com/ThorbenKuck/NetCom2"
} |
85692970_70 | {
"fields": [
{
"declarator": "clientStart",
"modifier": "private",
"original_string": "private NativeClientStart clientStart;",
"type": "NativeClientStart",
"var_name": "clientStart"
},
{
"declarator": "client",
"modifier": "private",
"original_string": "pr... | {
"body": "@Test\n\tpublic void unRegistrationToServer() throws Exception {\n\t\t// Arrange\n\t\tNativeSender sender = new NativeSender();\n\t\tsender.setup(clientStart);\n\t\tTestCacheObserver<TestSendObject> observer = new TestCacheObserver<>(TestSendObject.class);\n\n\t\t// Act\n\t\tsender.registrationToServer(Tes... | {
"fields": [
{
"declarator": "logging = Logging.unified()",
"modifier": "private final",
"original_string": "private final Logging logging = Logging.unified();",
"type": "Logging",
"var_name": "logging"
},
{
"declarator": "clientValue = Value.emptySynchronized()",
... | {
"body": "@Override\n\tpublic <T> void unRegistrationToServer(Class<T> clazz) {\n\t\tobjectToServer(new CacheUnRegistration(clazz));\n\t}",
"class_method_signature": "NativeSender.unRegistrationToServer(Class<T> clazz)",
"constructor": false,
"full_signature": "@Override public void unRegistrationToServer(Clas... | {
"created": null,
"fork": null,
"fork_count": 1,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 85692970,
"size": 2370,
"stargazer_count": 9,
"stars": null,
"updates": null,
"url": "https://github.com/ThorbenKuck/NetCom2"
} |
85692970_50 | {
"fields": [
{
"declarator": "bridge",
"modifier": "private",
"original_string": "private SendBridge bridge;",
"type": "SendBridge",
"var_name": "bridge"
}
],
"file": "core/src/test/java/com/github/thorbenkuck/netcom2/network/shared/NativeSessionTest.java",
"identifier": "... | {
"body": "@Test(expected = IllegalArgumentException.class)\n\tpublic void setPropertiesNull() throws Exception {\n\t\t// Arrange\n\t\tNativeSession session = new NativeSession(bridge);\n\n\t\t// Act\n\t\tsession.setProperties(null);\n\n\t\t// Assert\n\t\tfail();\n\t}",
"class_method_signature": "NativeSessionTest.... | {
"fields": [
{
"declarator": "sendBridge",
"modifier": "private final",
"original_string": "private final SendBridge sendBridge;",
"type": "SendBridge",
"var_name": "sendBridge"
},
{
"declarator": "identifiedValue = Value.synchronize(false)",
"modifier": "private... | {
"body": "@Override\n\tpublic void setProperties(Properties properties) {\n\t\tpropertiesValue.set(properties);\n\t}",
"class_method_signature": "NativeSession.setProperties(Properties properties)",
"constructor": false,
"full_signature": "@Override public void setProperties(Properties properties)",
"identif... | {
"created": null,
"fork": null,
"fork_count": 1,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 85692970,
"size": 2370,
"stargazer_count": 9,
"stars": null,
"updates": null,
"url": "https://github.com/ThorbenKuck/NetCom2"
} |
85692970_46 | {
"fields": [
{
"declarator": "bridge",
"modifier": "private",
"original_string": "private SendBridge bridge;",
"type": "SendBridge",
"var_name": "bridge"
}
],
"file": "core/src/test/java/com/github/thorbenkuck/netcom2/network/shared/NativeSessionTest.java",
"identifier": "... | {
"body": "@Test\n\tpublic void setIdentifier() throws Exception {\n\t\t// Arrange\n\t\tNativeSession session = new NativeSession(bridge);\n\n\t\t// Act\n\t\tsession.setIdentifier(\"TEST\");\n\n\t\t// Assert\n\t\tassertEquals(\"TEST\", session.getIdentifier());\n\t}",
"class_method_signature": "NativeSessionTest.se... | {
"fields": [
{
"declarator": "sendBridge",
"modifier": "private final",
"original_string": "private final SendBridge sendBridge;",
"type": "SendBridge",
"var_name": "sendBridge"
},
{
"declarator": "identifiedValue = Value.synchronize(false)",
"modifier": "private... | {
"body": "@Override\n\tpublic void setIdentifier(String identifier) {\n\t\tidentifierValue.set(identifier);\n\t}",
"class_method_signature": "NativeSession.setIdentifier(String identifier)",
"constructor": false,
"full_signature": "@Override public void setIdentifier(String identifier)",
"identifier": "setId... | {
"created": null,
"fork": null,
"fork_count": 1,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 85692970,
"size": 2370,
"stargazer_count": 9,
"stars": null,
"updates": null,
"url": "https://github.com/ThorbenKuck/NetCom2"
} |
85692970_11 | {
"fields": [],
"file": "rmi/src/test/java/com/github/thorbenkuck/netcom2/network/client/JavaInvocationHandlerProducerTest.java",
"identifier": "JavaInvocationHandlerProducerTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test(expected = IllegalArgumentException.class)\n\tpublic void produceUUIDAndClassNull() throws Exception {\n\t\t// Arrange\n\t\tJavaInvocationHandlerProducer producer = new JavaInvocationHandlerProducer(mock(Sender.class), mock(RemoteAccessBlockRegistration.class));\n\n\t\t// Act\n\t\tproducer.produce(nu... | {
"fields": [
{
"declarator": "sender",
"modifier": "@APILevel\n\tprivate final",
"original_string": "@APILevel\n\tprivate final Sender sender;",
"type": "Sender",
"var_name": "sender"
},
{
"declarator": "remoteAccessBlockRegistration",
"modifier": "@APILevel\n\tp... | {
"body": "@Override\n\tpublic <T> JavaRemoteInformationInvocationHandler<T> produce(final UUID uuid, final Class<T> clazz) {\n\t\tNetCom2Utils.parameterNotNull(clazz, uuid);\n\t\treturn new JavaRemoteInformationInvocationHandler<>(sender, remoteAccessBlockRegistration, clazz, uuid);\n\t}",
"class_method_signature"... | {
"created": null,
"fork": null,
"fork_count": 1,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 85692970,
"size": 2370,
"stargazer_count": 9,
"stars": null,
"updates": null,
"url": "https://github.com/ThorbenKuck/NetCom2"
} |
85692970_85 | {
"fields": [
{
"declarator": "socketAddress = new InetSocketAddress(8888)",
"modifier": "private static final",
"original_string": "private static final InetSocketAddress socketAddress = new InetSocketAddress(8888);",
"type": "InetSocketAddress",
"var_name": "socketAddress"
},
... | {
"body": "@Test(expected = StartFailedException.class)\n\tpublic void launchFail() throws Exception {\n\t\t// Arrange\n\t\tdoThrow(StartFailedException.class).when(connectorCore).establishConnection(socketAddress);\n\n\t\t// Act\n\t\tserverStart.launch();\n\n\t\t// Assert\n\t\tfail();\n\t}",
"class_method_signatur... | {
"fields": [
{
"declarator": "addressValue = Value.emptySynchronized()",
"modifier": "private final",
"original_string": "private final Value<InetSocketAddress> addressValue = Value.emptySynchronized();",
"type": "Value<InetSocketAddress>",
"var_name": "addressValue"
},
{
... | {
"body": "@Override\n\tpublic final synchronized void launch() throws StartFailedException {\n\t\tif (running.get()) {\n\t\t\tloggingValue.get().warn(\"ServerStart is already started! Cannot start an already started NetworkInterface!\");\n\t\t}\n\t\tfinal Logging logging = loggingValue.get();\n\t\tlogging.debug(\"La... | {
"created": null,
"fork": null,
"fork_count": 1,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 85692970,
"size": 2370,
"stargazer_count": 9,
"stars": null,
"updates": null,
"url": "https://github.com/ThorbenKuck/NetCom2"
} |
85692970_93 | {
"fields": [
{
"declarator": "socketAddress = new InetSocketAddress(8888)",
"modifier": "private static final",
"original_string": "private static final InetSocketAddress socketAddress = new InetSocketAddress(8888);",
"type": "InetSocketAddress",
"var_name": "socketAddress"
},
... | {
"body": "@Test\n\tpublic void clientList() throws Exception {\n\t\t// Arrange\n\t\tserverStart.launch();\n\n\t\t// Act\n\t\tClientList clients = serverStart.clientList();\n\n\t\t// Assert\n\t\tassertNotNull(clients);\n\t}",
"class_method_signature": "NativeServerStartTest.clientList()",
"constructor": false,
... | {
"fields": [
{
"declarator": "addressValue = Value.emptySynchronized()",
"modifier": "private final",
"original_string": "private final Value<InetSocketAddress> addressValue = Value.emptySynchronized();",
"type": "Value<InetSocketAddress>",
"var_name": "addressValue"
},
{
... | {
"body": "@Override\n\tpublic final ClientList clientList() {\n\t\treturn clientList;\n\t}",
"class_method_signature": "NativeServerStart.clientList()",
"constructor": false,
"full_signature": "@Override public final ClientList clientList()",
"identifier": "clientList",
"invocations": [],
"modifiers": "@... | {
"created": null,
"fork": null,
"fork_count": 1,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 85692970,
"size": 2370,
"stargazer_count": 9,
"stars": null,
"updates": null,
"url": "https://github.com/ThorbenKuck/NetCom2"
} |
85692970_101 | {
"fields": [
{
"declarator": "socketAddress = new InetSocketAddress(8888)",
"modifier": "private static final",
"original_string": "private static final InetSocketAddress socketAddress = new InetSocketAddress(8888);",
"type": "InetSocketAddress",
"var_name": "socketAddress"
},
... | {
"body": "@Test\n\tpublic void createNewConnection() throws Exception {\n\t\t// Arrange\n\n\t\tClient client = mock(Client.class);\n\t\tSession session = mock(Session.class);\n\t\twhen(client.getSession()).thenReturn(session);\n\t\tserverStart.clientList().add(client);\n\n\t\t// Act\n\t\tserverStart.createNewConnect... | {
"fields": [
{
"declarator": "addressValue = Value.emptySynchronized()",
"modifier": "private final",
"original_string": "private final Value<InetSocketAddress> addressValue = Value.emptySynchronized();",
"type": "Value<InetSocketAddress>",
"var_name": "addressValue"
},
{
... | {
"body": "@Override\n\tpublic final Awaiting createNewConnection(final Session session, final Class key) {\n\t\tfinal Client client = clientList.getClient(session).orElseThrow(() -> new UnknownClientException(\"No Client found for \" + session));\n\t\treturn client.createNewConnection(key);\n\t}",
"class_method_si... | {
"created": null,
"fork": null,
"fork_count": 1,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 85692970,
"size": 2370,
"stargazer_count": 9,
"stars": null,
"updates": null,
"url": "https://github.com/ThorbenKuck/NetCom2"
} |
85692970_77 | {
"fields": [
{
"declarator": "ADDRESS = \"localhost\"",
"modifier": "private static final",
"original_string": "private static final String ADDRESS = \"localhost\";",
"type": "String",
"var_name": "ADDRESS"
},
{
"declarator": "PORT = 1",
"modifier": "private stat... | {
"body": "@Test\n\tpublic void addFallBackSerialization() throws Exception {\n\t\t// Arrange\n\t\tNativeClientStart clientStart = new NativeClientStart(socketAddress, mockedClientCore);\n\t\tSerializationAdapter adapter = Object::toString;\n\n\t\t// Act\n\t\tclientStart.addFallBackSerialization(adapter);\n\n\t\t// A... | {
"fields": [
{
"declarator": "addressValue = Value.emptySynchronized()",
"modifier": "private final",
"original_string": "private final Value<SocketAddress> addressValue = Value.emptySynchronized();",
"type": "Value<SocketAddress>",
"var_name": "addressValue"
},
{
"dec... | {
"body": "@Override\n\tpublic void addFallBackSerialization(SerializationAdapter serializationAdapter) {\n\t\tclient.objectHandler().addFallbackSerialization(serializationAdapter);\n\t}",
"class_method_signature": "NativeClientStart.addFallBackSerialization(SerializationAdapter serializationAdapter)",
"construct... | {
"created": null,
"fork": null,
"fork_count": 1,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 85692970,
"size": 2370,
"stargazer_count": 9,
"stars": null,
"updates": null,
"url": "https://github.com/ThorbenKuck/NetCom2"
} |
85692970_98 | {
"fields": [
{
"declarator": "socketAddress = new InetSocketAddress(8888)",
"modifier": "private static final",
"original_string": "private static final InetSocketAddress socketAddress = new InetSocketAddress(8888);",
"type": "InetSocketAddress",
"var_name": "socketAddress"
},
... | {
"body": "@Test\n\tpublic void running() throws Exception {\n\t\t// Arrange\n\n\t\tserverStart.launch();\n\n\t\t// Act\n\t\tboolean running = serverStart.running();\n\n\t\t// Assert\n\t\tassertTrue(running);\n\t}",
"class_method_signature": "NativeServerStartTest.running()",
"constructor": false,
"full_signatu... | {
"fields": [
{
"declarator": "addressValue = Value.emptySynchronized()",
"modifier": "private final",
"original_string": "private final Value<InetSocketAddress> addressValue = Value.emptySynchronized();",
"type": "Value<InetSocketAddress>",
"var_name": "addressValue"
},
{
... | {
"body": "@Override\n\tpublic final boolean running() {\n\t\treturn running.get();\n\t}",
"class_method_signature": "NativeServerStart.running()",
"constructor": false,
"full_signature": "@Override public final boolean running()",
"identifier": "running",
"invocations": [
"get"
],
"modifiers": "@Ov... | {
"created": null,
"fork": null,
"fork_count": 1,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 85692970,
"size": 2370,
"stargazer_count": 9,
"stars": null,
"updates": null,
"url": "https://github.com/ThorbenKuck/NetCom2"
} |
85692970_20 | {
"fields": [],
"file": "rmi/src/test/java/com/github/thorbenkuck/netcom2/network/server/NativeRemoteObjectRegistrationTest.java",
"identifier": "NativeRemoteObjectRegistrationTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test(expected = IllegalArgumentException.class)\n\tpublic void unhookNull() throws Exception {\n\t\t//Arrange\n\t\tNativeRemoteObjectRegistration remoteObjectRegistration = new NativeRemoteObjectRegistration();\n\n\t\t//Act\n\t\tremoteObjectRegistration.unhook(null);\n\n\t\t//Assert\n\t\tfail();\n\t}",
... | {
"fields": [
{
"declarator": "PRIMITIVE_MAPPING",
"modifier": "private static final",
"original_string": "private static final Map<Class<?>, Class<?>> PRIMITIVE_MAPPING;",
"type": "Map<Class<?>, Class<?>>",
"var_name": "PRIMITIVE_MAPPING"
},
{
"declarator": "mapping = ... | {
"body": "@Override\n\tpublic final void unhook(final Object object) {\n\t\tNetCom2Utils.parameterNotNull(object);\n\t\tfinal List<Class> classList = new ArrayList<>(Arrays.asList(object.getClass().getInterfaces()));\n\t\tclassList.add(object.getClass().getSuperclass());\n\t\tclassList.add(object.getClass());\n\t\tu... | {
"created": null,
"fork": null,
"fork_count": 1,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 85692970,
"size": 2370,
"stargazer_count": 9,
"stars": null,
"updates": null,
"url": "https://github.com/ThorbenKuck/NetCom2"
} |
85692970_4 | {
"fields": [],
"file": "rmi/src/test/java/com/github/thorbenkuck/netcom2/network/client/RemoteAccessBlockRegistrationTest.java",
"identifier": "RemoteAccessBlockRegistrationTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n\tpublic void clearResult() throws Exception {\n\t\t// Arrange\n\t\tRemoteAccessBlockRegistration registration = new RemoteAccessBlockRegistration();\n\t\tUUID id = UUID.randomUUID();\n\n\t\t// Act\n\t\tSemaphore semaphore = registration.await(new RemoteAccessCommunicationRequest(\"\", Example.class... | {
"fields": [
{
"declarator": "semaphoreMap = new HashMap<>()",
"modifier": "private final",
"original_string": "private final Map<UUID, Semaphore> semaphoreMap = new HashMap<>();",
"type": "Map<UUID, Semaphore>",
"var_name": "semaphoreMap"
},
{
"declarator": "responseM... | {
"body": "@APILevel\n\tvoid clearResult(UUID uuid) {\n\t\tNetCom2Utils.parameterNotNull(uuid);\n\t\tsynchronized (responseMap) {\n\t\t\tresponseMap.remove(uuid);\n\t\t}\n\t}",
"class_method_signature": "RemoteAccessBlockRegistration.clearResult(UUID uuid)",
"constructor": false,
"full_signature": "@APILevel vo... | {
"created": null,
"fork": null,
"fork_count": 1,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 85692970,
"size": 2370,
"stargazer_count": 9,
"stars": null,
"updates": null,
"url": "https://github.com/ThorbenKuck/NetCom2"
} |
85692970_36 | {
"fields": [
{
"declarator": "registration",
"modifier": "private",
"original_string": "private CommunicationRegistration registration;",
"type": "CommunicationRegistration",
"var_name": "registration"
}
],
"file": "core/src/test/java/com/github/thorbenkuck/netcom2/network/s... | {
"body": "@Test\n\tpublic void routeConnection() throws Exception {\n\t\t// Arrange\n\t\tNativeClient client = new NativeClient(registration);\n\t\tConnection connection = mock(Connection.class);\n\t\tclient.setConnection(DefaultConnection.class, connection);\n\n\t\t// Act\n\t\tclient.routeConnection(DefaultConnecti... | {
"fields": [
{
"declarator": "communicationRegistration",
"modifier": "private final",
"original_string": "private final CommunicationRegistration communicationRegistration;",
"type": "CommunicationRegistration",
"var_name": "communicationRegistration"
},
{
"declarator... | {
"body": "@Override\n\tpublic void routeConnection(Class originalKey, Class newKey) {\n\t\tNetCom2Utils.parameterNotNull(originalKey);\n\t\tlogging.debug(\"Routing \" + originalKey.getSimpleName() + \" to \" + newKey);\n\t\tsynchronized (connectionMap) {\n\t\t\tif (connectionMap.get(originalKey) == null) {\n\t\t\t\t... | {
"created": null,
"fork": null,
"fork_count": 1,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 85692970,
"size": 2370,
"stargazer_count": 9,
"stars": null,
"updates": null,
"url": "https://github.com/ThorbenKuck/NetCom2"
} |
85692970_61 | {
"fields": [],
"file": "cache/src/test/java/com/github/thorbenkuck/netcom2/network/shared/cache/NativeCacheTest.java",
"identifier": "NativeCacheTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n\tpublic void removeCacheObserver() throws Exception {\n\t\t// Arrange\n\t\tNativeCache cache = new NativeCache();\n\t\tCacheObserver<CacheElement> observer = new AbstractCacheObserver<CacheElement>(CacheElement.class) {\n\t\t\t@Override\n\t\t\tpublic void newEntry(final CacheElement cacheElement, f... | {
"fields": [
{
"declarator": "internals = new HashMap<>()",
"modifier": "private final",
"original_string": "private final Map<Class<?>, Object> internals = new HashMap<>();",
"type": "Map<Class<?>, Object>",
"var_name": "internals"
},
{
"declarator": "semaphore = new ... | {
"body": "@Override\n\tpublic <T> void removeCacheObserver(final CacheObserver<T> cacheObserver) {\n\t\tlogging.debug(\"Removing CacheObserver(\" + cacheObserver + \") from \" + toString());\n\t\tNetCom2Utils.parameterNotNull(cacheObserver);\n\t\tdeleteObserver(cacheObserver);\n\t}",
"class_method_signature": "Nat... | {
"created": null,
"fork": null,
"fork_count": 1,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 85692970,
"size": 2370,
"stargazer_count": 9,
"stars": null,
"updates": null,
"url": "https://github.com/ThorbenKuck/NetCom2"
} |
85692970_94 | {
"fields": [
{
"declarator": "socketAddress = new InetSocketAddress(8888)",
"modifier": "private static final",
"original_string": "private static final InetSocketAddress socketAddress = new InetSocketAddress(8888);",
"type": "InetSocketAddress",
"var_name": "socketAddress"
},
... | {
"body": "@Test\n\tpublic void clientListNotLaunched() throws Exception {\n\t\t// Arrange\n\n\t\t// Act\n\t\tClientList clients = serverStart.clientList();\n\n\t\t// Assert\n\t\tassertNotNull(clients);\n\t}",
"class_method_signature": "NativeServerStartTest.clientListNotLaunched()",
"constructor": false,
"full... | {
"fields": [
{
"declarator": "addressValue = Value.emptySynchronized()",
"modifier": "private final",
"original_string": "private final Value<InetSocketAddress> addressValue = Value.emptySynchronized();",
"type": "Value<InetSocketAddress>",
"var_name": "addressValue"
},
{
... | {
"body": "@Override\n\tpublic final ClientList clientList() {\n\t\treturn clientList;\n\t}",
"class_method_signature": "NativeServerStart.clientList()",
"constructor": false,
"full_signature": "@Override public final ClientList clientList()",
"identifier": "clientList",
"invocations": [],
"modifiers": "@... | {
"created": null,
"fork": null,
"fork_count": 1,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 85692970,
"size": 2370,
"stargazer_count": 9,
"stars": null,
"updates": null,
"url": "https://github.com/ThorbenKuck/NetCom2"
} |
85692970_8 | {
"fields": [],
"file": "rmi/src/test/java/com/github/thorbenkuck/netcom2/network/client/JavaInvocationHandlerProducerTest.java",
"identifier": "JavaInvocationHandlerProducerTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n\tpublic void produce() throws Exception {\n\t\t// Arrange\n\t\tJavaInvocationHandlerProducer producer = new JavaInvocationHandlerProducer(mock(Sender.class), mock(RemoteAccessBlockRegistration.class));\n\n\t\t// Act\n\t\tJavaRemoteInformationInvocationHandler<TestInterface> test = producer.produce(... | {
"fields": [
{
"declarator": "sender",
"modifier": "@APILevel\n\tprivate final",
"original_string": "@APILevel\n\tprivate final Sender sender;",
"type": "Sender",
"var_name": "sender"
},
{
"declarator": "remoteAccessBlockRegistration",
"modifier": "@APILevel\n\tp... | {
"body": "@Override\n\tpublic <T> JavaRemoteInformationInvocationHandler<T> produce(final UUID uuid, final Class<T> clazz) {\n\t\tNetCom2Utils.parameterNotNull(clazz, uuid);\n\t\treturn new JavaRemoteInformationInvocationHandler<>(sender, remoteAccessBlockRegistration, clazz, uuid);\n\t}",
"class_method_signature"... | {
"created": null,
"fork": null,
"fork_count": 1,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 85692970,
"size": 2370,
"stargazer_count": 9,
"stars": null,
"updates": null,
"url": "https://github.com/ThorbenKuck/NetCom2"
} |
85692970_82 | {
"fields": [
{
"declarator": "ADDRESS = \"localhost\"",
"modifier": "private static final",
"original_string": "private static final String ADDRESS = \"localhost\";",
"type": "String",
"var_name": "ADDRESS"
},
{
"declarator": "PORT = 1",
"modifier": "private stat... | {
"body": "@Test\n\tpublic void getCommunicationRegistration() throws Exception {\n\t\t// Arrange\n\t\tClientStart clientStart = new NativeClientStart(socketAddress, mockedClientCore);\n\n\t\t// Act\n\t\tCommunicationRegistration communicationRegistration = clientStart.getCommunicationRegistration();\n\n\t\t// Assert... | {
"fields": [
{
"declarator": "addressValue = Value.emptySynchronized()",
"modifier": "private final",
"original_string": "private final Value<SocketAddress> addressValue = Value.emptySynchronized();",
"type": "Value<SocketAddress>",
"var_name": "addressValue"
},
{
"dec... | {
"body": "@Override\n\tpublic CommunicationRegistration getCommunicationRegistration() {\n\t\treturn communicationRegistration;\n\t}",
"class_method_signature": "NativeClientStart.getCommunicationRegistration()",
"constructor": false,
"full_signature": "@Override public CommunicationRegistration getCommunicati... | {
"created": null,
"fork": null,
"fork_count": 1,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 85692970,
"size": 2370,
"stargazer_count": 9,
"stars": null,
"updates": null,
"url": "https://github.com/ThorbenKuck/NetCom2"
} |
85692970_16 | {
"fields": [],
"file": "rmi/src/test/java/com/github/thorbenkuck/netcom2/network/server/NativeRemoteObjectRegistrationTest.java",
"identifier": "NativeRemoteObjectRegistrationTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test(expected = IllegalArgumentException.class)\n\tpublic void unregisterNullObjectAndClassArray() throws Exception {\n\t\t//Arrange\n\t\tNativeRemoteObjectRegistration remoteObjectRegistration = new NativeRemoteObjectRegistration();\n\n\t\t//Act\n\t\tremoteObjectRegistration.unregister(null, (Class[]) nu... | {
"fields": [
{
"declarator": "PRIMITIVE_MAPPING",
"modifier": "private static final",
"original_string": "private static final Map<Class<?>, Class<?>> PRIMITIVE_MAPPING;",
"type": "Map<Class<?>, Class<?>>",
"var_name": "PRIMITIVE_MAPPING"
},
{
"declarator": "mapping = ... | {
"body": "@Override\n\tpublic final void unregister(final Object object) {\n\t\tNetCom2Utils.parameterNotNull(object);\n\t\tunregister(object, object.getClass());\n\t}",
"class_method_signature": "NativeRemoteObjectRegistration.unregister(final Object object)",
"constructor": false,
"full_signature": "@Overrid... | {
"created": null,
"fork": null,
"fork_count": 1,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 85692970,
"size": 2370,
"stargazer_count": 9,
"stars": null,
"updates": null,
"url": "https://github.com/ThorbenKuck/NetCom2"
} |
85692970_41 | {
"fields": [
{
"declarator": "registration",
"modifier": "private",
"original_string": "private CommunicationRegistration registration;",
"type": "CommunicationRegistration",
"var_name": "registration"
}
],
"file": "core/src/test/java/com/github/thorbenkuck/netcom2/network/s... | {
"body": "@Test(expected = IllegalArgumentException.class)\n\tpublic void notifyAboutPreparedConnectionNotPrepared() throws Exception {\n\t\t// Arrange\n\t\tNativeClient client = new NativeClient(registration);\n\n\t\t// Act\n\t\tclient.connectionPrepared(TestConnectionKey.class);\n\n\t\t// Assert\n\t\tfail();\n\t}"... | {
"fields": [
{
"declarator": "communicationRegistration",
"modifier": "private final",
"original_string": "private final CommunicationRegistration communicationRegistration;",
"type": "CommunicationRegistration",
"var_name": "communicationRegistration"
},
{
"declarator... | {
"body": "@Override\n\tpublic void connectionPrepared(Class<?> identifier) {\n\t\tlogging.debug(\"Releasing all Threads, waiting for the preparation of the Connection \" + identifier);\n\t\tsynchronized (prepared) {\n\t\t\tlogging.trace(\"Fetching Synchronize\");\n\t\t\tSynchronize synchronize = prepared.remove(iden... | {
"created": null,
"fork": null,
"fork_count": 1,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 85692970,
"size": 2370,
"stargazer_count": 9,
"stars": null,
"updates": null,
"url": "https://github.com/ThorbenKuck/NetCom2"
} |
85692970_57 | {
"fields": [],
"file": "cache/src/test/java/com/github/thorbenkuck/netcom2/network/shared/cache/NativeCacheTest.java",
"identifier": "NativeCacheTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n\tpublic void get() throws Exception {\n\t\t// Arrange\n\t\tNativeCache cache = new NativeCache();\n\t\tCacheElement element = new CacheElement();\n\t\tcache.addNew(element);\n\n\t\t// Act\n\t\tOptional<CacheElement> optional = cache.get(CacheElement.class);\n\n\t\t// Assert\n\t\tassertNotNull(optio... | {
"fields": [
{
"declarator": "internals = new HashMap<>()",
"modifier": "private final",
"original_string": "private final Map<Class<?>, Object> internals = new HashMap<>();",
"type": "Map<Class<?>, Object>",
"var_name": "internals"
},
{
"declarator": "semaphore = new ... | {
"body": "@Override\n\t@SuppressWarnings(\"unchecked\")\n\tpublic <T> Optional<T> get(final Class<T> clazz) {\n\t\tNetCom2Utils.parameterNotNull(clazz);\n\t\tfinal Object retrieved;\n\t\tsynchronized (internals) {\n\t\t\tretrieved = internals.get(clazz);\n\t\t}\n\t\tif (retrieved != null && retrieved.getClass().equa... | {
"created": null,
"fork": null,
"fork_count": 1,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 85692970,
"size": 2370,
"stargazer_count": 9,
"stars": null,
"updates": null,
"url": "https://github.com/ThorbenKuck/NetCom2"
} |
85692970_56 | {
"fields": [],
"file": "cache/src/test/java/com/github/thorbenkuck/netcom2/network/shared/cache/NativeCacheTest.java",
"identifier": "NativeCacheTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n\tpublic void remove() throws Exception {\n\t\t// Arrange\n\t\tNativeCache cache = new NativeCache();\n\n\t\t// Act\n\t\tcache.remove(CacheElement.class);\n\n\t\t// Assert\n\t\tOptional<CacheElement> optional = cache.get(CacheElement.class);\n\t\tassertFalse(optional.isPresent());\n\t}",
"class_me... | {
"fields": [
{
"declarator": "internals = new HashMap<>()",
"modifier": "private final",
"original_string": "private final Map<Class<?>, Object> internals = new HashMap<>();",
"type": "Map<Class<?>, Object>",
"var_name": "internals"
},
{
"declarator": "semaphore = new ... | {
"body": "@Override\n\tpublic void remove(final Class clazz) {\n\t\tlogging.trace(\"Trying to isRemovable Object(\" + clazz + \") to Cache ..\");\n\t\tNetCom2Utils.parameterNotNull(clazz);\n\t\tif (isSet(clazz)) {\n\t\t\tfinal Object removedEntry;\n\t\t\tsynchronized (internals) {\n\t\t\t\tremovedEntry = internals.r... | {
"created": null,
"fork": null,
"fork_count": 1,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 85692970,
"size": 2370,
"stargazer_count": 9,
"stars": null,
"updates": null,
"url": "https://github.com/ThorbenKuck/NetCom2"
} |
85692970_40 | {
"fields": [
{
"declarator": "registration",
"modifier": "private",
"original_string": "private CommunicationRegistration registration;",
"type": "CommunicationRegistration",
"var_name": "registration"
}
],
"file": "core/src/test/java/com/github/thorbenkuck/netcom2/network/s... | {
"body": "@Test(expected = IllegalArgumentException.class)\n\tpublic void prepareConnectionNull() throws Exception {\n\t\t// Arrange\n\t\tNativeClient client = new NativeClient(registration);\n\n\t\t// Act\n\t\tclient.prepareConnection(null);\n\n\t\t// Assert\n\t\tfail();\n\t}",
"class_method_signature": "NativeCl... | {
"fields": [
{
"declarator": "communicationRegistration",
"modifier": "private final",
"original_string": "private final CommunicationRegistration communicationRegistration;",
"type": "CommunicationRegistration",
"var_name": "communicationRegistration"
},
{
"declarator... | {
"body": "@Override\n\tpublic Awaiting prepareConnection(Class clazz) {\n\t\tNetCom2Utils.parameterNotNull(clazz);\n\t\tlogging.debug(\"Trying to prepare for \" + clazz);\n\t\tsynchronized (prepared) {\n\t\t\tprepared.computeIfAbsent(clazz, key -> Synchronize.createDefault());\n\t\t\treturn prepared.get(clazz);\n\t\... | {
"created": null,
"fork": null,
"fork_count": 1,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 85692970,
"size": 2370,
"stargazer_count": 9,
"stars": null,
"updates": null,
"url": "https://github.com/ThorbenKuck/NetCom2"
} |
85692970_17 | {
"fields": [],
"file": "rmi/src/test/java/com/github/thorbenkuck/netcom2/network/server/NativeRemoteObjectRegistrationTest.java",
"identifier": "NativeRemoteObjectRegistrationTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test(expected = IllegalArgumentException.class)\n\tpublic void unregisterNullObjectWithClassArray() throws Exception {\n\t\t//Arrange\n\t\tNativeRemoteObjectRegistration remoteObjectRegistration = new NativeRemoteObjectRegistration();\n\n\t\t//Act\n\t\tremoteObjectRegistration.unregister((Object) null, Te... | {
"fields": [
{
"declarator": "PRIMITIVE_MAPPING",
"modifier": "private static final",
"original_string": "private static final Map<Class<?>, Class<?>> PRIMITIVE_MAPPING;",
"type": "Map<Class<?>, Class<?>>",
"var_name": "PRIMITIVE_MAPPING"
},
{
"declarator": "mapping = ... | {
"body": "@Override\n\tpublic final void unregister(final Object object) {\n\t\tNetCom2Utils.parameterNotNull(object);\n\t\tunregister(object, object.getClass());\n\t}",
"class_method_signature": "NativeRemoteObjectRegistration.unregister(final Object object)",
"constructor": false,
"full_signature": "@Overrid... | {
"created": null,
"fork": null,
"fork_count": 1,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 85692970,
"size": 2370,
"stargazer_count": 9,
"stars": null,
"updates": null,
"url": "https://github.com/ThorbenKuck/NetCom2"
} |
85692970_83 | {
"fields": [
{
"declarator": "ADDRESS = \"localhost\"",
"modifier": "private static final",
"original_string": "private static final String ADDRESS = \"localhost\";",
"type": "String",
"var_name": "ADDRESS"
},
{
"declarator": "PORT = 1",
"modifier": "private stat... | {
"body": "@Test\n\tpublic void clearCache() throws Exception {\n\t\t// Arrange\n\t\tClientStart clientStart = new NativeClientStart(socketAddress, mockedClientCore);\n\t\tfinal AtomicBoolean success = new AtomicBoolean(false);\n\t\tCacheObserver<TestSendObject> observer = new TestObserver(success);\n\n\t\t// Act\n\t... | {
"fields": [
{
"declarator": "addressValue = Value.emptySynchronized()",
"modifier": "private final",
"original_string": "private final Value<SocketAddress> addressValue = Value.emptySynchronized();",
"type": "Value<SocketAddress>",
"var_name": "addressValue"
},
{
"dec... | {
"body": "@Override\n\tpublic void clearCache() {\n\t\tcache.reset();\n\t}",
"class_method_signature": "NativeClientStart.clearCache()",
"constructor": false,
"full_signature": "@Override public void clearCache()",
"identifier": "clearCache",
"invocations": [
"reset"
],
"modifiers": "@Override publ... | {
"created": null,
"fork": null,
"fork_count": 1,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 85692970,
"size": 2370,
"stargazer_count": 9,
"stars": null,
"updates": null,
"url": "https://github.com/ThorbenKuck/NetCom2"
} |
85692970_9 | {
"fields": [],
"file": "rmi/src/test/java/com/github/thorbenkuck/netcom2/network/client/JavaInvocationHandlerProducerTest.java",
"identifier": "JavaInvocationHandlerProducerTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test(expected = IllegalArgumentException.class)\n\tpublic void produceUUIDNull() throws Exception {\n\t\t// Arrange\n\t\tJavaInvocationHandlerProducer producer = new JavaInvocationHandlerProducer(mock(Sender.class), mock(RemoteAccessBlockRegistration.class));\n\n\t\t// Act\n\t\tproducer.produce(null, Test... | {
"fields": [
{
"declarator": "sender",
"modifier": "@APILevel\n\tprivate final",
"original_string": "@APILevel\n\tprivate final Sender sender;",
"type": "Sender",
"var_name": "sender"
},
{
"declarator": "remoteAccessBlockRegistration",
"modifier": "@APILevel\n\tp... | {
"body": "@Override\n\tpublic <T> JavaRemoteInformationInvocationHandler<T> produce(final UUID uuid, final Class<T> clazz) {\n\t\tNetCom2Utils.parameterNotNull(clazz, uuid);\n\t\treturn new JavaRemoteInformationInvocationHandler<>(sender, remoteAccessBlockRegistration, clazz, uuid);\n\t}",
"class_method_signature"... | {
"created": null,
"fork": null,
"fork_count": 1,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 85692970,
"size": 2370,
"stargazer_count": 9,
"stars": null,
"updates": null,
"url": "https://github.com/ThorbenKuck/NetCom2"
} |
85692970_95 | {
"fields": [
{
"declarator": "socketAddress = new InetSocketAddress(8888)",
"modifier": "private static final",
"original_string": "private static final InetSocketAddress socketAddress = new InetSocketAddress(8888);",
"type": "InetSocketAddress",
"var_name": "socketAddress"
},
... | {
"body": "@Test\n\tpublic void getCommunicationRegistration() throws Exception {\n\t\t// Arrange\n\t\tserverStart.launch();\n\n\t\t// Act\n\t\tCommunicationRegistration registration = serverStart.getCommunicationRegistration();\n\n\t\t// Assert\n\t\tassertNotNull(registration);\n\t}",
"class_method_signature": "Na... | {
"fields": [
{
"declarator": "addressValue = Value.emptySynchronized()",
"modifier": "private final",
"original_string": "private final Value<InetSocketAddress> addressValue = Value.emptySynchronized();",
"type": "Value<InetSocketAddress>",
"var_name": "addressValue"
},
{
... | {
"body": "@Override\n\tpublic final CommunicationRegistration getCommunicationRegistration() {\n\t\treturn communicationRegistration;\n\t}",
"class_method_signature": "NativeServerStart.getCommunicationRegistration()",
"constructor": false,
"full_signature": "@Override public final CommunicationRegistration ge... | {
"created": null,
"fork": null,
"fork_count": 1,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 85692970,
"size": 2370,
"stargazer_count": 9,
"stars": null,
"updates": null,
"url": "https://github.com/ThorbenKuck/NetCom2"
} |
85692970_60 | {
"fields": [],
"file": "cache/src/test/java/com/github/thorbenkuck/netcom2/network/shared/cache/NativeCacheTest.java",
"identifier": "NativeCacheTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n\tpublic void addCacheObserver() throws Exception {\n\t\t// Arrange\n\t\tNativeCache cache = new NativeCache();\n\t\tCacheObserver<CacheElement> observer = new AbstractCacheObserver<CacheElement>(CacheElement.class) {\n\t\t\t@Override\n\t\t\tpublic void newEntry(final CacheElement cacheElement, fina... | {
"fields": [
{
"declarator": "internals = new HashMap<>()",
"modifier": "private final",
"original_string": "private final Map<Class<?>, Object> internals = new HashMap<>();",
"type": "Map<Class<?>, Object>",
"var_name": "internals"
},
{
"declarator": "semaphore = new ... | {
"body": "@Override\n\tpublic <T> void addCacheObserver(final CacheObserver<T> cacheObserver) {\n\t\tlogging.debug(\"Adding CacheObserver(\" + cacheObserver + \") to \" + toString());\n\t\tNetCom2Utils.parameterNotNull(cacheObserver);\n\t\taddObserver(cacheObserver);\n\t}",
"class_method_signature": "NativeCache.a... | {
"created": null,
"fork": null,
"fork_count": 1,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 85692970,
"size": 2370,
"stargazer_count": 9,
"stars": null,
"updates": null,
"url": "https://github.com/ThorbenKuck/NetCom2"
} |
85692970_37 | {
"fields": [
{
"declarator": "registration",
"modifier": "private",
"original_string": "private CommunicationRegistration registration;",
"type": "CommunicationRegistration",
"var_name": "registration"
}
],
"file": "core/src/test/java/com/github/thorbenkuck/netcom2/network/s... | {
"body": "@Test\n\tpublic void getCommunicationRegistration() throws Exception {\n\t\t// Arrange\n\t\tNativeClient client = new NativeClient(registration);\n\n\t\t// Act\n\t\tCommunicationRegistration communicationRegistration = client.getCommunicationRegistration();\n\n\t\t// Assert\n\t\tassertNotNull(communication... | {
"fields": [
{
"declarator": "communicationRegistration",
"modifier": "private final",
"original_string": "private final CommunicationRegistration communicationRegistration;",
"type": "CommunicationRegistration",
"var_name": "communicationRegistration"
},
{
"declarator... | {
"body": "@Override\n\tpublic CommunicationRegistration getCommunicationRegistration() {\n\t\treturn communicationRegistration;\n\t}",
"class_method_signature": "NativeClient.getCommunicationRegistration()",
"constructor": false,
"full_signature": "@Override public CommunicationRegistration getCommunicationReg... | {
"created": null,
"fork": null,
"fork_count": 1,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 85692970,
"size": 2370,
"stargazer_count": 9,
"stars": null,
"updates": null,
"url": "https://github.com/ThorbenKuck/NetCom2"
} |
85692970_21 | {
"fields": [],
"file": "rmi/src/test/java/com/github/thorbenkuck/netcom2/network/server/NativeRemoteObjectRegistrationTest.java",
"identifier": "NativeRemoteObjectRegistrationTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n\tpublic void clear() throws Exception {\n\t\t//Arrange\n\t\tNativeRemoteObjectRegistration remoteObjectRegistration = new NativeRemoteObjectRegistration();\n\t\tTestRemoteObject remoteObject = spy(new TestRemoteObject());\n\t\tClass<?> classToAssign = TestRemoteObject.class;\n\t\tString methodName ... | {
"fields": [
{
"declarator": "PRIMITIVE_MAPPING",
"modifier": "private static final",
"original_string": "private static final Map<Class<?>, Class<?>> PRIMITIVE_MAPPING;",
"type": "Map<Class<?>, Class<?>>",
"var_name": "PRIMITIVE_MAPPING"
},
{
"declarator": "mapping = ... | {
"body": "@Override\n\tpublic final void clear() {\n\t\tlogging.debug(\"Clearing the RemoteObjectRegistration \" + toString());\n\t\tsynchronized (mapping) {\n\t\t\tmapping.clear();\n\t\t}\n\t}",
"class_method_signature": "NativeRemoteObjectRegistration.clear()",
"constructor": false,
"full_signature": "@Overr... | {
"created": null,
"fork": null,
"fork_count": 1,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 85692970,
"size": 2370,
"stargazer_count": 9,
"stars": null,
"updates": null,
"url": "https://github.com/ThorbenKuck/NetCom2"
} |
85692970_5 | {
"fields": [],
"file": "rmi/src/test/java/com/github/thorbenkuck/netcom2/network/client/RemoteAccessBlockRegistrationTest.java",
"identifier": "RemoteAccessBlockRegistrationTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n\tpublic void await() throws Exception {\n\t\t// Arrange\n\t\tRemoteAccessBlockRegistration registration = new RemoteAccessBlockRegistration();\n\t\tUUID id = UUID.randomUUID();\n\n\t\t// Act\n\t\tSemaphore semaphore = registration.await(new RemoteAccessCommunicationRequest(\"\", Example.class, id, ... | {
"fields": [
{
"declarator": "semaphoreMap = new HashMap<>()",
"modifier": "private final",
"original_string": "private final Map<UUID, Semaphore> semaphoreMap = new HashMap<>();",
"type": "Map<UUID, Semaphore>",
"var_name": "semaphoreMap"
},
{
"declarator": "responseM... | {
"body": "@APILevel\n\tSemaphore await(RemoteAccessCommunicationRequest request) {\n\t\tNetCom2Utils.parameterNotNull(request);\n\t\tSemaphore semaphore = getAndCreateSemaphore(request.getUuid());\n\t\tresponseMap.remove(request.getUuid());\n\n\t\treturn semaphore;\n\t}",
"class_method_signature": "RemoteAccessBlo... | {
"created": null,
"fork": null,
"fork_count": 1,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 85692970,
"size": 2370,
"stargazer_count": 9,
"stars": null,
"updates": null,
"url": "https://github.com/ThorbenKuck/NetCom2"
} |
85692970_76 | {
"fields": [
{
"declarator": "ADDRESS = \"localhost\"",
"modifier": "private static final",
"original_string": "private static final String ADDRESS = \"localhost\";",
"type": "String",
"var_name": "ADDRESS"
},
{
"declarator": "PORT = 1",
"modifier": "private stat... | {
"body": "@Test(expected = IllegalStateException.class)\n\tpublic void setSocketFactory() throws Exception {\n\t\t// Arrange\n\t\tClientStart clientStart = new NativeClientStart(socketAddress, mockedClientCore);\n\t\tdoThrow(IllegalStateException.class).when(mockedClientCore).establishConnection(any(), any());\n\n\t... | {
"fields": [
{
"declarator": "addressValue = Value.emptySynchronized()",
"modifier": "private final",
"original_string": "private final Value<SocketAddress> addressValue = Value.emptySynchronized();",
"type": "Value<SocketAddress>",
"var_name": "addressValue"
},
{
"dec... | {
"body": "@Override\n\tpublic synchronized void launch() throws StartFailedException {\n\t\tif (running.get()) {\n\t\t\tloggingValue.get().warn(\"ClientStart is already started! Cannot start an already started NetworkInterface!\");\n\t\t}\n\t\tSocketAddress socketAddress = addressValue.get();\n\t\tif (addressValue.i... | {
"created": null,
"fork": null,
"fork_count": 1,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 85692970,
"size": 2370,
"stargazer_count": 9,
"stars": null,
"updates": null,
"url": "https://github.com/ThorbenKuck/NetCom2"
} |
85692970_99 | {
"fields": [
{
"declarator": "socketAddress = new InetSocketAddress(8888)",
"modifier": "private static final",
"original_string": "private static final InetSocketAddress socketAddress = new InetSocketAddress(8888);",
"type": "InetSocketAddress",
"var_name": "socketAddress"
},
... | {
"body": "@Test\n\tpublic void runningNotLaunched() throws Exception {\n\t\t// Arrange\n\n\n\t\t// Act\n\t\tboolean running = serverStart.running();\n\n\t\t// Assert\n\t\tassertFalse(running);\n\t}",
"class_method_signature": "NativeServerStartTest.runningNotLaunched()",
"constructor": false,
"full_signature":... | {
"fields": [
{
"declarator": "addressValue = Value.emptySynchronized()",
"modifier": "private final",
"original_string": "private final Value<InetSocketAddress> addressValue = Value.emptySynchronized();",
"type": "Value<InetSocketAddress>",
"var_name": "addressValue"
},
{
... | {
"body": "@Override\n\tpublic final boolean running() {\n\t\treturn running.get();\n\t}",
"class_method_signature": "NativeServerStart.running()",
"constructor": false,
"full_signature": "@Override public final boolean running()",
"identifier": "running",
"invocations": [
"get"
],
"modifiers": "@Ov... | {
"created": null,
"fork": null,
"fork_count": 1,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 85692970,
"size": 2370,
"stargazer_count": 9,
"stars": null,
"updates": null,
"url": "https://github.com/ThorbenKuck/NetCom2"
} |
62021204_8 | {
"fields": [],
"file": "async-event-core/src/test/java/com/cubbery/event/EventBusSpringTest.java",
"identifier": "EventBusSpringTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void ipStrToListTest_unvali() {\n String ipStr = \"127.0.0|0.0.0.2|127.0.0.4\";\n List<String> ipList = EventBusSpring.ipStrToList(ipStr);\n //assertEquals(ipList.get(0),\"127.0.0\");\n assertEquals(ipList.get(0),\"0.0.0.2\");\n assertEquals(ipList.get(1... | {
"fields": [
{
"declarator": "eventBus",
"modifier": "private",
"original_string": "private EventBus eventBus;",
"type": "EventBus",
"var_name": "eventBus"
},
{
"declarator": "subscribers",
"modifier": "private",
"original_string": "private List<Object> sub... | {
"body": "public static List<String> ipStrToList(String blackIpStr) {\n List<String> ips = new ArrayList<String>();\n if(blackIpStr != null && !blackIpStr.equals(\"\")) {\n String[] arr = blackIpStr.split(\"\\\\|\");\n for(String ip : arr) {\n if(HostUtils.isValidIp... | {
"created": null,
"fork": null,
"fork_count": 2,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 62021204,
"size": 185,
"stargazer_count": 10,
"stars": null,
"updates": null,
"url": "https://github.com/cncduLee/async-event"
} |
62021204_10 | {
"fields": [],
"file": "async-event-core/src/test/java/com/cubbery/event/utils/security/DesCrypterTest.java",
"identifier": "DesCrypterTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void testEncrypt() throws Exception {\n long start = System.nanoTime();\n String result = encrypt(\"{\\n\" +\n \"\\t\\\"certificateNo\\\": \\\"110101198804011930\\\",\\n\" +\n \"\\t\\\"systemId\\\": \\\"INTG\\\",\\n\" +\n \"\\t\\\... | {
"fields": [
{
"declarator": "DES_KEY = \"zX/95tXv+4PTBD4xkm3992jpnqcynZ#@\"",
"modifier": "private final static",
"original_string": "private final static String DES_KEY = \"zX/95tXv+4PTBD4xkm3992jpnqcynZ#@\";",
"type": "String",
"var_name": "DES_KEY"
},
{
"declarator... | {
"body": "public static String encrypt(String txt) {\n try {\n return desEncrypter.get().encrypt(txt);\n } catch (Exception e) {\n LOG.info(\"Encrypt Error \");\n throw new RuntimeException(e);\n }\n }",
"class_method_signature": "DesCrypter.encrypt(String t... | {
"created": null,
"fork": null,
"fork_count": 2,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 62021204,
"size": 185,
"stargazer_count": 10,
"stars": null,
"updates": null,
"url": "https://github.com/cncduLee/async-event"
} |
62021204_4 | {
"fields": [],
"file": "async-event-core/src/test/java/com/cubbery/event/finder/BothHandlerFinderTest.java",
"identifier": "BothHandlerFinderTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void testFindAllHandlers_both() throws Exception {\n BothSub bothSub = new BothSub();\n Map<Class<? >, Set<EventHandler>> map = new BothHandlerFinder().findAllHandlers(bothSub);\n assertTrue(map.containsKey(SimpleEvent.class));\n\n Collection<EventHandler> hand... | {
"fields": [
{
"declarator": "annotatedFinder",
"modifier": "private final",
"original_string": "private final HandlerFinder annotatedFinder;",
"type": "HandlerFinder",
"var_name": "annotatedFinder"
},
{
"declarator": "listenersFinder",
"modifier": "private final... | {
"body": "@Override\n public Map<Class<?>, Set<EventHandler>> findAllHandlers(Object listener) {\n Map<Class<?>, Set<EventHandler>> multimap = this.annotatedFinder.findAllHandlers(listener);\n putAll(multimap,this.listenersFinder.findAllHandlers(listener));\n return multimap;\n }",
"clas... | {
"created": null,
"fork": null,
"fork_count": 2,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 62021204,
"size": 185,
"stargazer_count": 10,
"stars": null,
"updates": null,
"url": "https://github.com/cncduLee/async-event"
} |
62021204_5 | {
"fields": [],
"file": "async-event-core/src/test/java/com/cubbery/event/finder/BothHandlerFinderTest.java",
"identifier": "BothHandlerFinderTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void testFindAllHandlers_both2() throws NoSuchMethodException {\n BothSub2 bothSub = new BothSub2();\n Map<Class<? >, Set<EventHandler>> map = new BothHandlerFinder().findAllHandlers(bothSub);\n assertTrue(map.containsKey(SimpleEvent.class));\n\n Collection<Eve... | {
"fields": [
{
"declarator": "annotatedFinder",
"modifier": "private final",
"original_string": "private final HandlerFinder annotatedFinder;",
"type": "HandlerFinder",
"var_name": "annotatedFinder"
},
{
"declarator": "listenersFinder",
"modifier": "private final... | {
"body": "@Override\n public Map<Class<?>, Set<EventHandler>> findAllHandlers(Object listener) {\n Map<Class<?>, Set<EventHandler>> multimap = this.annotatedFinder.findAllHandlers(listener);\n putAll(multimap,this.listenersFinder.findAllHandlers(listener));\n return multimap;\n }",
"clas... | {
"created": null,
"fork": null,
"fork_count": 2,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 62021204,
"size": 185,
"stargazer_count": 10,
"stars": null,
"updates": null,
"url": "https://github.com/cncduLee/async-event"
} |
62021204_11 | {
"fields": [],
"file": "async-event-core/src/test/java/com/cubbery/event/utils/security/DesCrypterTest.java",
"identifier": "DesCrypterTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void testDecrypt() throws Exception {\n String txt = \"NEM6VFWPMBZ3ZOA6ODGOKHBEZHZXAJVQFPQ6XVNM2KZKRM5JJ2M76UIDBIFUTGPA2ELYHN6AHLH6AEFBA3UMVA2WUFECNT7ZZPQJPANMMDRXSQMMAWJB4HFRONDWR3ESQMWELEDPB7CILKT3ED3M7GFFQFQ5Y4LJW2Q23YZI7GLBIKMH5RTHPKDUR24H6EPTS5KKPIH3NXHM3IQ2SHXJLYL3CWUQCHKZT6M... | {
"fields": [
{
"declarator": "DES_KEY = \"zX/95tXv+4PTBD4xkm3992jpnqcynZ#@\"",
"modifier": "private final static",
"original_string": "private final static String DES_KEY = \"zX/95tXv+4PTBD4xkm3992jpnqcynZ#@\";",
"type": "String",
"var_name": "DES_KEY"
},
{
"declarator... | {
"body": "public static String decrypt(String txt) {\n try {\n return desDecrypter.get().decrypt(txt);\n } catch (Exception e) {\n LOG.info(\"Decrypt Error \");\n throw new RuntimeException(e);\n }\n }",
"class_method_signature": "DesCrypter.decrypt(String t... | {
"created": null,
"fork": null,
"fork_count": 2,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 62021204,
"size": 185,
"stargazer_count": 10,
"stars": null,
"updates": null,
"url": "https://github.com/cncduLee/async-event"
} |
62021204_9 | {
"fields": [],
"file": "async-event-core/src/test/java/com/cubbery/event/utils/HostUtilsTest.java",
"identifier": "HostUtilsTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void testAboutThisJvm() throws Exception {\n\n }",
"class_method_signature": "HostUtilsTest.testAboutThisJvm()",
"constructor": false,
"full_signature": "@Test public void testAboutThisJvm()",
"identifier": "testAboutThisJvm",
"invocations": [],
"modifiers": "@Test public",... | {
"fields": [
{
"declarator": "logger = LoggerFactory.getLogger(HostUtils.class)",
"modifier": "private static final",
"original_string": "private static final Logger logger = LoggerFactory.getLogger(HostUtils.class);",
"type": "Logger",
"var_name": "logger"
},
{
"decla... | {
"body": "public static String aboutThisJvm() {\n StringBuffer sb = new StringBuffer();\n sb.append(getLocalHost());\n // get name representing the running Java virtual machine.\n String name = ManagementFactory.getRuntimeMXBean().getName();\n // get pid\n sb.append(\"_\").a... | {
"created": null,
"fork": null,
"fork_count": 2,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 62021204,
"size": 185,
"stargazer_count": 10,
"stars": null,
"updates": null,
"url": "https://github.com/cncduLee/async-event"
} |
62021204_2 | {
"fields": [],
"file": "async-event-core/src/test/java/com/cubbery/event/finder/BothHandlerFinderTest.java",
"identifier": "BothHandlerFinderTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void testFindAllHandlers_listener() throws Exception {\n Sub listener = new Sub();\n Map<Class<? >, Set<EventHandler>> map = new BothHandlerFinder().findAllHandlers(listener);\n assertTrue(map.containsKey(SimpleEvent.class));\n\n Collection<EventHandler> handle... | {
"fields": [
{
"declarator": "annotatedFinder",
"modifier": "private final",
"original_string": "private final HandlerFinder annotatedFinder;",
"type": "HandlerFinder",
"var_name": "annotatedFinder"
},
{
"declarator": "listenersFinder",
"modifier": "private final... | {
"body": "@Override\n public Map<Class<?>, Set<EventHandler>> findAllHandlers(Object listener) {\n Map<Class<?>, Set<EventHandler>> multimap = this.annotatedFinder.findAllHandlers(listener);\n putAll(multimap,this.listenersFinder.findAllHandlers(listener));\n return multimap;\n }",
"clas... | {
"created": null,
"fork": null,
"fork_count": 2,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 62021204,
"size": 185,
"stargazer_count": 10,
"stars": null,
"updates": null,
"url": "https://github.com/cncduLee/async-event"
} |
62021204_3 | {
"fields": [],
"file": "async-event-core/src/test/java/com/cubbery/event/finder/BothHandlerFinderTest.java",
"identifier": "BothHandlerFinderTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void testFindAllHandlers_anno() throws Exception {\n AnnoSub annoSub = new AnnoSub();\n Map<Class<? >, Set<EventHandler>> map = new BothHandlerFinder().findAllHandlers(annoSub);\n assertTrue(map.containsKey(SimpleEvent.class));\n\n Collection<EventHandler> hand... | {
"fields": [
{
"declarator": "annotatedFinder",
"modifier": "private final",
"original_string": "private final HandlerFinder annotatedFinder;",
"type": "HandlerFinder",
"var_name": "annotatedFinder"
},
{
"declarator": "listenersFinder",
"modifier": "private final... | {
"body": "@Override\n public Map<Class<?>, Set<EventHandler>> findAllHandlers(Object listener) {\n Map<Class<?>, Set<EventHandler>> multimap = this.annotatedFinder.findAllHandlers(listener);\n putAll(multimap,this.listenersFinder.findAllHandlers(listener));\n return multimap;\n }",
"clas... | {
"created": null,
"fork": null,
"fork_count": 2,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 62021204,
"size": 185,
"stargazer_count": 10,
"stars": null,
"updates": null,
"url": "https://github.com/cncduLee/async-event"
} |
62021204_0 | {
"fields": [],
"file": "async-event-core/src/test/java/com/cubbery/event/finder/AnnotatedHandlerFinderTest.java",
"identifier": "AnnotatedHandlerFinderTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void testFindAllHandlers() throws Exception {\n AnnoSub listener = new AnnoSub();\n Map<Class<? >, Set<EventHandler>> map = new AnnotatedHandlerFinder().findAllHandlers(listener);\n assertTrue(map.containsKey(SimpleEvent.class));\n\n Collection<EventHandler> ha... | {
"fields": [],
"file": "async-event-core/src/main/java/com/cubbery/event/finder/AnnotatedHandlerFinder.java",
"identifier": "AnnotatedHandlerFinder",
"interfaces": "",
"methods": [
{
"class_method_signature": "AnnotatedHandlerFinder.findAllHandlers(Object listener)",
"constructor": false,
... | {
"body": "@Override\n public Map<Class<?>, Set<EventHandler>> findAllHandlers(Object listener) {\n Map<Class<?>, Set<EventHandler>> methodsInAnno = new HashMap<Class<?>, Set<EventHandler>>();\n Class clazz = listener.getClass();\n while (clazz != null) {\n for (Method method : claz... | {
"created": null,
"fork": null,
"fork_count": 2,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 62021204,
"size": 185,
"stargazer_count": 10,
"stars": null,
"updates": null,
"url": "https://github.com/cncduLee/async-event"
} |
62021204_14 | {
"fields": [
{
"declarator": "sub",
"modifier": "",
"original_string": "Sub sub;",
"type": "Sub",
"var_name": "sub"
},
{
"declarator": "method",
"modifier": "",
"original_string": "Method method;",
"type": "Method",
"var_name": "method"
},
... | {
"body": "@Test\n public void testReCreate_NULL() throws Exception {\n SimpleEvent simple = new SimpleEvent();\n simple.setData(null);\n Object obj = new EncryptEventCreator().reCreate(simple,Person.class);\n assertTrue(obj != null);\n assertTrue(obj instanceof Person);\n }"... | {
"fields": [
{
"declarator": "id",
"modifier": "private",
"original_string": "private long id;",
"type": "long",
"var_name": "id"
},
{
"declarator": "status",
"modifier": "private",
"original_string": "private int status;",
"type": "int",
"var_n... | {
"body": "public void setData(String data) {\n this.data = data;\n }",
"class_method_signature": "SimpleEvent.setData(String data)",
"constructor": false,
"full_signature": "public void setData(String data)",
"identifier": "setData",
"invocations": [],
"modifiers": "public",
"parameters": "(S... | {
"created": null,
"fork": null,
"fork_count": 2,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 62021204,
"size": 185,
"stargazer_count": 10,
"stars": null,
"updates": null,
"url": "https://github.com/cncduLee/async-event"
} |
62021204_1 | {
"fields": [],
"file": "async-event-core/src/test/java/com/cubbery/event/finder/ListenerHandlerFinderTest.java",
"identifier": "ListenerHandlerFinderTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void testFindAllHandlers() {\n Sub listener = new Sub();\n Map<Class<? >, Set<EventHandler>> map = new ListenerHandlerFinder().findAllHandlers(listener);\n assertTrue(map.containsKey(SimpleEvent.class));\n\n Collection<EventHandler> handlers = map.get(SimpleEve... | {
"fields": [],
"file": "async-event-core/src/main/java/com/cubbery/event/finder/ListenerHandlerFinder.java",
"identifier": "ListenerHandlerFinder",
"interfaces": "",
"methods": [
{
"class_method_signature": "ListenerHandlerFinder.findAllHandlers(Object listener)",
"constructor": false,
... | {
"body": "@Override\n public Map<Class<?>, Set<EventHandler>> findAllHandlers(Object listener) {\n Map<Class<?>, Set<EventHandler>> methodsInListener = new HashMap<Class<?>, Set<EventHandler>>();\n Class clazz = listener.getClass();\n Type[] types = clazz.getGenericInterfaces();\n for(... | {
"created": null,
"fork": null,
"fork_count": 2,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 62021204,
"size": 185,
"stargazer_count": 10,
"stars": null,
"updates": null,
"url": "https://github.com/cncduLee/async-event"
} |
62021204_6 | {
"fields": [],
"file": "async-event-core/src/test/java/com/cubbery/event/EventBusSpringTest.java",
"identifier": "EventBusSpringTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void ipStrToListTest_single() {\n String ipStr = \"127.0.0.1\";\n List<String> ipList = EventBusSpring.ipStrToList(ipStr);\n assertEquals(ipList.get(0),ipStr);\n }",
"class_method_signature": "EventBusSpringTest.ipStrToListTest_single()",
"constructor": false,
... | {
"fields": [
{
"declarator": "eventBus",
"modifier": "private",
"original_string": "private EventBus eventBus;",
"type": "EventBus",
"var_name": "eventBus"
},
{
"declarator": "subscribers",
"modifier": "private",
"original_string": "private List<Object> sub... | {
"body": "public static List<String> ipStrToList(String blackIpStr) {\n List<String> ips = new ArrayList<String>();\n if(blackIpStr != null && !blackIpStr.equals(\"\")) {\n String[] arr = blackIpStr.split(\"\\\\|\");\n for(String ip : arr) {\n if(HostUtils.isValidIp... | {
"created": null,
"fork": null,
"fork_count": 2,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 62021204,
"size": 185,
"stargazer_count": 10,
"stars": null,
"updates": null,
"url": "https://github.com/cncduLee/async-event"
} |
62021204_12 | {
"fields": [
{
"declarator": "sub",
"modifier": "",
"original_string": "Sub sub;",
"type": "Sub",
"var_name": "sub"
},
{
"declarator": "method",
"modifier": "",
"original_string": "Method method;",
"type": "Method",
"var_name": "method"
},
... | {
"body": "@Test\n public void testReCreate() throws Exception {\n SimpleEvent simple = new SimpleEvent();\n simple.setData(DesCrypter.encrypt(new Gson().toJson(person)));\n Object obj = new EncryptEventCreator().reCreate(simple, Person.class);\n assertTrue(obj instanceof Person);\n ... | {
"fields": [
{
"declarator": "id",
"modifier": "private",
"original_string": "private long id;",
"type": "long",
"var_name": "id"
},
{
"declarator": "status",
"modifier": "private",
"original_string": "private int status;",
"type": "int",
"var_n... | {
"body": "public void setData(String data) {\n this.data = data;\n }",
"class_method_signature": "SimpleEvent.setData(String data)",
"constructor": false,
"full_signature": "public void setData(String data)",
"identifier": "setData",
"invocations": [],
"modifiers": "public",
"parameters": "(S... | {
"created": null,
"fork": null,
"fork_count": 2,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 62021204,
"size": 185,
"stargazer_count": 10,
"stars": null,
"updates": null,
"url": "https://github.com/cncduLee/async-event"
} |
62021204_13 | {
"fields": [
{
"declarator": "sub",
"modifier": "",
"original_string": "Sub sub;",
"type": "Sub",
"var_name": "sub"
},
{
"declarator": "method",
"modifier": "",
"original_string": "Method method;",
"type": "Method",
"var_name": "method"
},
... | {
"body": "@Test\n public void testReCreate_Empty(){\n SimpleEvent simple = new SimpleEvent();\n simple.setData(DesCrypter.encrypt(new Gson().toJson(new Person())));\n Object obj = new EncryptEventCreator().reCreate(simple, Person.class);\n assertTrue(obj != null);\n assertTrue(... | {
"fields": [
{
"declarator": "id",
"modifier": "private",
"original_string": "private long id;",
"type": "long",
"var_name": "id"
},
{
"declarator": "status",
"modifier": "private",
"original_string": "private int status;",
"type": "int",
"var_n... | {
"body": "public void setData(String data) {\n this.data = data;\n }",
"class_method_signature": "SimpleEvent.setData(String data)",
"constructor": false,
"full_signature": "public void setData(String data)",
"identifier": "setData",
"invocations": [],
"modifiers": "public",
"parameters": "(S... | {
"created": null,
"fork": null,
"fork_count": 2,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 62021204,
"size": 185,
"stargazer_count": 10,
"stars": null,
"updates": null,
"url": "https://github.com/cncduLee/async-event"
} |
62021204_7 | {
"fields": [],
"file": "async-event-core/src/test/java/com/cubbery/event/EventBusSpringTest.java",
"identifier": "EventBusSpringTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void ipStrToListTest_mutip() {\n String ipStr = \"127.0.0.1|127.0.0.2|127.0.0.4|10.9.45.12\";\n List<String> ipList = EventBusSpring.ipStrToList(ipStr);\n assertEquals(ipList.get(0),\"127.0.0.1\");\n assertEquals(ipList.get(1),\"127.0.0.2\");\n assertEqu... | {
"fields": [
{
"declarator": "eventBus",
"modifier": "private",
"original_string": "private EventBus eventBus;",
"type": "EventBus",
"var_name": "eventBus"
},
{
"declarator": "subscribers",
"modifier": "private",
"original_string": "private List<Object> sub... | {
"body": "public static List<String> ipStrToList(String blackIpStr) {\n List<String> ips = new ArrayList<String>();\n if(blackIpStr != null && !blackIpStr.equals(\"\")) {\n String[] arr = blackIpStr.split(\"\\\\|\");\n for(String ip : arr) {\n if(HostUtils.isValidIp... | {
"created": null,
"fork": null,
"fork_count": 2,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 62021204,
"size": 185,
"stargazer_count": 10,
"stars": null,
"updates": null,
"url": "https://github.com/cncduLee/async-event"
} |
220952727_16 | {
"fields": [
{
"declarator": "appController",
"modifier": "@Autowired\n private",
"original_string": "@Autowired\n private AppController appController;",
"type": "AppController",
"var_name": "appController"
},
{
"declarator": "appRepository",
"modifier": "@... | {
"body": "@Test\n public void nav() {\n App app = appRepository.findAll().get(0);\n Result<List<EnvClusterInfo>> navResult = appController.nav(app.getId());\n\n Assert.assertTrue(navResult.success());\n }",
"class_method_signature": "AppControllerTest.nav()",
"constructor": false,
"f... | {
"fields": [
{
"declarator": "appService",
"modifier": "@Autowired\n private",
"original_string": "@Autowired\n private AppService appService;",
"type": "AppService",
"var_name": "appService"
},
{
"declarator": "serverConfigUtil",
"modifier": "@Autowired\n ... | {
"body": "@ApiOperation(\"项目菜单\")\n @GetMapping(\"/{appId:\\\\d+}/navtree\")\n public Result<List<EnvClusterInfo>> nav(@PathVariable long appId) {\n List<EnvClusterInfo> envClusterInfoList = new ArrayList<>();\n List<String> envs = this.serverConfigUtil.getActiveEnvs();\n if (CollectionUti... | {
"created": null,
"fork": null,
"fork_count": 3,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 220952727,
"size": 21529,
"stargazer_count": 61,
"stars": null,
"updates": null,
"url": "https://github.com/garyxiong123/yyconfig"
} |
220952727_6 | {
"fields": [
{
"declarator": "appEnvClusterService",
"modifier": "@Autowired\n private",
"original_string": "@Autowired\n private AppEnvClusterService appEnvClusterService;",
"type": "AppEnvClusterService",
"var_name": "appEnvClusterService"
}
],
"file": "apollo/apollo... | {
"body": "@Test\n public void getAppEnvCluster() {\n }",
"class_method_signature": "AppEnvClusterServiceTest.getAppEnvCluster()",
"constructor": false,
"full_signature": "@Test public void getAppEnvCluster()",
"identifier": "getAppEnvCluster",
"invocations": [],
"modifiers": "@Test public",
"para... | {
"fields": [
{
"declarator": "appEnvClusterFactory",
"modifier": "@Autowired\n private",
"original_string": "@Autowired\n private AppEnvClusterFactory appEnvClusterFactory;",
"type": "AppEnvClusterFactory",
"var_name": "appEnvClusterFactory"
},
{
"declarator": "a... | {
"body": "public AppEnvCluster getAppEnvCluster(long appId, String env, String clusterName) {\n return appEnvClusterRepository.findClusterByAppIdAndEnvAndName(appId, env, clusterName);\n }",
"class_method_signature": "AppEnvClusterService.getAppEnvCluster(long appId, String env, String clusterName)",
"... | {
"created": null,
"fork": null,
"fork_count": 3,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 220952727,
"size": 21529,
"stargazer_count": 61,
"stars": null,
"updates": null,
"url": "https://github.com/garyxiong123/yyconfig"
} |
220952727_7 | {
"fields": [
{
"declarator": "appEnvClusterService",
"modifier": "@Autowired\n private",
"original_string": "@Autowired\n private AppEnvClusterService appEnvClusterService;",
"type": "AppEnvClusterService",
"var_name": "appEnvClusterService"
}
],
"file": "apollo/apollo... | {
"body": "@Test\n public void deleteAppEnvCluster() {\n }",
"class_method_signature": "AppEnvClusterServiceTest.deleteAppEnvCluster()",
"constructor": false,
"full_signature": "@Test public void deleteAppEnvCluster()",
"identifier": "deleteAppEnvCluster",
"invocations": [],
"modifiers": "@Test publ... | {
"fields": [
{
"declarator": "appEnvClusterFactory",
"modifier": "@Autowired\n private",
"original_string": "@Autowired\n private AppEnvClusterFactory appEnvClusterFactory;",
"type": "AppEnvClusterFactory",
"var_name": "appEnvClusterFactory"
},
{
"declarator": "a... | {
"body": "public void deleteAppEnvCluster(AppEnvCluster appEnvCluster) {\n appEnvClusterRepository.delete(appEnvCluster);\n // TODO: 2019-12-20 delete linked namespaces\n }",
"class_method_signature": "AppEnvClusterService.deleteAppEnvCluster(AppEnvCluster appEnvCluster)",
"constructor": false,
... | {
"created": null,
"fork": null,
"fork_count": 3,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 220952727,
"size": 21529,
"stargazer_count": 61,
"stars": null,
"updates": null,
"url": "https://github.com/garyxiong123/yyconfig"
} |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.