id stringlengths 7 14 | test_class dict | test_case dict | focal_class dict | focal_method dict | repository dict |
|---|---|---|---|---|---|
32377028_37 | {
"fields": [],
"file": "OtrosLogViewer-app/src/test/java/pl/otros/logview/accept/LevelLowerAcceptConditionTest.java",
"identifier": "LevelLowerAcceptConditionTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void testAccept() {\n // given\n LogData ld = new LogData();\n ld.setLevel(Level.INFO);\n\n // when\n // then\n assertFalse(new LevelLowerAcceptCondition(Level.FINEST).accept(ld));\n assertFalse(new LevelLowerAcceptCondition(Level.FINER).accept(ld));\n assertFalse(ne... | {
"fields": [
{
"declarator": "level",
"modifier": "protected",
"original_string": "protected Level level;",
"type": "Level",
"var_name": "level"
},
{
"declarator": "icon",
"modifier": "protected",
"original_string": "protected Icon icon;",
"type": "Ic... | {
"body": "@Override\n public boolean accept(LogData data) {\n return data.getLevel() != null && data.getLevel().intValue() < levelIntValue;\n }",
"class_method_signature": "LevelLowerAcceptCondition.accept(LogData data)",
"constructor": false,
"full_signature": "@Override public boolean accept(LogData dat... | {
"created": null,
"fork": null,
"fork_count": 76,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 32377028,
"size": 8314,
"stargazer_count": 332,
"stars": null,
"updates": null,
"url": "https://github.com/otros-systems/otroslogviewer"
} |
32377028_126 | {
"fields": [
{
"declarator": "LOG_EVENT_COUNT = 1000",
"modifier": "public static final",
"original_string": "public static final int LOG_EVENT_COUNT = 1000;",
"type": "int",
"var_name": "LOG_EVENT_COUNT"
},
{
"declarator": "TEST_THREAD_POOL_NAME = \"TestThreadPoolName... | {
"body": "@Test\n public void testGetMarkerColors() throws Exception {\n AssertJUnit.assertEquals(MarkerColors.Aqua, store.getMarkerColors(10));\n AssertJUnit.assertEquals(MarkerColors.Aqua, store.getMarkerColors(20));\n AssertJUnit.assertEquals(MarkerColors.Aqua, store.getMarkerColors(30));\n AssertJUn... | {
"fields": [
{
"declarator": "logDataStore",
"modifier": "private final",
"original_string": "private final LogDataStore logDataStore;",
"type": "LogDataStore",
"var_name": "logDataStore"
},
{
"declarator": "service",
"modifier": "private final",
"original_... | {
"body": "@Override\n public MarkerColors getMarkerColors(int row) {\n //TODO filter support\n try {\n return service.submit(new OperationGetMarkerColors(logDataStore, row)).get();\n } catch (InterruptedException | ExecutionException e) {\n e.printStackTrace();\n }\n return null;\n }",
"... | {
"created": null,
"fork": null,
"fork_count": 76,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 32377028,
"size": 8314,
"stargazer_count": 332,
"stars": null,
"updates": null,
"url": "https://github.com/otros-systems/otroslogviewer"
} |
32377028_60 | {
"fields": [],
"file": "OtrosLogViewer-app/src/test/java/pl/otros/logview/accept/SelectedClassAcceptConditionTest.java",
"identifier": "SelectedClassAcceptConditionTest",
"interfaces": "",
"superclass": "extends SelectionAwareAcceptConditionTestBase"
} | {
"body": "@Test\n public void testAccept() {\n SelectedClassAcceptCondition acceptCondition = new SelectedClassAcceptCondition(table, dataTableModel);\n table.getSelectionModel().addListSelectionListener(acceptCondition);\n table.getSelectionModel().setSelectionInterval(1, 2);\n LogData[] logData = data... | {
"fields": [
{
"declarator": "classes",
"modifier": "protected",
"original_string": "protected Set<String> classes;",
"type": "Set<String>",
"var_name": "classes"
}
],
"file": "OtrosLogViewer-app/src/main/java/pl/otros/logview/accept/SelectedClassAcceptCondition.java",
"id... | {
"body": "public boolean accept(LogData data) {\n return classes.contains(data.getClazz());\n }",
"class_method_signature": "SelectedClassAcceptCondition.accept(LogData data)",
"constructor": false,
"full_signature": "public boolean accept(LogData data)",
"identifier": "accept",
"invocations": [
"c... | {
"created": null,
"fork": null,
"fork_count": 76,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 32377028,
"size": 8314,
"stargazer_count": 332,
"stars": null,
"updates": null,
"url": "https://github.com/otros-systems/otroslogviewer"
} |
32377028_223 | {
"fields": [
{
"declarator": "LOGGER = LoggerFactory.getLogger(LoadingRunnableTest.class)",
"modifier": "private static final",
"original_string": "private static final Logger LOGGER = LoggerFactory.getLogger(LoadingRunnableTest.class);",
"type": "Logger",
"var_name": "LOGGER"
}... | {
"body": "@Test(invocationCount = 5)\n public void testLoadStatisticEmptyOnStartWithLogParser() {\n underTest = createLoadingRunnable(getJulLogParser());\n\n Assert.assertEquals(underTest.getLoadStatistic().getPosition(), 0);\n\n executorService.submit(underTest);\n\n await().until(() -> underTest.getLo... | {
"fields": [
{
"declarator": "LOGGER = org.slf4j.LoggerFactory.getLogger(LoadingRunnable.class)",
"modifier": "private static final",
"original_string": "private static final Logger LOGGER = org.slf4j.LoggerFactory.getLogger(LoadingRunnable.class);",
"type": "Logger",
"var_name": "L... | {
"body": "public synchronized LoadStatistic getLoadStatistic() {\n final Long position = obserableInputStreamImpl.map(ObservableInputStreamImpl::getCurrentRead).orElse(0L);\n return new LoadStatistic(source, position, lastFileSize);\n }",
"class_method_signature": "LoadingRunnable.getLoadStatistic()",
"co... | {
"created": null,
"fork": null,
"fork_count": 76,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 32377028,
"size": 8314,
"stargazer_count": 332,
"stars": null,
"updates": null,
"url": "https://github.com/otros-systems/otroslogviewer"
} |
58208693_30 | {
"fields": [
{
"declarator": "namespaceTable = new NamespaceTable()",
"modifier": "private final",
"original_string": "private final NamespaceTable namespaceTable = new NamespaceTable();",
"type": "NamespaceTable",
"var_name": "namespaceTable"
}
],
"file": "opc-ua-stack/stac... | {
"body": "@Test\n public void testToParseableString() {\n String withoutNamespaceUri = new ExpandedNodeId(ushort(1), null, uint(0)).toParseableString();\n assertEquals(withoutNamespaceUri, \"ns=1;i=0\");\n\n String withNamespaceUri = new ExpandedNodeId(ushort(0), \"urn:test\", uint(0)).toPars... | {
"fields": [
{
"declarator": "NULL_VALUE = new ExpandedNodeId(\n UShort.MIN,\n null,\n UInteger.MIN,\n UInteger.MIN\n )",
"modifier": "public static final",
"original_string": "public static final ExpandedNodeId NULL_VALUE = new ExpandedNodeId(\n UShort.MIN... | {
"body": "public String toParseableString() {\n StringBuilder sb = new StringBuilder();\n\n if (serverIndex.intValue() != 0) {\n sb.append(\"svr=\").append(serverIndex).append(\";\");\n }\n\n if (namespaceUri != null) {\n sb.append(\"nsu=\").append(namespaceUri).appe... | {
"created": "5/6/2016 1:20:04 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 58208693,
"size": null,
"stargazer_count": null,
"stars": 405,
"updates": "2020-01-26T11:03:08+00:00",
"url": "https://github.com/eclipse/milo"
} |
58208693_3 | {
"fields": [
{
"declarator": "ALIAS_CA_INTERMEDIATE = \"ca-intermediate\"",
"modifier": "private static final",
"original_string": "private static final String ALIAS_CA_INTERMEDIATE = \"ca-intermediate\";",
"type": "String",
"var_name": "ALIAS_CA_INTERMEDIATE"
},
{
"de... | {
"body": "@Test\n public void testBuildTrustedCertPath_NoTrusted_NoIssuers() {\n expectThrows(UaException.class, () ->\n buildTrustedCertPath(\n newArrayList(leafSelfSigned),\n emptySet(),\n emptySet()\n )\n );\n\n expectThrow... | {
"fields": [
{
"declarator": "LOGGER = LoggerFactory.getLogger(CertificateValidationUtil.class)",
"modifier": "private static final",
"original_string": "private static final Logger LOGGER = LoggerFactory.getLogger(CertificateValidationUtil.class);",
"type": "Logger",
"var_name": "L... | {
"body": "public static PKIXCertPathBuilderResult buildTrustedCertPath(\n List<X509Certificate> certificateChain,\n Collection<X509Certificate> trustedCertificates,\n Collection<X509Certificate> issuerCertificates\n ) throws UaException {\n\n Preconditions.checkArgument(!certificateCha... | {
"created": "5/6/2016 1:20:04 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 58208693,
"size": null,
"stargazer_count": null,
"stars": 405,
"updates": "2020-01-26T11:03:08+00:00",
"url": "https://github.com/eclipse/milo"
} |
58208693_88 | {
"fields": [
{
"declarator": "CONVERSIONS = new Object[][]{\n {ubyte(0), Boolean.FALSE},\n {ubyte(1), Boolean.TRUE},\n\n {ubyte(0), 0.0d},\n {ubyte(1), 1.0d},\n\n {ubyte(0), 0.0f},\n {ubyte(1), 1.0f}\n }",
"modifier": "public static final",
"original... | {
"body": "@Test\n public void testByteToInt16() {\n assertEquals(byteToInt16(ubyte(0)), Short.valueOf((short) 0));\n assertEquals(byteToInt16(ubyte(1)), Short.valueOf((short) 1));\n }",
"class_method_signature": "ByteConversionsTest.testByteToInt16()",
"constructor": false,
"full_signature"... | {
"fields": [],
"file": "opc-ua-sdk/sdk-server/src/main/java/org/eclipse/milo/opcua/sdk/server/events/conversions/ByteConversions.java",
"identifier": "ByteConversions",
"interfaces": "",
"methods": [
{
"class_method_signature": "ByteConversions.ByteConversions()",
"constructor": true,
"... | {
"body": "@Nonnull\n static Short byteToInt16(@Nonnull UByte ub) {\n return ub.shortValue();\n }",
"class_method_signature": "ByteConversions.byteToInt16(@Nonnull UByte ub)",
"constructor": false,
"full_signature": "@Nonnull static Short byteToInt16(@Nonnull UByte ub)",
"identifier": "byteToInt1... | {
"created": "5/6/2016 1:20:04 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 58208693,
"size": null,
"stargazer_count": null,
"stars": 405,
"updates": "2020-01-26T11:03:08+00:00",
"url": "https://github.com/eclipse/milo"
} |
58208693_67 | {
"fields": [],
"file": "opc-ua-sdk/sdk-server/src/test/java/org/eclipse/milo/opcua/sdk/server/events/conversions/BooleanConversionsTest.java",
"identifier": "BooleanConversionsTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void testBooleanToInt16() {\n assertEquals((short) booleanToInt16(false), 0);\n assertEquals((short) booleanToInt16(true), 1);\n }",
"class_method_signature": "BooleanConversionsTest.testBooleanToInt16()",
"constructor": false,
"full_signature": "@Test public void t... | {
"fields": [],
"file": "opc-ua-sdk/sdk-server/src/main/java/org/eclipse/milo/opcua/sdk/server/events/conversions/BooleanConversions.java",
"identifier": "BooleanConversions",
"interfaces": "",
"methods": [
{
"class_method_signature": "BooleanConversions.BooleanConversions()",
"constructor": t... | {
"body": "@Nonnull\n static Short booleanToInt16(@Nonnull Boolean b) {\n return b ? (short) 1 : (short) 0;\n }",
"class_method_signature": "BooleanConversions.booleanToInt16(@Nonnull Boolean b)",
"constructor": false,
"full_signature": "@Nonnull static Short booleanToInt16(@Nonnull Boolean b)",
... | {
"created": "5/6/2016 1:20:04 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 58208693,
"size": null,
"stargazer_count": null,
"stars": 405,
"updates": "2020-01-26T11:03:08+00:00",
"url": "https://github.com/eclipse/milo"
} |
58208693_71 | {
"fields": [],
"file": "opc-ua-sdk/sdk-server/src/test/java/org/eclipse/milo/opcua/sdk/server/events/conversions/BooleanConversionsTest.java",
"identifier": "BooleanConversionsTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void testBooleanToString() {\n assertEquals(booleanToString(true), \"1\");\n assertEquals(booleanToString(false), \"0\");\n }",
"class_method_signature": "BooleanConversionsTest.testBooleanToString()",
"constructor": false,
"full_signature": "@Test public void testB... | {
"fields": [],
"file": "opc-ua-sdk/sdk-server/src/main/java/org/eclipse/milo/opcua/sdk/server/events/conversions/BooleanConversions.java",
"identifier": "BooleanConversions",
"interfaces": "",
"methods": [
{
"class_method_signature": "BooleanConversions.BooleanConversions()",
"constructor": t... | {
"body": "@Nonnull\n static String booleanToString(@Nonnull Boolean b) {\n return b ? \"1\" : \"0\";\n }",
"class_method_signature": "BooleanConversions.booleanToString(@Nonnull Boolean b)",
"constructor": false,
"full_signature": "@Nonnull static String booleanToString(@Nonnull Boolean b)",
"id... | {
"created": "5/6/2016 1:20:04 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 58208693,
"size": null,
"stargazer_count": null,
"stars": 405,
"updates": "2020-01-26T11:03:08+00:00",
"url": "https://github.com/eclipse/milo"
} |
58208693_26 | {
"fields": [],
"file": "opc-ua-stack/stack-core/src/test/java/org/eclipse/milo/opcua/stack/core/channel/messages/HelloMessageTest.java",
"identifier": "HelloMessageTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void testDecodeFailsWhenEndpointUrlTooLarge() throws UaException {\n for (int i = 0; i < HelloMessage.MAX_ENDPOINT_URL_LENGTH * 2; i++) {\n ByteBuf buffer = Unpooled.buffer();\n buffer.writeIntLE(0);\n buffer.writeIntLE(8192);\n buffer.wr... | {
"fields": [
{
"declarator": "MAX_ENDPOINT_URL_LENGTH = 4096",
"modifier": "static final",
"original_string": "static final int MAX_ENDPOINT_URL_LENGTH = 4096;",
"type": "int",
"var_name": "MAX_ENDPOINT_URL_LENGTH"
},
{
"declarator": "protocolVersion",
"modifier"... | {
"body": "public static HelloMessage decode(ByteBuf buffer) throws UaException {\n return new HelloMessage(\n buffer.readUnsignedIntLE(), /* ProtocolVersion */\n buffer.readUnsignedIntLE(), /* ReceiveBufferSize */\n buffer.readUnsignedIntLE(), /* SendBufferSize ... | {
"created": "5/6/2016 1:20:04 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 58208693,
"size": null,
"stargazer_count": null,
"stars": 405,
"updates": "2020-01-26T11:03:08+00:00",
"url": "https://github.com/eclipse/milo"
} |
58208693_84 | {
"fields": [
{
"declarator": "CONVERSIONS = new Object[][]{\n {ubyte(0), Boolean.FALSE},\n {ubyte(1), Boolean.TRUE},\n\n {ubyte(0), 0.0d},\n {ubyte(1), 1.0d},\n\n {ubyte(0), 0.0f},\n {ubyte(1), 1.0f}\n }",
"modifier": "public static final",
"original... | {
"body": "@Test\n public void testConversions() {\n for (Object[] conversion : CONVERSIONS) {\n UByte b = (UByte) conversion[0];\n Object expected = conversion[1];\n BuiltinDataType targetType = BuiltinDataType\n .fromBackingClass(expected.getClass());\n\n ... | {
"fields": [],
"file": "opc-ua-sdk/sdk-server/src/main/java/org/eclipse/milo/opcua/sdk/server/events/conversions/ByteConversions.java",
"identifier": "ByteConversions",
"interfaces": "",
"methods": [
{
"class_method_signature": "ByteConversions.ByteConversions()",
"constructor": true,
"... | {
"body": "@Nullable\n static Object explicitConversion(@Nonnull UByte b, BuiltinDataType targetType) {\n //@formatter:off\n switch (targetType) {\n case Boolean: return byteToBoolean(b);\n case String: return byteToString(b);\n default: return implicitCon... | {
"created": "5/6/2016 1:20:04 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 58208693,
"size": null,
"stargazer_count": null,
"stars": 405,
"updates": "2020-01-26T11:03:08+00:00",
"url": "https://github.com/eclipse/milo"
} |
58208693_92 | {
"fields": [
{
"declarator": "CONVERSIONS = new Object[][]{\n {ubyte(0), Boolean.FALSE},\n {ubyte(1), Boolean.TRUE},\n\n {ubyte(0), 0.0d},\n {ubyte(1), 1.0d},\n\n {ubyte(0), 0.0f},\n {ubyte(1), 1.0f}\n }",
"modifier": "public static final",
"original... | {
"body": "@Test\n public void testByteToString() {\n assertEquals(byteToString(ubyte(0)), \"0\");\n assertEquals(byteToString(ubyte(1)), \"1\");\n }",
"class_method_signature": "ByteConversionsTest.testByteToString()",
"constructor": false,
"full_signature": "@Test public void testByteToStr... | {
"fields": [],
"file": "opc-ua-sdk/sdk-server/src/main/java/org/eclipse/milo/opcua/sdk/server/events/conversions/ByteConversions.java",
"identifier": "ByteConversions",
"interfaces": "",
"methods": [
{
"class_method_signature": "ByteConversions.ByteConversions()",
"constructor": true,
"... | {
"body": "@Nonnull\n static String byteToString(@Nonnull UByte ub) {\n return ub.toString();\n }",
"class_method_signature": "ByteConversions.byteToString(@Nonnull UByte ub)",
"constructor": false,
"full_signature": "@Nonnull static String byteToString(@Nonnull UByte ub)",
"identifier": "byteToS... | {
"created": "5/6/2016 1:20:04 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 58208693,
"size": null,
"stargazer_count": null,
"stars": 405,
"updates": "2020-01-26T11:03:08+00:00",
"url": "https://github.com/eclipse/milo"
} |
58208693_51 | {
"fields": [],
"file": "opc-ua-sdk/sdk-server/src/test/java/org/eclipse/milo/opcua/sdk/server/LifecycleManagerTest.java",
"identifier": "LifecycleManagerTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void testStartupOrder() {\n LifecycleManager manager = new LifecycleManager();\n\n AtomicInteger i = new AtomicInteger(0);\n manager.addStartupTask(() -> assertEquals(i.getAndIncrement(), 0));\n manager.addStartupTask(() -> assertEquals(i.getAndIncrement(), 1))... | {
"fields": [
{
"declarator": "lifecycles = new CopyOnWriteArrayList<>()",
"modifier": "private final",
"original_string": "private final CopyOnWriteArrayList<Lifecycle> lifecycles = new CopyOnWriteArrayList<>();",
"type": "CopyOnWriteArrayList<Lifecycle>",
"var_name": "lifecycles"
... | {
"body": "public Lifecycle addStartupTask(Runnable startupTask) {\n Lifecycle lifecycle = new Lifecycle() {\n @Override\n public void startup() {\n startupTask.run();\n }\n\n @Override\n public void shutdown() {}\n };\n\n addL... | {
"created": "5/6/2016 1:20:04 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 58208693,
"size": null,
"stargazer_count": null,
"stars": 405,
"updates": "2020-01-26T11:03:08+00:00",
"url": "https://github.com/eclipse/milo"
} |
58208693_10 | {
"fields": [],
"file": "opc-ua-stack/stack-core/src/test/java/org/eclipse/milo/opcua/stack/core/util/EndpointUtilTest.java",
"identifier": "EndpointUtilTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void testGetPath_EmptyAndSlash() {\n assertEquals(EndpointUtil.getPath(\"opc.tcp://localhost:4840\"), \"/\");\n assertEquals(EndpointUtil.getPath(\"opc.tcp://localhost:4840/\"), \"/\");\n assertEquals(EndpointUtil.getPath(\"opc.tcp://invalid_host:4840\"), \"/\");\n ... | {
"fields": [
{
"declarator": "ENDPOINT_URL_PATTERN =\n Pattern.compile(\"(opc.tcp|http|https|opc.http|opc.https|opc.ws|opc.wss)://([^:/]+|\\\\[.*])(:\\\\d+)?(/.*)?\")",
"modifier": "private static final",
"original_string": "private static final Pattern ENDPOINT_URL_PATTERN =\n Pa... | {
"body": "@Nonnull\n public static String getPath(@Nonnull String endpointUrl) {\n Matcher matcher = ENDPOINT_URL_PATTERN.matcher(endpointUrl);\n\n if (matcher.matches()) {\n String path = matcher.group(4);\n\n if (path == null || path.isEmpty()) {\n path = \"/\"... | {
"created": "5/6/2016 1:20:04 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 58208693,
"size": null,
"stargazer_count": null,
"stars": 405,
"updates": "2020-01-26T11:03:08+00:00",
"url": "https://github.com/eclipse/milo"
} |
58208693_47 | {
"fields": [
{
"declarator": "nodeManager = new UaNodeManager()",
"modifier": "private final",
"original_string": "private final UaNodeManager nodeManager = new UaNodeManager();",
"type": "UaNodeManager",
"var_name": "nodeManager"
},
{
"declarator": "context = new UaNo... | {
"body": "@Test\n public void testObservable() {\n final AtomicBoolean observed = new AtomicBoolean(false);\n\n UaVariableNode node = new UaVariableNode.UaVariableNodeBuilder(context)\n .setNodeId(NodeId.NULL_VALUE)\n .setAccessLevel(AccessLevel.READ_WRITE)\n .setBro... | {
"fields": [
{
"declarator": "filters = new ConcurrentLinkedDeque<>()",
"modifier": "private final",
"original_string": "private final ConcurrentLinkedDeque<AttributeFilter> filters = new ConcurrentLinkedDeque<>();",
"type": "ConcurrentLinkedDeque<AttributeFilter>",
"var_name": "fil... | {
"body": "public AttributeFilterChain addLast(AttributeFilter attributeFilter) {\n filters.addLast(attributeFilter);\n\n return this;\n }",
"class_method_signature": "AttributeFilterChain.addLast(AttributeFilter attributeFilter)",
"constructor": false,
"full_signature": "public AttributeFilter... | {
"created": "5/6/2016 1:20:04 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 58208693,
"size": null,
"stargazer_count": null,
"stars": 405,
"updates": "2020-01-26T11:03:08+00:00",
"url": "https://github.com/eclipse/milo"
} |
58208693_46 | {
"fields": [
{
"declarator": "nodeManager = new UaNodeManager()",
"modifier": "private final",
"original_string": "private final UaNodeManager nodeManager = new UaNodeManager();",
"type": "UaNodeManager",
"var_name": "nodeManager"
},
{
"declarator": "context = new UaNo... | {
"body": "@Test\n public void testEmptyChain() {\n UaVariableNode node = new UaVariableNode.UaVariableNodeBuilder(context)\n .setNodeId(NodeId.NULL_VALUE)\n .setAccessLevel(AccessLevel.READ_WRITE)\n .setBrowseName(QualifiedName.NULL_VALUE)\n .setDisplayName(Local... | {
"fields": [
{
"declarator": "filters = new ConcurrentLinkedDeque<>()",
"modifier": "private final",
"original_string": "private final ConcurrentLinkedDeque<AttributeFilter> filters = new ConcurrentLinkedDeque<>();",
"type": "ConcurrentLinkedDeque<AttributeFilter>",
"var_name": "fil... | {
"body": "public Object getAttribute(UaNode node, AttributeId attributeId) {\n return getAttribute(null, node, attributeId);\n }",
"class_method_signature": "AttributeFilterChain.getAttribute(UaNode node, AttributeId attributeId)",
"constructor": false,
"full_signature": "public Object getAttribute(U... | {
"created": "5/6/2016 1:20:04 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 58208693,
"size": null,
"stargazer_count": null,
"stars": 405,
"updates": "2020-01-26T11:03:08+00:00",
"url": "https://github.com/eclipse/milo"
} |
58208693_11 | {
"fields": [],
"file": "opc-ua-stack/stack-core/src/test/java/org/eclipse/milo/opcua/stack/core/util/EndpointUtilTest.java",
"identifier": "EndpointUtilTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void testGetPath_Invalid() {\n assertEquals(EndpointUtil.getPath(\"opc.tcp://localhost:4840/no spaces allowed\"),\n \"/no spaces allowed\");\n }",
"class_method_signature": "EndpointUtilTest.testGetPath_Invalid()",
"constructor": false,
"full_signature": "@Test ... | {
"fields": [
{
"declarator": "ENDPOINT_URL_PATTERN =\n Pattern.compile(\"(opc.tcp|http|https|opc.http|opc.https|opc.ws|opc.wss)://([^:/]+|\\\\[.*])(:\\\\d+)?(/.*)?\")",
"modifier": "private static final",
"original_string": "private static final Pattern ENDPOINT_URL_PATTERN =\n Pa... | {
"body": "@Nonnull\n public static String getPath(@Nonnull String endpointUrl) {\n Matcher matcher = ENDPOINT_URL_PATTERN.matcher(endpointUrl);\n\n if (matcher.matches()) {\n String path = matcher.group(4);\n\n if (path == null || path.isEmpty()) {\n path = \"/\"... | {
"created": "5/6/2016 1:20:04 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 58208693,
"size": null,
"stargazer_count": null,
"stars": 405,
"updates": "2020-01-26T11:03:08+00:00",
"url": "https://github.com/eclipse/milo"
} |
58208693_50 | {
"fields": [],
"file": "opc-ua-sdk/sdk-server/src/test/java/org/eclipse/milo/opcua/sdk/server/nodes/factories/InstanceDeclarationHierarchyTest.java",
"identifier": "InstanceDeclarationHierarchyTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void test() throws Exception {\n NamespaceTable namespaceTable = new NamespaceTable();\n\n UaNodeManager nodeManager = new UaNodeManager();\n\n AddressSpaceManager addressSpaceManager = Mockito.mock(AddressSpaceManager.class);\n\n Mockito\n .when(add... | {
"fields": [
{
"declarator": "typeId",
"modifier": "private final",
"original_string": "private final NodeId typeId;",
"type": "NodeId",
"var_name": "typeId"
},
{
"declarator": "nodeTable",
"modifier": "private final",
"original_string": "private final Node... | {
"body": "public static InstanceDeclarationHierarchy create(\n AddressSpaceManager addressSpaceManager,\n NamespaceTable namespaceTable,\n NodeId typeDefinitionId\n ) {\n\n Builder builder = new Builder(addressSpaceManager, namespaceTable);\n\n return builder.build(typeDefinitio... | {
"created": "5/6/2016 1:20:04 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 58208693,
"size": null,
"stargazer_count": null,
"stars": 405,
"updates": "2020-01-26T11:03:08+00:00",
"url": "https://github.com/eclipse/milo"
} |
58208693_93 | {
"fields": [
{
"declarator": "CONVERSIONS = new Object[][]{\n {ubyte(0), Boolean.FALSE},\n {ubyte(1), Boolean.TRUE},\n\n {ubyte(0), 0.0d},\n {ubyte(1), 1.0d},\n\n {ubyte(0), 0.0f},\n {ubyte(1), 1.0f}\n }",
"modifier": "public static final",
"original... | {
"body": "@Test\n public void testByteToUInt16() {\n assertEquals(byteToUInt16(UByte.MIN), ushort(UByte.MIN_VALUE));\n assertEquals(byteToUInt16(UByte.MAX), ushort(UByte.MAX_VALUE));\n }",
"class_method_signature": "ByteConversionsTest.testByteToUInt16()",
"constructor": false,
"full_signat... | {
"fields": [],
"file": "opc-ua-sdk/sdk-server/src/main/java/org/eclipse/milo/opcua/sdk/server/events/conversions/ByteConversions.java",
"identifier": "ByteConversions",
"interfaces": "",
"methods": [
{
"class_method_signature": "ByteConversions.ByteConversions()",
"constructor": true,
"... | {
"body": "@Nonnull\n static UShort byteToUInt16(@Nonnull UByte ub) {\n return ushort(ub.intValue());\n }",
"class_method_signature": "ByteConversions.byteToUInt16(@Nonnull UByte ub)",
"constructor": false,
"full_signature": "@Nonnull static UShort byteToUInt16(@Nonnull UByte ub)",
"identifier": ... | {
"created": "5/6/2016 1:20:04 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 58208693,
"size": null,
"stargazer_count": null,
"stars": 405,
"updates": "2020-01-26T11:03:08+00:00",
"url": "https://github.com/eclipse/milo"
} |
58208693_85 | {
"fields": [
{
"declarator": "CONVERSIONS = new Object[][]{\n {ubyte(0), Boolean.FALSE},\n {ubyte(1), Boolean.TRUE},\n\n {ubyte(0), 0.0d},\n {ubyte(1), 1.0d},\n\n {ubyte(0), 0.0f},\n {ubyte(1), 1.0f}\n }",
"modifier": "public static final",
"original... | {
"body": "@Test\n public void testByteToBoolean() {\n assertEquals(byteToBoolean(ubyte(0)), Boolean.FALSE);\n assertEquals(byteToBoolean(ubyte(1)), Boolean.TRUE);\n }",
"class_method_signature": "ByteConversionsTest.testByteToBoolean()",
"constructor": false,
"full_signature": "@Test public... | {
"fields": [],
"file": "opc-ua-sdk/sdk-server/src/main/java/org/eclipse/milo/opcua/sdk/server/events/conversions/ByteConversions.java",
"identifier": "ByteConversions",
"interfaces": "",
"methods": [
{
"class_method_signature": "ByteConversions.ByteConversions()",
"constructor": true,
"... | {
"body": "@Nonnull\n static Boolean byteToBoolean(@Nonnull UByte ub) {\n return ub.intValue() != 0;\n }",
"class_method_signature": "ByteConversions.byteToBoolean(@Nonnull UByte ub)",
"constructor": false,
"full_signature": "@Nonnull static Boolean byteToBoolean(@Nonnull UByte ub)",
"identifier"... | {
"created": "5/6/2016 1:20:04 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 58208693,
"size": null,
"stargazer_count": null,
"stars": 405,
"updates": "2020-01-26T11:03:08+00:00",
"url": "https://github.com/eclipse/milo"
} |
58208693_27 | {
"fields": [],
"file": "opc-ua-stack/stack-core/src/test/java/org/eclipse/milo/opcua/stack/core/types/builtin/DateTimeTest.java",
"identifier": "DateTimeTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void getJavaInstant() {\n ZonedDateTime inputZdt = LocalDateTime\n .of(2020, Month.JANUARY, 10, 20, 30, 40, 123_456_789)\n .atZone(ZoneId.systemDefault());\n\n Instant endInstant = inputZdt.toInstant();\n\n DateTime dateTime = new DateTime(endIns... | {
"fields": [
{
"declarator": "USE_NANOS = false",
"modifier": "public static volatile",
"original_string": "public static volatile boolean USE_NANOS = false;",
"type": "boolean",
"var_name": "USE_NANOS"
},
{
"declarator": "MIN_VALUE = new DateTime(0L)",
"modifier... | {
"body": "public Instant getJavaInstant() {\n return Instant.ofEpochSecond(utcToJava(utcTime) / 1_000, (utcTime % 10_000_000) * 100);\n }",
"class_method_signature": "DateTime.getJavaInstant()",
"constructor": false,
"full_signature": "public Instant getJavaInstant()",
"identifier": "getJavaInstant... | {
"created": "5/6/2016 1:20:04 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 58208693,
"size": null,
"stargazer_count": null,
"stars": 405,
"updates": "2020-01-26T11:03:08+00:00",
"url": "https://github.com/eclipse/milo"
} |
58208693_70 | {
"fields": [],
"file": "opc-ua-sdk/sdk-server/src/test/java/org/eclipse/milo/opcua/sdk/server/events/conversions/BooleanConversionsTest.java",
"identifier": "BooleanConversionsTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void testBooleanToSByte() {\n assertEquals((byte) booleanToSByte(false), 0);\n assertEquals((byte) booleanToSByte(true), 1);\n }",
"class_method_signature": "BooleanConversionsTest.testBooleanToSByte()",
"constructor": false,
"full_signature": "@Test public void tes... | {
"fields": [],
"file": "opc-ua-sdk/sdk-server/src/main/java/org/eclipse/milo/opcua/sdk/server/events/conversions/BooleanConversions.java",
"identifier": "BooleanConversions",
"interfaces": "",
"methods": [
{
"class_method_signature": "BooleanConversions.BooleanConversions()",
"constructor": t... | {
"body": "@Nonnull\n static Byte booleanToSByte(@Nonnull Boolean b) {\n return b ? (byte) 1 : (byte) 0;\n }",
"class_method_signature": "BooleanConversions.booleanToSByte(@Nonnull Boolean b)",
"constructor": false,
"full_signature": "@Nonnull static Byte booleanToSByte(@Nonnull Boolean b)",
"ide... | {
"created": "5/6/2016 1:20:04 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 58208693,
"size": null,
"stargazer_count": null,
"stars": 405,
"updates": "2020-01-26T11:03:08+00:00",
"url": "https://github.com/eclipse/milo"
} |
58208693_89 | {
"fields": [
{
"declarator": "CONVERSIONS = new Object[][]{\n {ubyte(0), Boolean.FALSE},\n {ubyte(1), Boolean.TRUE},\n\n {ubyte(0), 0.0d},\n {ubyte(1), 1.0d},\n\n {ubyte(0), 0.0f},\n {ubyte(1), 1.0f}\n }",
"modifier": "public static final",
"original... | {
"body": "@Test\n public void testByteToInt32() {\n assertEquals(byteToInt32(ubyte(0)), Integer.valueOf(0));\n assertEquals(byteToInt32(ubyte(1)), Integer.valueOf(1));\n }",
"class_method_signature": "ByteConversionsTest.testByteToInt32()",
"constructor": false,
"full_signature": "@Test pub... | {
"fields": [],
"file": "opc-ua-sdk/sdk-server/src/main/java/org/eclipse/milo/opcua/sdk/server/events/conversions/ByteConversions.java",
"identifier": "ByteConversions",
"interfaces": "",
"methods": [
{
"class_method_signature": "ByteConversions.ByteConversions()",
"constructor": true,
"... | {
"body": "@Nonnull\n static Integer byteToInt32(@Nonnull UByte ub) {\n return ub.intValue();\n }",
"class_method_signature": "ByteConversions.byteToInt32(@Nonnull UByte ub)",
"constructor": false,
"full_signature": "@Nonnull static Integer byteToInt32(@Nonnull UByte ub)",
"identifier": "byteToIn... | {
"created": "5/6/2016 1:20:04 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 58208693,
"size": null,
"stargazer_count": null,
"stars": 405,
"updates": "2020-01-26T11:03:08+00:00",
"url": "https://github.com/eclipse/milo"
} |
58208693_66 | {
"fields": [],
"file": "opc-ua-sdk/sdk-server/src/test/java/org/eclipse/milo/opcua/sdk/server/events/conversions/BooleanConversionsTest.java",
"identifier": "BooleanConversionsTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void testBooleanToFloat() {\n assertEquals(booleanToFloat(false), 0.0f);\n assertEquals(booleanToFloat(true), 1.0f);\n }",
"class_method_signature": "BooleanConversionsTest.testBooleanToFloat()",
"constructor": false,
"full_signature": "@Test public void testBoolean... | {
"fields": [],
"file": "opc-ua-sdk/sdk-server/src/main/java/org/eclipse/milo/opcua/sdk/server/events/conversions/BooleanConversions.java",
"identifier": "BooleanConversions",
"interfaces": "",
"methods": [
{
"class_method_signature": "BooleanConversions.BooleanConversions()",
"constructor": t... | {
"body": "@Nonnull\n static Float booleanToFloat(@Nonnull Boolean b) {\n return b ? 1.0f : 0.0f;\n }",
"class_method_signature": "BooleanConversions.booleanToFloat(@Nonnull Boolean b)",
"constructor": false,
"full_signature": "@Nonnull static Float booleanToFloat(@Nonnull Boolean b)",
"identifie... | {
"created": "5/6/2016 1:20:04 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 58208693,
"size": null,
"stargazer_count": null,
"stars": 405,
"updates": "2020-01-26T11:03:08+00:00",
"url": "https://github.com/eclipse/milo"
} |
58208693_2 | {
"fields": [
{
"declarator": "ALIAS_CA_INTERMEDIATE = \"ca-intermediate\"",
"modifier": "private static final",
"original_string": "private static final String ALIAS_CA_INTERMEDIATE = \"ca-intermediate\";",
"type": "String",
"var_name": "ALIAS_CA_INTERMEDIATE"
},
{
"de... | {
"body": "@Test\n public void testBuildTrustedCertPath_LeafIntermediateSigned() throws Exception {\n // chain: leaf\n // trusted: ca-intermedate\n // issuers: ca-root\n {\n List<X509Certificate> certificateChain = newArrayList(leafIntermediateSigned);\n\n buildTru... | {
"fields": [
{
"declarator": "LOGGER = LoggerFactory.getLogger(CertificateValidationUtil.class)",
"modifier": "private static final",
"original_string": "private static final Logger LOGGER = LoggerFactory.getLogger(CertificateValidationUtil.class);",
"type": "Logger",
"var_name": "L... | {
"body": "public static PKIXCertPathBuilderResult buildTrustedCertPath(\n List<X509Certificate> certificateChain,\n Collection<X509Certificate> trustedCertificates,\n Collection<X509Certificate> issuerCertificates\n ) throws UaException {\n\n Preconditions.checkArgument(!certificateCha... | {
"created": "5/6/2016 1:20:04 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 58208693,
"size": null,
"stargazer_count": null,
"stars": 405,
"updates": "2020-01-26T11:03:08+00:00",
"url": "https://github.com/eclipse/milo"
} |
58208693_31 | {
"fields": [
{
"declarator": "namespaceTable = new NamespaceTable()",
"modifier": "private final",
"original_string": "private final NamespaceTable namespaceTable = new NamespaceTable();",
"type": "NamespaceTable",
"var_name": "namespaceTable"
}
],
"file": "opc-ua-stack/stac... | {
"body": "@Test\n public void absolute() {\n ExpandedNodeId xni = new ExpandedNodeId(ushort(0), null, \"foo\");\n assertTrue(xni.isRelative());\n\n ExpandedNodeId absolute = xni.absolute(new NamespaceTable()).orElseThrow(RuntimeException::new);\n assertTrue(absolute.isAbsolute());\n ... | {
"fields": [
{
"declarator": "NULL_VALUE = new ExpandedNodeId(\n UShort.MIN,\n null,\n UInteger.MIN,\n UInteger.MIN\n )",
"modifier": "public static final",
"original_string": "public static final ExpandedNodeId NULL_VALUE = new ExpandedNodeId(\n UShort.MIN... | {
"body": "public Optional<ExpandedNodeId> absolute(NamespaceTable namespaceTable) {\n if (isAbsolute()) {\n return Optional.of(this);\n } else {\n String namespaceUri = namespaceTable.getUri(namespaceIndex);\n\n if (namespaceUri != null) {\n ExpandedNodeI... | {
"created": "5/6/2016 1:20:04 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 58208693,
"size": null,
"stargazer_count": null,
"stars": 405,
"updates": "2020-01-26T11:03:08+00:00",
"url": "https://github.com/eclipse/milo"
} |
58208693_82 | {
"fields": [],
"file": "opc-ua-sdk/sdk-server/src/test/java/org/eclipse/milo/opcua/sdk/server/events/conversions/QualifiedNameConversionsTest.java",
"identifier": "QualifiedNameConversionsTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void testQualifiedNameToLocalizedText() {\n QualifiedName name = new QualifiedName(0, \"foo\");\n\n LocalizedText text = qualifiedNameToLocalizedText(name);\n\n assertEquals(text.getLocale(), \"\");\n assertEquals(text.getText(), \"foo\");\n }",
"class_met... | {
"fields": [],
"file": "opc-ua-sdk/sdk-server/src/main/java/org/eclipse/milo/opcua/sdk/server/events/conversions/QualifiedNameConversions.java",
"identifier": "QualifiedNameConversions",
"interfaces": "",
"methods": [
{
"class_method_signature": "QualifiedNameConversions.QualifiedNameConversions()"... | {
"body": "@Nonnull\n static LocalizedText qualifiedNameToLocalizedText(@Nonnull QualifiedName name) {\n return new LocalizedText(\"\", name.getName());\n }",
"class_method_signature": "QualifiedNameConversions.qualifiedNameToLocalizedText(@Nonnull QualifiedName name)",
"constructor": false,
"full_... | {
"created": "5/6/2016 1:20:04 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 58208693,
"size": null,
"stargazer_count": null,
"stars": 405,
"updates": "2020-01-26T11:03:08+00:00",
"url": "https://github.com/eclipse/milo"
} |
58208693_9 | {
"fields": [],
"file": "opc-ua-stack/stack-core/src/test/java/org/eclipse/milo/opcua/stack/core/util/EndpointUtilTest.java",
"identifier": "EndpointUtilTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void testGetPath() {\n assertEquals(EndpointUtil.getPath(\"opc.tcp://localhost:4840/foo\"), \"/foo\");\n assertEquals(EndpointUtil.getPath(\"opc.tcp://localhost:4840/foo/\"), \"/foo\");\n assertEquals(EndpointUtil.getPath(\"opc.tcp://invalid_host:4840/foo\"), \"/foo\"... | {
"fields": [
{
"declarator": "ENDPOINT_URL_PATTERN =\n Pattern.compile(\"(opc.tcp|http|https|opc.http|opc.https|opc.ws|opc.wss)://([^:/]+|\\\\[.*])(:\\\\d+)?(/.*)?\")",
"modifier": "private static final",
"original_string": "private static final Pattern ENDPOINT_URL_PATTERN =\n Pa... | {
"body": "@Nonnull\n public static String getPath(@Nonnull String endpointUrl) {\n Matcher matcher = ENDPOINT_URL_PATTERN.matcher(endpointUrl);\n\n if (matcher.matches()) {\n String path = matcher.group(4);\n\n if (path == null || path.isEmpty()) {\n path = \"/\"... | {
"created": "5/6/2016 1:20:04 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 58208693,
"size": null,
"stargazer_count": null,
"stars": 405,
"updates": "2020-01-26T11:03:08+00:00",
"url": "https://github.com/eclipse/milo"
} |
58208693_94 | {
"fields": [
{
"declarator": "CONVERSIONS = new Object[][]{\n {ubyte(0), Boolean.FALSE},\n {ubyte(1), Boolean.TRUE},\n\n {ubyte(0), 0.0d},\n {ubyte(1), 1.0d},\n\n {ubyte(0), 0.0f},\n {ubyte(1), 1.0f}\n }",
"modifier": "public static final",
"original... | {
"body": "@Test\n public void testByteToUInt32() {\n assertEquals(byteToUInt32(UByte.MIN), uint(UByte.MIN_VALUE));\n assertEquals(byteToUInt32(UByte.MAX), uint(UByte.MAX_VALUE));\n }",
"class_method_signature": "ByteConversionsTest.testByteToUInt32()",
"constructor": false,
"full_signature"... | {
"fields": [],
"file": "opc-ua-sdk/sdk-server/src/main/java/org/eclipse/milo/opcua/sdk/server/events/conversions/ByteConversions.java",
"identifier": "ByteConversions",
"interfaces": "",
"methods": [
{
"class_method_signature": "ByteConversions.ByteConversions()",
"constructor": true,
"... | {
"body": "@Nonnull\n static UInteger byteToUInt32(@Nonnull UByte ub) {\n return uint(ub.intValue());\n }",
"class_method_signature": "ByteConversions.byteToUInt32(@Nonnull UByte ub)",
"constructor": false,
"full_signature": "@Nonnull static UInteger byteToUInt32(@Nonnull UByte ub)",
"identifier"... | {
"created": "5/6/2016 1:20:04 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 58208693,
"size": null,
"stargazer_count": null,
"stars": 405,
"updates": "2020-01-26T11:03:08+00:00",
"url": "https://github.com/eclipse/milo"
} |
58208693_57 | {
"fields": [],
"file": "opc-ua-sdk/sdk-server/src/test/java/org/eclipse/milo/opcua/sdk/server/events/operators/EqualsTest.java",
"identifier": "EqualsTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void testScalarWithImplicitConversion() throws Exception {\n OperatorContext context = mock(OperatorContext.class);\n BaseEventTypeNode eventNode = mock(BaseEventTypeNode.class);\n\n FilterOperand op0 = new LiteralOperand(new Variant(42));\n FilterOperand op1 =... | {
"fields": [],
"file": "opc-ua-sdk/sdk-server/src/main/java/org/eclipse/milo/opcua/sdk/server/events/operators/Equals.java",
"identifier": "Equals",
"interfaces": "implements Operator<Boolean>",
"methods": [
{
"class_method_signature": "Equals.Equals()",
"constructor": true,
"full_signa... | {
"body": "@Nullable\n @Override\n public Boolean apply(\n OperatorContext context,\n BaseEventTypeNode eventNode,\n FilterOperand[] operands) throws UaException {\n\n validate(context, operands);\n\n FilterOperand op0 = operands[0];\n FilterOperand op1 = operands[1];\n... | {
"created": "5/6/2016 1:20:04 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 58208693,
"size": null,
"stargazer_count": null,
"stars": 405,
"updates": "2020-01-26T11:03:08+00:00",
"url": "https://github.com/eclipse/milo"
} |
58208693_16 | {
"fields": [
{
"declarator": "keyPair",
"modifier": "private final",
"original_string": "private final KeyPair keyPair;",
"type": "KeyPair",
"var_name": "keyPair"
},
{
"declarator": "certificate",
"modifier": "private final",
"original_string": "private fin... | {
"body": "@Test\n public void testGetSanIpAddresses() {\n List<String> sanDnsNames = CertificateUtil.getSanIpAddresses(certificate);\n assertEquals(sanDnsNames, newArrayList(\"127.0.0.1\", \"127.0.0.2\"));\n }",
"class_method_signature": "CertificateUtilTest.testGetSanIpAddresses()",
"constru... | {
"fields": [
{
"declarator": "SUBJECT_ALT_NAME_DNS_NAME = GeneralName.dNSName",
"modifier": "public static final",
"original_string": "public static final int SUBJECT_ALT_NAME_DNS_NAME = GeneralName.dNSName;",
"type": "int",
"var_name": "SUBJECT_ALT_NAME_DNS_NAME"
},
{
... | {
"body": "public static List<String> getSanIpAddresses(X509Certificate certificate) {\n List<Object> values = getSubjectAltNameField(certificate, SUBJECT_ALT_NAME_IP_ADDRESS);\n\n return values.stream()\n .filter(v -> v instanceof String)\n .map(String.class::cast)\n .c... | {
"created": "5/6/2016 1:20:04 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 58208693,
"size": null,
"stargazer_count": null,
"stars": 405,
"updates": "2020-01-26T11:03:08+00:00",
"url": "https://github.com/eclipse/milo"
} |
58208693_41 | {
"fields": [
{
"declarator": "stackClient = Mockito.mock(UaStackClient.class)",
"modifier": "private final",
"original_string": "private final UaStackClient stackClient = Mockito.mock(UaStackClient.class);",
"type": "UaStackClient",
"var_name": "stackClient"
},
{
"decl... | {
"body": "@Test\n void testReadDataTypeDictionaryBytes() throws Exception {\n int[] fragmentSizes = new int[]{1, 2, 1024, 2048, 4096, 8192};\n int[] dictionarySizes = new int[]{1, 2, 1024, 1025, 2048, 2049, 4096, 4097, 8192, 8193, 65535, 65536};\n\n for (int fragmentSize : fragmentSizes) {\n ... | {
"fields": [
{
"declarator": "DEFAULT_FRAGMENT_SIZE = 8192",
"modifier": "private static final",
"original_string": "private static final int DEFAULT_FRAGMENT_SIZE = 8192;",
"type": "int",
"var_name": "DEFAULT_FRAGMENT_SIZE"
},
{
"declarator": "PARTITION_SIZE = 64",
... | {
"body": "CompletableFuture<ByteString> readDataTypeDictionaryBytes(NodeId nodeId, int fragmentSize) {\n CompositeByteBuf fragmentBuffer = Unpooled.compositeBuffer();\n\n CompletableFuture<ByteBuf> future = readFragments(\n nodeId,\n fragmentBuffer,\n fragmentSize,\n ... | {
"created": "5/6/2016 1:20:04 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 58208693,
"size": null,
"stargazer_count": null,
"stars": 405,
"updates": "2020-01-26T11:03:08+00:00",
"url": "https://github.com/eclipse/milo"
} |
58208693_36 | {
"fields": [],
"file": "opc-ua-stack/stack-core/src/test/java/org/eclipse/milo/opcua/stack/core/types/builtin/NodeIdTest.java",
"identifier": "NodeIdTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void testParseInvalidInt() {\n assertThrows(UaRuntimeException.class, () -> NodeId.parse(\"ns=0;i=\" + UInteger.MAX_VALUE + 1));\n assertThrows(UaRuntimeException.class, () -> NodeId.parse(\"ns=0;i=\" + -1));\n }",
"class_method_signature": "NodeIdTest.testParseInvalidI... | {
"fields": [
{
"declarator": "NULL_NUMERIC = new NodeId(ushort(0), uint(0))",
"modifier": "public static final",
"original_string": "public static final NodeId NULL_NUMERIC = new NodeId(ushort(0), uint(0));",
"type": "NodeId",
"var_name": "NULL_NUMERIC"
},
{
"declarato... | {
"body": "public static NodeId parse(@Nonnull String s) throws UaRuntimeException {\n if (s.startsWith(\"ns=\")) {\n int index = s.indexOf(\";\");\n\n if (index == -1) {\n throw new UaRuntimeException(StatusCodes.Bad_NodeIdInvalid);\n }\n\n try {\n ... | {
"created": "5/6/2016 1:20:04 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 58208693,
"size": null,
"stargazer_count": null,
"stars": 405,
"updates": "2020-01-26T11:03:08+00:00",
"url": "https://github.com/eclipse/milo"
} |
58208693_5 | {
"fields": [
{
"declarator": "ALIAS_CA_INTERMEDIATE = \"ca-intermediate\"",
"modifier": "private static final",
"original_string": "private static final String ALIAS_CA_INTERMEDIATE = \"ca-intermediate\";",
"type": "String",
"var_name": "ALIAS_CA_INTERMEDIATE"
},
{
"de... | {
"body": "@Test\n public void testCertificateIsCa() throws KeyStoreException {\n assertTrue(CertificateValidationUtil.certificateIsCa(getCertificate(\"yes-key-usage-yes-ca\")));\n assertTrue(CertificateValidationUtil.certificateIsCa(getCertificate(\"no-key-usage-yes-ca\")));\n assertTrue(Cert... | {
"fields": [
{
"declarator": "LOGGER = LoggerFactory.getLogger(CertificateValidationUtil.class)",
"modifier": "private static final",
"original_string": "private static final Logger LOGGER = LoggerFactory.getLogger(CertificateValidationUtil.class);",
"type": "Logger",
"var_name": "L... | {
"body": "static boolean certificateIsCa(X509Certificate certificate) {\n boolean[] keyUsage = certificate.getKeyUsage();\n int basicConstraints = certificate.getBasicConstraints();\n\n if (keyUsage == null) {\n // no KeyUsage, just check if the cA BasicConstraint is set.\n ... | {
"created": "5/6/2016 1:20:04 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 58208693,
"size": null,
"stargazer_count": null,
"stars": 405,
"updates": "2020-01-26T11:03:08+00:00",
"url": "https://github.com/eclipse/milo"
} |
58208693_61 | {
"fields": [],
"file": "opc-ua-sdk/sdk-server/src/test/java/org/eclipse/milo/opcua/sdk/server/events/operators/IsNullTest.java",
"identifier": "IsNullTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void testNonNullValue() throws Exception {\n OperatorContext context = mock(OperatorContext.class);\n BaseEventTypeNode eventNode = mock(BaseEventTypeNode.class);\n\n FilterOperand op0 = new LiteralOperand(new Variant(42));\n\n when(context.resolve(op0, eventNo... | {
"fields": [],
"file": "opc-ua-sdk/sdk-server/src/main/java/org/eclipse/milo/opcua/sdk/server/events/operators/IsNull.java",
"identifier": "IsNull",
"interfaces": "implements Operator<Boolean>",
"methods": [
{
"class_method_signature": "IsNull.IsNull()",
"constructor": true,
"full_signa... | {
"body": "@Nullable\n @Override\n public Boolean apply(\n OperatorContext context,\n BaseEventTypeNode eventNode,\n FilterOperand[] operands) throws UaException {\n\n validate(context, operands);\n\n Object value = context.resolve(operands[0], eventNode);\n\n return va... | {
"created": "5/6/2016 1:20:04 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 58208693,
"size": null,
"stargazer_count": null,
"stars": 405,
"updates": "2020-01-26T11:03:08+00:00",
"url": "https://github.com/eclipse/milo"
} |
58208693_77 | {
"fields": [],
"file": "opc-ua-sdk/sdk-server/src/test/java/org/eclipse/milo/opcua/sdk/server/events/conversions/GuidConversionsTest.java",
"identifier": "GuidConversionsTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void testGuidToByteString() {\n long msb = 0xABCDABCDABCDABCDL;\n long lsb = 0xEFEFEFEFEFEFEFEFL;\n UUID uuid = new UUID(msb, lsb);\n\n ByteString bs = GuidConversions.guidToByteString(uuid);\n\n ByteBuffer bb = ByteBuffer.wrap(new byte[16]);\n bb... | {
"fields": [],
"file": "opc-ua-sdk/sdk-server/src/main/java/org/eclipse/milo/opcua/sdk/server/events/conversions/GuidConversions.java",
"identifier": "GuidConversions",
"interfaces": "",
"methods": [
{
"class_method_signature": "GuidConversions.GuidConversions()",
"constructor": true,
"... | {
"body": "@Nonnull\n static ByteString guidToByteString(@Nonnull UUID uuid) {\n ByteBuffer bb = ByteBuffer.wrap(new byte[16]);\n bb.putLong(uuid.getMostSignificantBits());\n bb.putLong(uuid.getLeastSignificantBits());\n\n return ByteString.of(bb.array());\n }",
"class_method_signa... | {
"created": "5/6/2016 1:20:04 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 58208693,
"size": null,
"stargazer_count": null,
"stars": 405,
"updates": "2020-01-26T11:03:08+00:00",
"url": "https://github.com/eclipse/milo"
} |
58208693_20 | {
"fields": [],
"file": "opc-ua-stack/stack-core/src/test/java/org/eclipse/milo/opcua/stack/core/util/LazyTest.java",
"identifier": "LazyTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void lazyRetainsNullValue() {\n Lazy<Object> lazy = new Lazy<>();\n\n Object o1 = lazy.getOrCompute(() -> null);\n\n assertNull(o1);\n }",
"class_method_signature": "LazyTest.lazyRetainsNullValue()",
"constructor": false,
"full_signature": "@Test public void ... | {
"fields": [
{
"declarator": "LAZY_NULL = new Object()",
"modifier": "private static final",
"original_string": "private static final Object LAZY_NULL = new Object();",
"type": "Object",
"var_name": "LAZY_NULL"
},
{
"declarator": "value",
"modifier": "private vol... | {
"body": "@SuppressWarnings(\"unchecked\")\n public T getOrCompute(@Nonnull Supplier<T> supplier) {\n final Object v1 = value;\n\n if (v1 == LAZY_NULL) {\n return null;\n } else {\n if (v1 == null) {\n Object v2 = maybeCompute(supplier);\n r... | {
"created": "5/6/2016 1:20:04 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 58208693,
"size": null,
"stargazer_count": null,
"stars": 405,
"updates": "2020-01-26T11:03:08+00:00",
"url": "https://github.com/eclipse/milo"
} |
58208693_21 | {
"fields": [],
"file": "opc-ua-stack/stack-core/src/test/java/org/eclipse/milo/opcua/stack/core/util/LazyTest.java",
"identifier": "LazyTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void lazyOnlyComputesOnce() {\n Lazy<Object> lazy = new Lazy<>();\n\n final Object instance = new Object();\n\n Supplier<Object> supplier = new Supplier<Object>() {\n final AtomicInteger count = new AtomicInteger(0);\n\n @Override\n pu... | {
"fields": [
{
"declarator": "LAZY_NULL = new Object()",
"modifier": "private static final",
"original_string": "private static final Object LAZY_NULL = new Object();",
"type": "Object",
"var_name": "LAZY_NULL"
},
{
"declarator": "value",
"modifier": "private vol... | {
"body": "@SuppressWarnings(\"unchecked\")\n public T getOrCompute(@Nonnull Supplier<T> supplier) {\n final Object v1 = value;\n\n if (v1 == LAZY_NULL) {\n return null;\n } else {\n if (v1 == null) {\n Object v2 = maybeCompute(supplier);\n r... | {
"created": "5/6/2016 1:20:04 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 58208693,
"size": null,
"stargazer_count": null,
"stars": 405,
"updates": "2020-01-26T11:03:08+00:00",
"url": "https://github.com/eclipse/milo"
} |
58208693_76 | {
"fields": [],
"file": "opc-ua-sdk/sdk-server/src/test/java/org/eclipse/milo/opcua/sdk/server/events/conversions/ImplicitConversionsTest.java",
"identifier": "ImplicitConversionsTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void testConvert() {\n assertEquals(\n convert(false, BuiltinDataType.Byte), ubyte(0));\n assertEquals(\n convert(true, BuiltinDataType.Byte), ubyte(1));\n }",
"class_method_signature": "ImplicitConversionsTest.testConvert()",
"constructor": fals... | {
"fields": [],
"file": "opc-ua-sdk/sdk-server/src/main/java/org/eclipse/milo/opcua/sdk/server/events/conversions/ImplicitConversions.java",
"identifier": "ImplicitConversions",
"interfaces": "",
"methods": [
{
"class_method_signature": "ImplicitConversions.convert(@Nonnull Object sourceValue, @Nonn... | {
"body": "@Nullable\n public static Object convert(@Nonnull Object sourceValue, @Nonnull BuiltinDataType targetType) {\n BuiltinDataType sourceType = BuiltinDataType.fromBackingClass(sourceValue.getClass());\n\n if (sourceType == null) {\n return null;\n }\n\n if (!sourceTyp... | {
"created": "5/6/2016 1:20:04 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 58208693,
"size": null,
"stargazer_count": null,
"stars": 405,
"updates": "2020-01-26T11:03:08+00:00",
"url": "https://github.com/eclipse/milo"
} |
58208693_60 | {
"fields": [],
"file": "opc-ua-sdk/sdk-server/src/test/java/org/eclipse/milo/opcua/sdk/server/events/operators/IsNullTest.java",
"identifier": "IsNullTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void testNullValue() throws Exception {\n OperatorContext context = mock(OperatorContext.class);\n BaseEventTypeNode eventNode = mock(BaseEventTypeNode.class);\n\n FilterOperand op0 = new LiteralOperand(new Variant(null));\n\n when(context.resolve(op0, eventNod... | {
"fields": [],
"file": "opc-ua-sdk/sdk-server/src/main/java/org/eclipse/milo/opcua/sdk/server/events/operators/IsNull.java",
"identifier": "IsNull",
"interfaces": "implements Operator<Boolean>",
"methods": [
{
"class_method_signature": "IsNull.IsNull()",
"constructor": true,
"full_signa... | {
"body": "@Nullable\n @Override\n public Boolean apply(\n OperatorContext context,\n BaseEventTypeNode eventNode,\n FilterOperand[] operands) throws UaException {\n\n validate(context, operands);\n\n Object value = context.resolve(operands[0], eventNode);\n\n return va... | {
"created": "5/6/2016 1:20:04 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 58208693,
"size": null,
"stargazer_count": null,
"stars": 405,
"updates": "2020-01-26T11:03:08+00:00",
"url": "https://github.com/eclipse/milo"
} |
58208693_4 | {
"fields": [
{
"declarator": "ALIAS_CA_INTERMEDIATE = \"ca-intermediate\"",
"modifier": "private static final",
"original_string": "private static final String ALIAS_CA_INTERMEDIATE = \"ca-intermediate\";",
"type": "String",
"var_name": "ALIAS_CA_INTERMEDIATE"
},
{
"de... | {
"body": "@Test\n public void testBuildTrustedCertPath_IntermediateIssuer() throws Exception {\n // chain: leaf\n // trusted: ca-root\n // issuers: ca-intermediate\n {\n List<X509Certificate> certificateChain = newArrayList(leafIntermediateSigned);\n\n buildTruste... | {
"fields": [
{
"declarator": "LOGGER = LoggerFactory.getLogger(CertificateValidationUtil.class)",
"modifier": "private static final",
"original_string": "private static final Logger LOGGER = LoggerFactory.getLogger(CertificateValidationUtil.class);",
"type": "Logger",
"var_name": "L... | {
"body": "public static PKIXCertPathBuilderResult buildTrustedCertPath(\n List<X509Certificate> certificateChain,\n Collection<X509Certificate> trustedCertificates,\n Collection<X509Certificate> issuerCertificates\n ) throws UaException {\n\n Preconditions.checkArgument(!certificateCha... | {
"created": "5/6/2016 1:20:04 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 58208693,
"size": null,
"stargazer_count": null,
"stars": 405,
"updates": "2020-01-26T11:03:08+00:00",
"url": "https://github.com/eclipse/milo"
} |
58208693_37 | {
"fields": [],
"file": "opc-ua-stack/stack-core/src/test/java/org/eclipse/milo/opcua/stack/core/types/builtin/NodeIdTest.java",
"identifier": "NodeIdTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void testParseInt() {\n long[] is = new long[]{0, UByte.MAX_VALUE, UShort.MAX_VALUE, UInteger.MAX_VALUE};\n\n for (long i : is) {\n assertNotNull(NodeId.parseOrNull(\"i=\" + i));\n assertNotNull(NodeId.parseOrNull(\"ns=0;i=\" + i));\n }\n }",
... | {
"fields": [
{
"declarator": "NULL_NUMERIC = new NodeId(ushort(0), uint(0))",
"modifier": "public static final",
"original_string": "public static final NodeId NULL_NUMERIC = new NodeId(ushort(0), uint(0));",
"type": "NodeId",
"var_name": "NULL_NUMERIC"
},
{
"declarato... | {
"body": "@Nullable\n public static NodeId parseOrNull(@Nonnull String s) {\n try {\n return NodeId.parse(s);\n } catch (UaRuntimeException t) {\n return null;\n }\n }",
"class_method_signature": "NodeId.parseOrNull(@Nonnull String s)",
"constructor": false,
"fu... | {
"created": "5/6/2016 1:20:04 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 58208693,
"size": null,
"stargazer_count": null,
"stars": 405,
"updates": "2020-01-26T11:03:08+00:00",
"url": "https://github.com/eclipse/milo"
} |
58208693_40 | {
"fields": [],
"file": "opc-ua-sdk/sdk-core/src/test/java/org/eclipse/milo/opcua/sdk/server/util/GroupMapCollateTest.java",
"identifier": "GroupMapCollateTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void testGroupMapCollate() throws ExecutionException, InterruptedException {\n int N = 10;\n List<Integer> items = new ArrayList<>();\n IntStream.range(0, N).forEach(items::add);\n\n for (int i = 1; i <= N; i++) {\n final int mod = i;\n Co... | {
"fields": [],
"file": "opc-ua-sdk/sdk-core/src/main/java/org/eclipse/milo/opcua/sdk/server/util/GroupMapCollate.java",
"identifier": "GroupMapCollate",
"interfaces": "",
"methods": [
{
"class_method_signature": "GroupMapCollate.groupMapCollate(\n List<T> items,\n Function<T, K> group... | {
"body": "public static <T, K, R> CompletableFuture<List<R>> groupMapCollate(\n List<T> items,\n Function<T, K> grouper,\n Function<K, Mapper<T, R>> mappers\n ) {\n\n List<Pending<T, R>> pending = new ArrayList<>();\n\n for (int i = 0; i < items.size(); i++) {\n pendi... | {
"created": "5/6/2016 1:20:04 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 58208693,
"size": null,
"stargazer_count": null,
"stars": 405,
"updates": "2020-01-26T11:03:08+00:00",
"url": "https://github.com/eclipse/milo"
} |
58208693_17 | {
"fields": [],
"file": "opc-ua-stack/stack-core/src/test/java/org/eclipse/milo/opcua/stack/core/util/NonceUtilTest.java",
"identifier": "NonceUtilTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void testSecureChannelNonceGeneration() {\n for (SecurityPolicy securityPolicy : SecurityPolicy.values()) {\n ByteString nonce = NonceUtil.generateNonce(securityPolicy);\n\n switch (securityPolicy) {\n case None:\n assertEqual... | {
"fields": [
{
"declarator": "MINIMUM_NONCE_LENGTH = 32",
"modifier": "public static final",
"original_string": "public static final int MINIMUM_NONCE_LENGTH = 32;",
"type": "int",
"var_name": "MINIMUM_NONCE_LENGTH"
},
{
"declarator": "SECURE_RANDOM_ENABLED = true",
... | {
"body": "public static ByteString generateNonce(int length) {\n if (length == 0) return ByteString.NULL_VALUE;\n\n byte[] bs = new byte[length];\n\n Random random = null;\n\n if (SECURE_RANDOM_ENABLED) {\n random = SECURE_RANDOM.get();\n }\n\n if (random == null)... | {
"created": "5/6/2016 1:20:04 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 58208693,
"size": null,
"stargazer_count": null,
"stars": 405,
"updates": "2020-01-26T11:03:08+00:00",
"url": "https://github.com/eclipse/milo"
} |
58208693_56 | {
"fields": [],
"file": "opc-ua-sdk/sdk-server/src/test/java/org/eclipse/milo/opcua/sdk/server/events/operators/EqualsTest.java",
"identifier": "EqualsTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void testArrayWithImplicitConversion() throws Exception {\n OperatorContext context = mock(OperatorContext.class);\n BaseEventTypeNode eventNode = mock(BaseEventTypeNode.class);\n\n FilterOperand op0 = new LiteralOperand(new Variant(new int[]{1, 2, 3}));\n Filt... | {
"fields": [],
"file": "opc-ua-sdk/sdk-server/src/main/java/org/eclipse/milo/opcua/sdk/server/events/operators/Equals.java",
"identifier": "Equals",
"interfaces": "implements Operator<Boolean>",
"methods": [
{
"class_method_signature": "Equals.Equals()",
"constructor": true,
"full_signa... | {
"body": "@Nullable\n @Override\n public Boolean apply(\n OperatorContext context,\n BaseEventTypeNode eventNode,\n FilterOperand[] operands) throws UaException {\n\n validate(context, operands);\n\n FilterOperand op0 = operands[0];\n FilterOperand op1 = operands[1];\n... | {
"created": "5/6/2016 1:20:04 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 58208693,
"size": null,
"stargazer_count": null,
"stars": 405,
"updates": "2020-01-26T11:03:08+00:00",
"url": "https://github.com/eclipse/milo"
} |
58208693_95 | {
"fields": [
{
"declarator": "CONVERSIONS = new Object[][]{\n {ubyte(0), Boolean.FALSE},\n {ubyte(1), Boolean.TRUE},\n\n {ubyte(0), 0.0d},\n {ubyte(1), 1.0d},\n\n {ubyte(0), 0.0f},\n {ubyte(1), 1.0f}\n }",
"modifier": "public static final",
"original... | {
"body": "@Test\n public void testByteToUInt64() {\n assertEquals(byteToUInt64(UByte.MIN), ulong(UByte.MIN_VALUE));\n assertEquals(byteToUInt64(UByte.MAX), ulong(UByte.MAX_VALUE));\n }",
"class_method_signature": "ByteConversionsTest.testByteToUInt64()",
"constructor": false,
"full_signatur... | {
"fields": [],
"file": "opc-ua-sdk/sdk-server/src/main/java/org/eclipse/milo/opcua/sdk/server/events/conversions/ByteConversions.java",
"identifier": "ByteConversions",
"interfaces": "",
"methods": [
{
"class_method_signature": "ByteConversions.ByteConversions()",
"constructor": true,
"... | {
"body": "@Nonnull\n static ULong byteToUInt64(@Nonnull UByte ub) {\n return ulong(ub.longValue());\n }",
"class_method_signature": "ByteConversions.byteToUInt64(@Nonnull UByte ub)",
"constructor": false,
"full_signature": "@Nonnull static ULong byteToUInt64(@Nonnull UByte ub)",
"identifier": "b... | {
"created": "5/6/2016 1:20:04 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 58208693,
"size": null,
"stargazer_count": null,
"stars": 405,
"updates": "2020-01-26T11:03:08+00:00",
"url": "https://github.com/eclipse/milo"
} |
58208693_8 | {
"fields": [],
"file": "opc-ua-stack/stack-core/src/test/java/org/eclipse/milo/opcua/stack/core/util/ArrayUtilTest.java",
"identifier": "ArrayUtilTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test(dataProvider = \"typedArrays\")\n public void testGetType(Object array, Class<?> type) throws Exception {\n assertEquals(ArrayUtil.getType(array), type);\n }",
"class_method_signature": "ArrayUtilTest.testGetType(Object array, Class<?> type)",
"constructor": false,
"full_signature"... | {
"fields": [],
"file": "opc-ua-stack/stack-core/src/main/java/org/eclipse/milo/opcua/stack/core/util/ArrayUtil.java",
"identifier": "ArrayUtil",
"interfaces": "",
"methods": [
{
"class_method_signature": "ArrayUtil.flatten(Object array)",
"constructor": false,
"full_signature": "public ... | {
"body": "public static Class<?> getType(Object array) {\n Class<?> type = array.getClass();\n\n while (type.isArray()) {\n type = type.getComponentType();\n }\n\n return type;\n }",
"class_method_signature": "ArrayUtil.getType(Object array)",
"constructor": false,
"fu... | {
"created": "5/6/2016 1:20:04 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 58208693,
"size": null,
"stargazer_count": null,
"stars": 405,
"updates": "2020-01-26T11:03:08+00:00",
"url": "https://github.com/eclipse/milo"
} |
58208693_83 | {
"fields": [],
"file": "opc-ua-sdk/sdk-server/src/test/java/org/eclipse/milo/opcua/sdk/server/events/conversions/LocalizedTextConversionsTest.java",
"identifier": "LocalizedTextConversionsTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void testLocalizedTextToString() {\n LocalizedText text = new LocalizedText(\"en-us\", \"foo\");\n\n assertEquals(localizedTextToString(text), \"foo\");\n }",
"class_method_signature": "LocalizedTextConversionsTest.testLocalizedTextToString()",
"constructor": false,
... | {
"fields": [],
"file": "opc-ua-sdk/sdk-server/src/main/java/org/eclipse/milo/opcua/sdk/server/events/conversions/LocalizedTextConversions.java",
"identifier": "LocalizedTextConversions",
"interfaces": "",
"methods": [
{
"class_method_signature": "LocalizedTextConversions.LocalizedTextConversions()"... | {
"body": "@Nullable\n static String localizedTextToString(@Nonnull LocalizedText text) {\n return text.getText();\n }",
"class_method_signature": "LocalizedTextConversions.localizedTextToString(@Nonnull LocalizedText text)",
"constructor": false,
"full_signature": "@Nullable static String localize... | {
"created": "5/6/2016 1:20:04 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 58208693,
"size": null,
"stargazer_count": null,
"stars": 405,
"updates": "2020-01-26T11:03:08+00:00",
"url": "https://github.com/eclipse/milo"
} |
58208693_43 | {
"fields": [],
"file": "opc-ua-sdk/sdk-server/src/test/java/org/eclipse/milo/opcua/sdk/server/nodes/delegates/AttributeDelegateChainTest.java",
"identifier": "AttributeDelegateChainTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void testCreate() throws Exception {\n List<String> list = new ArrayList<>();\n\n AttributeDelegate delegate = AttributeDelegateChain.create(\n new AttributeDelegate() {\n @Override\n public DataValue getValue(AttributeContext context... | {
"fields": [],
"file": "opc-ua-sdk/sdk-server/src/main/java/org/eclipse/milo/opcua/sdk/server/nodes/delegates/AttributeDelegateChain.java",
"identifier": "AttributeDelegateChain",
"interfaces": "",
"methods": [
{
"class_method_signature": "AttributeDelegateChain.create(\n AttributeDelegate r... | {
"body": "@SafeVarargs\n public static AttributeDelegate create(\n AttributeDelegate root,\n Function<AttributeDelegate, AttributeDelegate>... childFns) {\n\n AttributeDelegate delegate = root;\n\n for (Function<AttributeDelegate, AttributeDelegate> childFn : childFns) {\n d... | {
"created": "5/6/2016 1:20:04 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 58208693,
"size": null,
"stargazer_count": null,
"stars": 405,
"updates": "2020-01-26T11:03:08+00:00",
"url": "https://github.com/eclipse/milo"
} |
58208693_14 | {
"fields": [
{
"declarator": "keyPair",
"modifier": "private final",
"original_string": "private final KeyPair keyPair;",
"type": "KeyPair",
"var_name": "keyPair"
},
{
"declarator": "certificate",
"modifier": "private final",
"original_string": "private fin... | {
"body": "@Test\n public void testGetSanUri() {\n assertEquals(CertificateUtil.getSanUri(certificate).orElse(null), \"urn:eclipse:milo:test\");\n }",
"class_method_signature": "CertificateUtilTest.testGetSanUri()",
"constructor": false,
"full_signature": "@Test public void testGetSanUri()",
"ide... | {
"fields": [
{
"declarator": "SUBJECT_ALT_NAME_DNS_NAME = GeneralName.dNSName",
"modifier": "public static final",
"original_string": "public static final int SUBJECT_ALT_NAME_DNS_NAME = GeneralName.dNSName;",
"type": "int",
"var_name": "SUBJECT_ALT_NAME_DNS_NAME"
},
{
... | {
"body": "public static Optional<String> getSanUri(X509Certificate certificate) {\n List<Object> values = getSubjectAltNameField(certificate, SUBJECT_ALT_NAME_URI);\n\n return values.stream()\n .filter(v -> v instanceof String)\n .map(String.class::cast)\n .findFirst();... | {
"created": "5/6/2016 1:20:04 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 58208693,
"size": null,
"stargazer_count": null,
"stars": 405,
"updates": "2020-01-26T11:03:08+00:00",
"url": "https://github.com/eclipse/milo"
} |
58208693_55 | {
"fields": [],
"file": "opc-ua-sdk/sdk-server/src/test/java/org/eclipse/milo/opcua/sdk/server/events/operators/EqualsTest.java",
"identifier": "EqualsTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void testScalar() throws Exception {\n OperatorContext context = mock(OperatorContext.class);\n BaseEventTypeNode eventNode = mock(BaseEventTypeNode.class);\n\n FilterOperand op0 = new LiteralOperand(new Variant(42));\n FilterOperand op1 = new LiteralOperand(ne... | {
"fields": [],
"file": "opc-ua-sdk/sdk-server/src/main/java/org/eclipse/milo/opcua/sdk/server/events/operators/Equals.java",
"identifier": "Equals",
"interfaces": "implements Operator<Boolean>",
"methods": [
{
"class_method_signature": "Equals.Equals()",
"constructor": true,
"full_signa... | {
"body": "@Nullable\n @Override\n public Boolean apply(\n OperatorContext context,\n BaseEventTypeNode eventNode,\n FilterOperand[] operands) throws UaException {\n\n validate(context, operands);\n\n FilterOperand op0 = operands[0];\n FilterOperand op1 = operands[1];\n... | {
"created": "5/6/2016 1:20:04 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 58208693,
"size": null,
"stargazer_count": null,
"stars": 405,
"updates": "2020-01-26T11:03:08+00:00",
"url": "https://github.com/eclipse/milo"
} |
58208693_79 | {
"fields": [],
"file": "opc-ua-sdk/sdk-server/src/test/java/org/eclipse/milo/opcua/sdk/server/events/conversions/ExpandedNodeIdConversionsTest.java",
"identifier": "ExpandedNodeIdConversionsTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void testExpandedNodeIdToNodeId() {\n assertNull(\n expandedNodeIdToNodeId(\n new ExpandedNodeId(ushort(0), Namespaces.OPC_UA, \"foo\", uint(2))));\n\n NodeId nodeId = new NodeId(0, \"bar\");\n\n assertEquals(expandedNodeIdToNodeId(nodeId.exp... | {
"fields": [],
"file": "opc-ua-sdk/sdk-server/src/main/java/org/eclipse/milo/opcua/sdk/server/events/conversions/ExpandedNodeIdConversions.java",
"identifier": "ExpandedNodeIdConversions",
"interfaces": "",
"methods": [
{
"class_method_signature": "ExpandedNodeIdConversions.ExpandedNodeIdConversion... | {
"body": "@Nullable\n static NodeId expandedNodeIdToNodeId(@Nonnull ExpandedNodeId e) {\n // TODO need a real NamespaceTable here\n return e.local(new NamespaceTable()).orElse(null);\n }",
"class_method_signature": "ExpandedNodeIdConversions.expandedNodeIdToNodeId(@Nonnull ExpandedNodeId e)",
... | {
"created": "5/6/2016 1:20:04 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 58208693,
"size": null,
"stargazer_count": null,
"stars": 405,
"updates": "2020-01-26T11:03:08+00:00",
"url": "https://github.com/eclipse/milo"
} |
58208693_80 | {
"fields": [],
"file": "opc-ua-sdk/sdk-server/src/test/java/org/eclipse/milo/opcua/sdk/server/events/conversions/ExpandedNodeIdConversionsTest.java",
"identifier": "ExpandedNodeIdConversionsTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void testExpandedNodeIdToString() {\n ExpandedNodeId e1 = new ExpandedNodeId(ushort(0), Namespaces.OPC_UA, \"foo\", uint(2));\n ExpandedNodeId e2 = new NodeId(1, \"bar\").expanded();\n\n assertEquals(expandedNodeIdToString(e1), e1.toParseableString());\n assert... | {
"fields": [],
"file": "opc-ua-sdk/sdk-server/src/main/java/org/eclipse/milo/opcua/sdk/server/events/conversions/ExpandedNodeIdConversions.java",
"identifier": "ExpandedNodeIdConversions",
"interfaces": "",
"methods": [
{
"class_method_signature": "ExpandedNodeIdConversions.ExpandedNodeIdConversion... | {
"body": "@Nonnull\n static String expandedNodeIdToString(@Nonnull ExpandedNodeId e) {\n return e.toParseableString();\n }",
"class_method_signature": "ExpandedNodeIdConversions.expandedNodeIdToString(@Nonnull ExpandedNodeId e)",
"constructor": false,
"full_signature": "@Nonnull static String expa... | {
"created": "5/6/2016 1:20:04 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 58208693,
"size": null,
"stargazer_count": null,
"stars": 405,
"updates": "2020-01-26T11:03:08+00:00",
"url": "https://github.com/eclipse/milo"
} |
58208693_38 | {
"fields": [],
"file": "opc-ua-stack/stack-core/src/test/java/org/eclipse/milo/opcua/stack/core/types/builtin/NodeIdTest.java",
"identifier": "NodeIdTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void testParseString() {\n assertNotNull(NodeId.parseOrNull(\"s=\"));\n assertNotNull(NodeId.parseOrNull(\"s=foo\"));\n assertNotNull(NodeId.parseOrNull(\"ns=0;s=\"));\n assertNotNull(NodeId.parseOrNull(\"ns=0;s=foo\"));\n }",
"class_method_signature": "No... | {
"fields": [
{
"declarator": "NULL_NUMERIC = new NodeId(ushort(0), uint(0))",
"modifier": "public static final",
"original_string": "public static final NodeId NULL_NUMERIC = new NodeId(ushort(0), uint(0));",
"type": "NodeId",
"var_name": "NULL_NUMERIC"
},
{
"declarato... | {
"body": "@Nullable\n public static NodeId parseOrNull(@Nonnull String s) {\n try {\n return NodeId.parse(s);\n } catch (UaRuntimeException t) {\n return null;\n }\n }",
"class_method_signature": "NodeId.parseOrNull(@Nonnull String s)",
"constructor": false,
"fu... | {
"created": "5/6/2016 1:20:04 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 58208693,
"size": null,
"stargazer_count": null,
"stars": 405,
"updates": "2020-01-26T11:03:08+00:00",
"url": "https://github.com/eclipse/milo"
} |
58208693_18 | {
"fields": [],
"file": "opc-ua-stack/stack-core/src/test/java/org/eclipse/milo/opcua/stack/core/util/NonceUtilTest.java",
"identifier": "NonceUtilTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void testZeroLengthNonceValidation() throws UaException {\n // an empty nonce is valid in the secure channel layer when no security is used.\n NonceUtil.validateNonce(ByteString.of(new byte[0]), 0);\n }",
"class_method_signature": "NonceUtilTest.testZeroLengthNonceValid... | {
"fields": [
{
"declarator": "MINIMUM_NONCE_LENGTH = 32",
"modifier": "public static final",
"original_string": "public static final int MINIMUM_NONCE_LENGTH = 32;",
"type": "int",
"var_name": "MINIMUM_NONCE_LENGTH"
},
{
"declarator": "SECURE_RANDOM_ENABLED = true",
... | {
"body": "public static void validateNonce(ByteString nonce, SecurityPolicy securityPolicy) throws UaException {\n validateNonce(nonce, getNonceLength(securityPolicy));\n }",
"class_method_signature": "NonceUtil.validateNonce(ByteString nonce, SecurityPolicy securityPolicy)",
"constructor": false,
"f... | {
"created": "5/6/2016 1:20:04 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 58208693,
"size": null,
"stargazer_count": null,
"stars": 405,
"updates": "2020-01-26T11:03:08+00:00",
"url": "https://github.com/eclipse/milo"
} |
58208693_59 | {
"fields": [],
"file": "opc-ua-sdk/sdk-server/src/test/java/org/eclipse/milo/opcua/sdk/server/events/operators/EqualsTest.java",
"identifier": "EqualsTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void testScalarNotEqual() throws Exception {\n OperatorContext context = mock(OperatorContext.class);\n BaseEventTypeNode eventNode = mock(BaseEventTypeNode.class);\n\n FilterOperand op0 = new LiteralOperand(new Variant(1));\n FilterOperand op1 = new LiteralOpe... | {
"fields": [],
"file": "opc-ua-sdk/sdk-server/src/main/java/org/eclipse/milo/opcua/sdk/server/events/operators/Equals.java",
"identifier": "Equals",
"interfaces": "implements Operator<Boolean>",
"methods": [
{
"class_method_signature": "Equals.Equals()",
"constructor": true,
"full_signa... | {
"body": "@Nullable\n @Override\n public Boolean apply(\n OperatorContext context,\n BaseEventTypeNode eventNode,\n FilterOperand[] operands) throws UaException {\n\n validate(context, operands);\n\n FilterOperand op0 = operands[0];\n FilterOperand op1 = operands[1];\n... | {
"created": "5/6/2016 1:20:04 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 58208693,
"size": null,
"stargazer_count": null,
"stars": 405,
"updates": "2020-01-26T11:03:08+00:00",
"url": "https://github.com/eclipse/milo"
} |
58208693_22 | {
"fields": [
{
"declarator": "executor = Executors.newCachedThreadPool()",
"modifier": "private final",
"original_string": "private final ExecutorService executor = Executors.newCachedThreadPool();",
"type": "ExecutorService",
"var_name": "executor"
}
],
"file": "opc-ua-stac... | {
"body": "@Test\n public void testSubmitIsLinearWhenConcurrencyIs1() {\n ExecutionQueue queue = new ExecutionQueue(executor, 1);\n\n AtomicBoolean failed = new AtomicBoolean(false);\n AtomicInteger n = new AtomicInteger(0);\n\n for (int i = 0; i < 1000000; i++) {\n final int... | {
"fields": [
{
"declarator": "log = LoggerFactory.getLogger(getClass())",
"modifier": "private final",
"original_string": "private final Logger log = LoggerFactory.getLogger(getClass());",
"type": "Logger",
"var_name": "log"
},
{
"declarator": "queueLock = new Object()... | {
"body": "public void submit(Runnable runnable) {\n synchronized (queueLock) {\n queue.add(runnable);\n\n maybePollAndExecute();\n }\n }",
"class_method_signature": "ExecutionQueue.submit(Runnable runnable)",
"constructor": false,
"full_signature": "public void submit(Run... | {
"created": "5/6/2016 1:20:04 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 58208693,
"size": null,
"stargazer_count": null,
"stars": 405,
"updates": "2020-01-26T11:03:08+00:00",
"url": "https://github.com/eclipse/milo"
} |
58208693_75 | {
"fields": [],
"file": "opc-ua-sdk/sdk-server/src/test/java/org/eclipse/milo/opcua/sdk/server/events/conversions/DateTimeConversionsTest.java",
"identifier": "DateTimeConversionsTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void testDateTimeToString() {\n DateTime now = DateTime.now();\n String nowAsString = (String) DateTimeConversions\n .convert(now, BuiltinDataType.String, false);\n\n System.out.println(\"now: \" + now);\n System.out.println(\"nowAsString: \" + nowAs... | {
"fields": [
{
"declarator": "ISO_8601_UTC_DATE_FORMAT",
"modifier": "private static final",
"original_string": "private static final DateFormat ISO_8601_UTC_DATE_FORMAT;",
"type": "DateFormat",
"var_name": "ISO_8601_UTC_DATE_FORMAT"
}
],
"file": "opc-ua-sdk/sdk-server/src/m... | {
"body": "@Nonnull\n static String dateTimeToString(@Nonnull DateTime dt) {\n return dateToIso8601UtcString(dt.getJavaDate());\n }",
"class_method_signature": "DateTimeConversions.dateTimeToString(@Nonnull DateTime dt)",
"constructor": false,
"full_signature": "@Nonnull static String dateTimeToStr... | {
"created": "5/6/2016 1:20:04 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 58208693,
"size": null,
"stargazer_count": null,
"stars": 405,
"updates": "2020-01-26T11:03:08+00:00",
"url": "https://github.com/eclipse/milo"
} |
58208693_63 | {
"fields": [],
"file": "opc-ua-sdk/sdk-server/src/test/java/org/eclipse/milo/opcua/sdk/server/events/conversions/NodeIdConversionsTest.java",
"identifier": "NodeIdConversionsTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void testNodeIdToString() {\n NodeId nodeId = new NodeId(0, \"foo\");\n\n assertEquals(nodeIdToString(nodeId), nodeId.toParseableString());\n }",
"class_method_signature": "NodeIdConversionsTest.testNodeIdToString()",
"constructor": false,
"full_signature": "@Test p... | {
"fields": [],
"file": "opc-ua-sdk/sdk-server/src/main/java/org/eclipse/milo/opcua/sdk/server/events/conversions/NodeIdConversions.java",
"identifier": "NodeIdConversions",
"interfaces": "",
"methods": [
{
"class_method_signature": "NodeIdConversions.NodeIdConversions()",
"constructor": true,... | {
"body": "@Nonnull\n static String nodeIdToString(@Nonnull NodeId nodeId) {\n return nodeId.toParseableString();\n }",
"class_method_signature": "NodeIdConversions.nodeIdToString(@Nonnull NodeId nodeId)",
"constructor": false,
"full_signature": "@Nonnull static String nodeIdToString(@Nonnull NodeI... | {
"created": "5/6/2016 1:20:04 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 58208693,
"size": null,
"stargazer_count": null,
"stars": 405,
"updates": "2020-01-26T11:03:08+00:00",
"url": "https://github.com/eclipse/milo"
} |
58208693_7 | {
"fields": [],
"file": "opc-ua-stack/stack-core/src/test/java/org/eclipse/milo/opcua/stack/core/util/ArrayUtilTest.java",
"identifier": "ArrayUtilTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test(dataProvider = \"dimensions\")\n public void testGetDimensions(Object array, int[] dimensions) throws Exception {\n assertEquals(ArrayUtil.getDimensions(array), dimensions);\n }",
"class_method_signature": "ArrayUtilTest.testGetDimensions(Object array, int[] dimensions)",
"constructo... | {
"fields": [],
"file": "opc-ua-stack/stack-core/src/main/java/org/eclipse/milo/opcua/stack/core/util/ArrayUtil.java",
"identifier": "ArrayUtil",
"interfaces": "",
"methods": [
{
"class_method_signature": "ArrayUtil.flatten(Object array)",
"constructor": false,
"full_signature": "public ... | {
"body": "public static int[] getDimensions(Object array) {\n int[] dimensions = new int[0];\n Class<?> type = array.getClass();\n\n while (type.isArray()) {\n int length = array != null ? Array.getLength(array) : 0;\n dimensions = Ints.concat(dimensions, new int[]{length})... | {
"created": "5/6/2016 1:20:04 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 58208693,
"size": null,
"stargazer_count": null,
"stars": 405,
"updates": "2020-01-26T11:03:08+00:00",
"url": "https://github.com/eclipse/milo"
} |
58208693_34 | {
"fields": [
{
"declarator": "namespaceTable = new NamespaceTable()",
"modifier": "private final",
"original_string": "private final NamespaceTable namespaceTable = new NamespaceTable();",
"type": "NamespaceTable",
"var_name": "namespaceTable"
}
],
"file": "opc-ua-stack/stac... | {
"body": "@Test\n public void reindex() {\n NamespaceTable namespaceTable = new NamespaceTable();\n namespaceTable.addUri(\"test1\");\n namespaceTable.addUri(\"test2\");\n\n ExpandedNodeId xni1 = new ExpandedNodeId(ushort(1), null, \"test\");\n\n ExpandedNodeId xni2 = xni1.reind... | {
"fields": [
{
"declarator": "NULL_VALUE = new ExpandedNodeId(\n UShort.MIN,\n null,\n UInteger.MIN,\n UInteger.MIN\n )",
"modifier": "public static final",
"original_string": "public static final ExpandedNodeId NULL_VALUE = new ExpandedNodeId(\n UShort.MIN... | {
"body": "public ExpandedNodeId reindex(NamespaceTable namespaceTable, String namespaceUri) {\n if (isAbsolute()) {\n // namespaceUri is specified; namespaceIndex is ignored\n return this;\n } else {\n UShort newNamespaceIndex = namespaceTable.getIndex(namespaceUri);\n\... | {
"created": "5/6/2016 1:20:04 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 58208693,
"size": null,
"stargazer_count": null,
"stars": 405,
"updates": "2020-01-26T11:03:08+00:00",
"url": "https://github.com/eclipse/milo"
} |
58208693_35 | {
"fields": [],
"file": "opc-ua-stack/stack-core/src/test/java/org/eclipse/milo/opcua/stack/core/types/builtin/NodeIdTest.java",
"identifier": "NodeIdTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void testParseInvalid() {\n assertNull(NodeId.parseOrNull(\"\"));\n assertNull(NodeId.parseOrNull(\"n\"));\n assertNull(NodeId.parseOrNull(\"ns\"));\n assertNull(NodeId.parseOrNull(\"ns=\"));\n assertNull(NodeId.parseOrNull(\"ns=0\"));\n assertNul... | {
"fields": [
{
"declarator": "NULL_NUMERIC = new NodeId(ushort(0), uint(0))",
"modifier": "public static final",
"original_string": "public static final NodeId NULL_NUMERIC = new NodeId(ushort(0), uint(0));",
"type": "NodeId",
"var_name": "NULL_NUMERIC"
},
{
"declarato... | {
"body": "@Nullable\n public static NodeId parseOrNull(@Nonnull String s) {\n try {\n return NodeId.parse(s);\n } catch (UaRuntimeException t) {\n return null;\n }\n }",
"class_method_signature": "NodeId.parseOrNull(@Nonnull String s)",
"constructor": false,
"fu... | {
"created": "5/6/2016 1:20:04 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 58208693,
"size": null,
"stargazer_count": null,
"stars": 405,
"updates": "2020-01-26T11:03:08+00:00",
"url": "https://github.com/eclipse/milo"
} |
58208693_6 | {
"fields": [],
"file": "opc-ua-stack/stack-core/src/test/java/org/eclipse/milo/opcua/stack/core/util/ArrayUtilTest.java",
"identifier": "ArrayUtilTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test(dataProvider = \"arrays\")\n public void testFlatten(Object array) throws Exception {\n Object flattened = ArrayUtil.flatten(array);\n\n for (int i = 0; i < Array.getLength(flattened); i++) {\n assertEquals(Array.get(flattened, i), i);\n }\n }",
"class_method_s... | {
"fields": [],
"file": "opc-ua-stack/stack-core/src/main/java/org/eclipse/milo/opcua/stack/core/util/ArrayUtil.java",
"identifier": "ArrayUtil",
"interfaces": "",
"methods": [
{
"class_method_signature": "ArrayUtil.flatten(Object array)",
"constructor": false,
"full_signature": "public ... | {
"body": "public static Object flatten(Object array) {\n Preconditions.checkArgument(array.getClass().isArray(), \"array\");\n\n Class<?> type = getType(array);\n int[] dimensions = getDimensions(array);\n int length = length(dimensions);\n\n Object flattened = Array.newInstance(ty... | {
"created": "5/6/2016 1:20:04 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 58208693,
"size": null,
"stargazer_count": null,
"stars": 405,
"updates": "2020-01-26T11:03:08+00:00",
"url": "https://github.com/eclipse/milo"
} |
58208693_62 | {
"fields": [],
"file": "opc-ua-sdk/sdk-server/src/test/java/org/eclipse/milo/opcua/sdk/server/events/conversions/NodeIdConversionsTest.java",
"identifier": "NodeIdConversionsTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void testNodeIdToExpandedNodeId() {\n NodeId nodeId = new NodeId(0, \"foo\");\n ExpandedNodeId expanded = nodeId.expanded();\n\n assertEquals(nodeIdToExpandedNodeId(nodeId), expanded);\n }",
"class_method_signature": "NodeIdConversionsTest.testNodeIdToExpandedNod... | {
"fields": [],
"file": "opc-ua-sdk/sdk-server/src/main/java/org/eclipse/milo/opcua/sdk/server/events/conversions/NodeIdConversions.java",
"identifier": "NodeIdConversions",
"interfaces": "",
"methods": [
{
"class_method_signature": "NodeIdConversions.NodeIdConversions()",
"constructor": true,... | {
"body": "@Nonnull\n static ExpandedNodeId nodeIdToExpandedNodeId(@Nonnull NodeId nodeId) {\n return nodeId.expanded();\n }",
"class_method_signature": "NodeIdConversions.nodeIdToExpandedNodeId(@Nonnull NodeId nodeId)",
"constructor": false,
"full_signature": "@Nonnull static ExpandedNodeId nodeId... | {
"created": "5/6/2016 1:20:04 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 58208693,
"size": null,
"stargazer_count": null,
"stars": 405,
"updates": "2020-01-26T11:03:08+00:00",
"url": "https://github.com/eclipse/milo"
} |
58208693_74 | {
"fields": [],
"file": "opc-ua-sdk/sdk-server/src/test/java/org/eclipse/milo/opcua/sdk/server/events/conversions/BooleanConversionsTest.java",
"identifier": "BooleanConversionsTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void testBooleanToUInt64() {\n assertEquals(booleanToUInt64(false), ulong(0));\n assertEquals(booleanToUInt64(true), ulong(1));\n }",
"class_method_signature": "BooleanConversionsTest.testBooleanToUInt64()",
"constructor": false,
"full_signature": "@Test public void... | {
"fields": [],
"file": "opc-ua-sdk/sdk-server/src/main/java/org/eclipse/milo/opcua/sdk/server/events/conversions/BooleanConversions.java",
"identifier": "BooleanConversions",
"interfaces": "",
"methods": [
{
"class_method_signature": "BooleanConversions.BooleanConversions()",
"constructor": t... | {
"body": "@Nonnull\n static ULong booleanToUInt64(@Nonnull Boolean b) {\n return b ? ulong(1) : ulong(0);\n }",
"class_method_signature": "BooleanConversions.booleanToUInt64(@Nonnull Boolean b)",
"constructor": false,
"full_signature": "@Nonnull static ULong booleanToUInt64(@Nonnull Boolean b)",
... | {
"created": "5/6/2016 1:20:04 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 58208693,
"size": null,
"stargazer_count": null,
"stars": 405,
"updates": "2020-01-26T11:03:08+00:00",
"url": "https://github.com/eclipse/milo"
} |
58208693_23 | {
"fields": [
{
"declarator": "executor = Executors.newCachedThreadPool()",
"modifier": "private final",
"original_string": "private final ExecutorService executor = Executors.newCachedThreadPool();",
"type": "ExecutorService",
"var_name": "executor"
}
],
"file": "opc-ua-stac... | {
"body": "@Test\n public void testWithConcurrency() throws InterruptedException {\n ExecutionQueue queue = new ExecutionQueue(executor, 4);\n\n final CountDownLatch latch = new CountDownLatch(100000);\n final AtomicInteger count = new AtomicInteger();\n\n for (int i = 0; i < 100000; i+... | {
"fields": [
{
"declarator": "log = LoggerFactory.getLogger(getClass())",
"modifier": "private final",
"original_string": "private final Logger log = LoggerFactory.getLogger(getClass());",
"type": "Logger",
"var_name": "log"
},
{
"declarator": "queueLock = new Object()... | {
"body": "public void submit(Runnable runnable) {\n synchronized (queueLock) {\n queue.add(runnable);\n\n maybePollAndExecute();\n }\n }",
"class_method_signature": "ExecutionQueue.submit(Runnable runnable)",
"constructor": false,
"full_signature": "public void submit(Run... | {
"created": "5/6/2016 1:20:04 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 58208693,
"size": null,
"stargazer_count": null,
"stars": 405,
"updates": "2020-01-26T11:03:08+00:00",
"url": "https://github.com/eclipse/milo"
} |
58208693_58 | {
"fields": [],
"file": "opc-ua-sdk/sdk-server/src/test/java/org/eclipse/milo/opcua/sdk/server/events/operators/EqualsTest.java",
"identifier": "EqualsTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void testArrayNotEqual() throws Exception {\n OperatorContext context = mock(OperatorContext.class);\n BaseEventTypeNode eventNode = mock(BaseEventTypeNode.class);\n\n FilterOperand op0 = new LiteralOperand(new Variant(new int[]{1, 2, 3}));\n FilterOperand op1 ... | {
"fields": [],
"file": "opc-ua-sdk/sdk-server/src/main/java/org/eclipse/milo/opcua/sdk/server/events/operators/Equals.java",
"identifier": "Equals",
"interfaces": "implements Operator<Boolean>",
"methods": [
{
"class_method_signature": "Equals.Equals()",
"constructor": true,
"full_signa... | {
"body": "@Nullable\n @Override\n public Boolean apply(\n OperatorContext context,\n BaseEventTypeNode eventNode,\n FilterOperand[] operands) throws UaException {\n\n validate(context, operands);\n\n FilterOperand op0 = operands[0];\n FilterOperand op1 = operands[1];\n... | {
"created": "5/6/2016 1:20:04 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 58208693,
"size": null,
"stargazer_count": null,
"stars": 405,
"updates": "2020-01-26T11:03:08+00:00",
"url": "https://github.com/eclipse/milo"
} |
58208693_19 | {
"fields": [],
"file": "opc-ua-stack/stack-core/src/test/java/org/eclipse/milo/opcua/stack/core/util/LazyTest.java",
"identifier": "LazyTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void lazyRetainsNonNullValue() {\n Lazy<Object> lazy = new Lazy<>();\n\n Object instance = new Object();\n\n Object o1 = lazy.getOrCompute(() -> instance);\n assertEquals(o1, instance);\n\n Object o2 = lazy.getOrCompute(() -> instance);\n assertEq... | {
"fields": [
{
"declarator": "LAZY_NULL = new Object()",
"modifier": "private static final",
"original_string": "private static final Object LAZY_NULL = new Object();",
"type": "Object",
"var_name": "LAZY_NULL"
},
{
"declarator": "value",
"modifier": "private vol... | {
"body": "@SuppressWarnings(\"unchecked\")\n public T getOrCompute(@Nonnull Supplier<T> supplier) {\n final Object v1 = value;\n\n if (v1 == LAZY_NULL) {\n return null;\n } else {\n if (v1 == null) {\n Object v2 = maybeCompute(supplier);\n r... | {
"created": "5/6/2016 1:20:04 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 58208693,
"size": null,
"stargazer_count": null,
"stars": 405,
"updates": "2020-01-26T11:03:08+00:00",
"url": "https://github.com/eclipse/milo"
} |
58208693_39 | {
"fields": [],
"file": "opc-ua-stack/stack-core/src/test/java/org/eclipse/milo/opcua/stack/core/types/builtin/NodeIdTest.java",
"identifier": "NodeIdTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void testExpandedWithNamespaceTable() {\n NamespaceTable namespaceTable = new NamespaceTable();\n namespaceTable.addUri(\"urn:test\");\n\n NodeId nodeId = new NodeId(1, \"foo\");\n ExpandedNodeId xni = nodeId.expanded(namespaceTable);\n\n assertEquals(xn... | {
"fields": [
{
"declarator": "NULL_NUMERIC = new NodeId(ushort(0), uint(0))",
"modifier": "public static final",
"original_string": "public static final NodeId NULL_NUMERIC = new NodeId(ushort(0), uint(0));",
"type": "NodeId",
"var_name": "NULL_NUMERIC"
},
{
"declarato... | {
"body": "public ExpandedNodeId expanded() {\n return new ExpandedNodeId(namespaceIndex, null, identifier, UInteger.MIN);\n }",
"class_method_signature": "NodeId.expanded()",
"constructor": false,
"full_signature": "public ExpandedNodeId expanded()",
"identifier": "expanded",
"invocations": [],
... | {
"created": "5/6/2016 1:20:04 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 58208693,
"size": null,
"stargazer_count": null,
"stars": 405,
"updates": "2020-01-26T11:03:08+00:00",
"url": "https://github.com/eclipse/milo"
} |
58208693_81 | {
"fields": [],
"file": "opc-ua-sdk/sdk-server/src/test/java/org/eclipse/milo/opcua/sdk/server/events/conversions/QualifiedNameConversionsTest.java",
"identifier": "QualifiedNameConversionsTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void testQualifiedNameToString() {\n QualifiedName name = new QualifiedName(0, \"foo\");\n\n assertEquals(qualifiedNameToString(name), \"foo\");\n }",
"class_method_signature": "QualifiedNameConversionsTest.testQualifiedNameToString()",
"constructor": false,
"full_s... | {
"fields": [],
"file": "opc-ua-sdk/sdk-server/src/main/java/org/eclipse/milo/opcua/sdk/server/events/conversions/QualifiedNameConversions.java",
"identifier": "QualifiedNameConversions",
"interfaces": "",
"methods": [
{
"class_method_signature": "QualifiedNameConversions.QualifiedNameConversions()"... | {
"body": "@Nullable\n static String qualifiedNameToString(@Nonnull QualifiedName name) {\n return name.getName();\n }",
"class_method_signature": "QualifiedNameConversions.qualifiedNameToString(@Nonnull QualifiedName name)",
"constructor": false,
"full_signature": "@Nullable static String qualifie... | {
"created": "5/6/2016 1:20:04 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 58208693,
"size": null,
"stargazer_count": null,
"stars": 405,
"updates": "2020-01-26T11:03:08+00:00",
"url": "https://github.com/eclipse/milo"
} |
58208693_78 | {
"fields": [],
"file": "opc-ua-sdk/sdk-server/src/test/java/org/eclipse/milo/opcua/sdk/server/events/conversions/GuidConversionsTest.java",
"identifier": "GuidConversionsTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void testGuidToString() {\n UUID uuid = UUID.randomUUID();\n\n assertEquals(uuid.toString(), GuidConversions.guidToString(uuid));\n }",
"class_method_signature": "GuidConversionsTest.testGuidToString()",
"constructor": false,
"full_signature": "@Test public void tes... | {
"fields": [],
"file": "opc-ua-sdk/sdk-server/src/main/java/org/eclipse/milo/opcua/sdk/server/events/conversions/GuidConversions.java",
"identifier": "GuidConversions",
"interfaces": "",
"methods": [
{
"class_method_signature": "GuidConversions.GuidConversions()",
"constructor": true,
"... | {
"body": "@Nonnull\n static String guidToString(@Nonnull UUID uuid) {\n return uuid.toString();\n }",
"class_method_signature": "GuidConversions.guidToString(@Nonnull UUID uuid)",
"constructor": false,
"full_signature": "@Nonnull static String guidToString(@Nonnull UUID uuid)",
"identifier": "gu... | {
"created": "5/6/2016 1:20:04 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 58208693,
"size": null,
"stargazer_count": null,
"stars": 405,
"updates": "2020-01-26T11:03:08+00:00",
"url": "https://github.com/eclipse/milo"
} |
58208693_54 | {
"fields": [],
"file": "opc-ua-sdk/sdk-server/src/test/java/org/eclipse/milo/opcua/sdk/server/events/operators/EqualsTest.java",
"identifier": "EqualsTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void testArray() throws Exception {\n OperatorContext context = mock(OperatorContext.class);\n BaseEventTypeNode eventNode = mock(BaseEventTypeNode.class);\n\n FilterOperand op0 = new LiteralOperand(new Variant(new int[]{1, 2, 3}));\n FilterOperand op1 = new Li... | {
"fields": [],
"file": "opc-ua-sdk/sdk-server/src/main/java/org/eclipse/milo/opcua/sdk/server/events/operators/Equals.java",
"identifier": "Equals",
"interfaces": "implements Operator<Boolean>",
"methods": [
{
"class_method_signature": "Equals.Equals()",
"constructor": true,
"full_signa... | {
"body": "@Nullable\n @Override\n public Boolean apply(\n OperatorContext context,\n BaseEventTypeNode eventNode,\n FilterOperand[] operands) throws UaException {\n\n validate(context, operands);\n\n FilterOperand op0 = operands[0];\n FilterOperand op1 = operands[1];\n... | {
"created": "5/6/2016 1:20:04 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 58208693,
"size": null,
"stargazer_count": null,
"stars": 405,
"updates": "2020-01-26T11:03:08+00:00",
"url": "https://github.com/eclipse/milo"
} |
58208693_15 | {
"fields": [
{
"declarator": "keyPair",
"modifier": "private final",
"original_string": "private final KeyPair keyPair;",
"type": "KeyPair",
"var_name": "keyPair"
},
{
"declarator": "certificate",
"modifier": "private final",
"original_string": "private fin... | {
"body": "@Test\n public void testGetSanDnsNames() {\n List<String> sanDnsNames = CertificateUtil.getSanDnsNames(certificate);\n assertEquals(sanDnsNames, newArrayList(\"localhost\", \"hostname\"));\n }",
"class_method_signature": "CertificateUtilTest.testGetSanDnsNames()",
"constructor": fal... | {
"fields": [
{
"declarator": "SUBJECT_ALT_NAME_DNS_NAME = GeneralName.dNSName",
"modifier": "public static final",
"original_string": "public static final int SUBJECT_ALT_NAME_DNS_NAME = GeneralName.dNSName;",
"type": "int",
"var_name": "SUBJECT_ALT_NAME_DNS_NAME"
},
{
... | {
"body": "public static List<String> getSanDnsNames(X509Certificate certificate) {\n List<Object> values = getSubjectAltNameField(certificate, SUBJECT_ALT_NAME_DNS_NAME);\n\n return values.stream()\n .filter(v -> v instanceof String)\n .map(String.class::cast)\n .collec... | {
"created": "5/6/2016 1:20:04 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 58208693,
"size": null,
"stargazer_count": null,
"stars": 405,
"updates": "2020-01-26T11:03:08+00:00",
"url": "https://github.com/eclipse/milo"
} |
58208693_42 | {
"fields": [],
"file": "opc-ua-sdk/sdk-server/src/test/java/org/eclipse/milo/opcua/sdk/server/util/HostnameUtilTest.java",
"identifier": "HostnameUtilTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void testGetHostnames_ExcludeLocal() throws Exception {\n Set<String> hostnames = HostnameUtil.getHostnames(\"0.0.0.0\", false);\n\n hostnames.forEach(hostname -> {\n assertNotEquals(hostname, \"127.0.0.1\");\n assertNotEquals(hostname, \"localhost\");\... | {
"fields": [],
"file": "opc-ua-sdk/sdk-server/src/main/java/org/eclipse/milo/opcua/sdk/server/util/HostnameUtil.java",
"identifier": "HostnameUtil",
"interfaces": "",
"methods": [
{
"class_method_signature": "HostnameUtil.getHostname()",
"constructor": false,
"full_signature": "public s... | {
"body": "public static Set<String> getHostnames(String address) {\n return getHostnames(address, true);\n }",
"class_method_signature": "HostnameUtil.getHostnames(String address)",
"constructor": false,
"full_signature": "public static Set<String> getHostnames(String address)",
"identifier": "getH... | {
"created": "5/6/2016 1:20:04 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 58208693,
"size": null,
"stargazer_count": null,
"stars": 405,
"updates": "2020-01-26T11:03:08+00:00",
"url": "https://github.com/eclipse/milo"
} |
58208693_49 | {
"fields": [
{
"declarator": "server",
"modifier": "private",
"original_string": "private OpcUaServer server;",
"type": "OpcUaServer",
"var_name": "server"
},
{
"declarator": "nodeManager",
"modifier": "private",
"original_string": "private UaNodeManager no... | {
"body": "@Test\n public void testInstanceListener() throws Exception {\n final AtomicBoolean methodAdded = new AtomicBoolean(false);\n final AtomicBoolean objectAdded = new AtomicBoolean(false);\n final AtomicBoolean variableAdded = new AtomicBoolean(false);\n\n ServerTypeNode serverN... | {
"fields": [
{
"declarator": "IDH_CACHE = CacheBuilder.newBuilder()\n .maximumSize(1024)\n .expireAfterAccess(1, TimeUnit.HOURS)\n .build()",
"modifier": "private static final",
"original_string": "private static final Cache<NodeId, InstanceDeclarationHierarchy> IDH_CACHE =... | {
"body": "public UaNode createNode(\n NodeId rootNodeId,\n NodeId typeDefinitionId\n ) throws UaException {\n\n return createNode(rootNodeId, typeDefinitionId, new InstantiationCallback() {});\n }",
"class_method_signature": "NodeFactory.createNode(\n NodeId rootNodeId,\n N... | {
"created": "5/6/2016 1:20:04 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 58208693,
"size": null,
"stargazer_count": null,
"stars": 405,
"updates": "2020-01-26T11:03:08+00:00",
"url": "https://github.com/eclipse/milo"
} |
58208693_24 | {
"fields": [],
"file": "opc-ua-stack/stack-core/src/test/java/org/eclipse/milo/opcua/stack/core/serialization/OpcUaXmlStreamDecoderTest.java",
"identifier": "OpcUaXmlStreamDecoderTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void testReadVariantValue() throws Exception {\n String xml =\n \"<ListOfExtensionObject xmlns=\\\"http://opcfoundation.org/UA/2008/02/Types.xsd\\\" xmlns:xsd=\\\"http://www.w3.org/2001/XMLSchema\\\" xmlns:xsi=\\\"http://www.w3.org/2001/XMLSchema-instance\\\">\" +\n ... | {
"fields": [
{
"declarator": "builder",
"modifier": "private final",
"original_string": "private final DocumentBuilder builder;",
"type": "DocumentBuilder",
"var_name": "builder"
},
{
"declarator": "document",
"modifier": "private",
"original_string": "priv... | {
"body": "public Object readVariantValue() {\n if (currentNode(null)) {\n Node node = currentNode;\n\n String nodeName = node.getLocalName();\n\n if (nodeName.startsWith(\"ListOf\")) {\n String type = nodeName.substring(6);\n\n List<Object> values... | {
"created": "5/6/2016 1:20:04 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 58208693,
"size": null,
"stargazer_count": null,
"stars": 405,
"updates": "2020-01-26T11:03:08+00:00",
"url": "https://github.com/eclipse/milo"
} |
58208693_73 | {
"fields": [],
"file": "opc-ua-sdk/sdk-server/src/test/java/org/eclipse/milo/opcua/sdk/server/events/conversions/BooleanConversionsTest.java",
"identifier": "BooleanConversionsTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void testBooleanToUInt32() {\n assertEquals(booleanToUInt32(false), uint(0));\n assertEquals(booleanToUInt32(true), uint(1));\n }",
"class_method_signature": "BooleanConversionsTest.testBooleanToUInt32()",
"constructor": false,
"full_signature": "@Test public void t... | {
"fields": [],
"file": "opc-ua-sdk/sdk-server/src/main/java/org/eclipse/milo/opcua/sdk/server/events/conversions/BooleanConversions.java",
"identifier": "BooleanConversions",
"interfaces": "",
"methods": [
{
"class_method_signature": "BooleanConversions.BooleanConversions()",
"constructor": t... | {
"body": "@Nonnull\n static UInteger booleanToUInt32(@Nonnull Boolean b) {\n return b ? uint(1) : uint(0);\n }",
"class_method_signature": "BooleanConversions.booleanToUInt32(@Nonnull Boolean b)",
"constructor": false,
"full_signature": "@Nonnull static UInteger booleanToUInt32(@Nonnull Boolean b)... | {
"created": "5/6/2016 1:20:04 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 58208693,
"size": null,
"stargazer_count": null,
"stars": 405,
"updates": "2020-01-26T11:03:08+00:00",
"url": "https://github.com/eclipse/milo"
} |
58208693_65 | {
"fields": [],
"file": "opc-ua-sdk/sdk-server/src/test/java/org/eclipse/milo/opcua/sdk/server/events/conversions/BooleanConversionsTest.java",
"identifier": "BooleanConversionsTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void testBooleanToDouble() {\n assertEquals(booleanToDouble(false), 0.0);\n assertEquals(booleanToDouble(true), 1.0);\n }",
"class_method_signature": "BooleanConversionsTest.testBooleanToDouble()",
"constructor": false,
"full_signature": "@Test public void testBoole... | {
"fields": [],
"file": "opc-ua-sdk/sdk-server/src/main/java/org/eclipse/milo/opcua/sdk/server/events/conversions/BooleanConversions.java",
"identifier": "BooleanConversions",
"interfaces": "",
"methods": [
{
"class_method_signature": "BooleanConversions.BooleanConversions()",
"constructor": t... | {
"body": "@Nonnull\n static Double booleanToDouble(@Nonnull Boolean b) {\n return b ? 1.0 : 0.0;\n }",
"class_method_signature": "BooleanConversions.booleanToDouble(@Nonnull Boolean b)",
"constructor": false,
"full_signature": "@Nonnull static Double booleanToDouble(@Nonnull Boolean b)",
"identi... | {
"created": "5/6/2016 1:20:04 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 58208693,
"size": null,
"stargazer_count": null,
"stars": 405,
"updates": "2020-01-26T11:03:08+00:00",
"url": "https://github.com/eclipse/milo"
} |
58208693_1 | {
"fields": [
{
"declarator": "ALIAS_CA_INTERMEDIATE = \"ca-intermediate\"",
"modifier": "private static final",
"original_string": "private static final String ALIAS_CA_INTERMEDIATE = \"ca-intermediate\";",
"type": "String",
"var_name": "ALIAS_CA_INTERMEDIATE"
},
{
"de... | {
"body": "@Test\n public void testBuildTrustedCertPath_LeafSelfSigned_NotTrusted() {\n List<X509Certificate> certificateChain = newArrayList(leafSelfSigned);\n\n expectThrows(\n UaException.class,\n () -> buildTrustedCertPath(\n certificateChain,\n ... | {
"fields": [
{
"declarator": "LOGGER = LoggerFactory.getLogger(CertificateValidationUtil.class)",
"modifier": "private static final",
"original_string": "private static final Logger LOGGER = LoggerFactory.getLogger(CertificateValidationUtil.class);",
"type": "Logger",
"var_name": "L... | {
"body": "public static PKIXCertPathBuilderResult buildTrustedCertPath(\n List<X509Certificate> certificateChain,\n Collection<X509Certificate> trustedCertificates,\n Collection<X509Certificate> issuerCertificates\n ) throws UaException {\n\n Preconditions.checkArgument(!certificateCha... | {
"created": "5/6/2016 1:20:04 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 58208693,
"size": null,
"stargazer_count": null,
"stars": 405,
"updates": "2020-01-26T11:03:08+00:00",
"url": "https://github.com/eclipse/milo"
} |
58208693_32 | {
"fields": [
{
"declarator": "namespaceTable = new NamespaceTable()",
"modifier": "private final",
"original_string": "private final NamespaceTable namespaceTable = new NamespaceTable();",
"type": "NamespaceTable",
"var_name": "namespaceTable"
}
],
"file": "opc-ua-stack/stac... | {
"body": "@Test\n public void relative() {\n ExpandedNodeId xni = new ExpandedNodeId(ushort(99), Namespaces.OPC_UA, \"foo\");\n assertTrue(xni.isAbsolute());\n\n ExpandedNodeId relative = xni.relative(new NamespaceTable()).orElseThrow(RuntimeException::new);\n assertTrue(relative.isRel... | {
"fields": [
{
"declarator": "NULL_VALUE = new ExpandedNodeId(\n UShort.MIN,\n null,\n UInteger.MIN,\n UInteger.MIN\n )",
"modifier": "public static final",
"original_string": "public static final ExpandedNodeId NULL_VALUE = new ExpandedNodeId(\n UShort.MIN... | {
"body": "public Optional<ExpandedNodeId> relative(NamespaceTable namespaceTable) {\n if (isRelative()) {\n return Optional.of(this);\n } else {\n UShort namespaceIndex = namespaceTable.getIndex(namespaceUri);\n\n if (namespaceIndex != null) {\n ExpandedN... | {
"created": "5/6/2016 1:20:04 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 58208693,
"size": null,
"stargazer_count": null,
"stars": 405,
"updates": "2020-01-26T11:03:08+00:00",
"url": "https://github.com/eclipse/milo"
} |
58208693_45 | {
"fields": [
{
"declarator": "nodeManager = new UaNodeManager()",
"modifier": "private final",
"original_string": "private final UaNodeManager nodeManager = new UaNodeManager();",
"type": "UaNodeManager",
"var_name": "nodeManager"
},
{
"declarator": "context = new UaNo... | {
"body": "@Test\n public void testAddLast() {\n AttributeFilterChain chain = new AttributeFilterChain();\n\n chain.addLast(\n AttributeFilters.getValue(ctx -> (DataValue) ctx.getAttribute(AttributeId.Value)),\n AttributeFilters.getValue(ctx -> new DataValue(new Variant(\"Last\"... | {
"fields": [
{
"declarator": "filters = new ConcurrentLinkedDeque<>()",
"modifier": "private final",
"original_string": "private final ConcurrentLinkedDeque<AttributeFilter> filters = new ConcurrentLinkedDeque<>();",
"type": "ConcurrentLinkedDeque<AttributeFilter>",
"var_name": "fil... | {
"body": "public AttributeFilterChain addLast(AttributeFilter attributeFilter) {\n filters.addLast(attributeFilter);\n\n return this;\n }",
"class_method_signature": "AttributeFilterChain.addLast(AttributeFilter attributeFilter)",
"constructor": false,
"full_signature": "public AttributeFilter... | {
"created": "5/6/2016 1:20:04 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 58208693,
"size": null,
"stargazer_count": null,
"stars": 405,
"updates": "2020-01-26T11:03:08+00:00",
"url": "https://github.com/eclipse/milo"
} |
58208693_12 | {
"fields": [
{
"declarator": "keyPair",
"modifier": "private final",
"original_string": "private final KeyPair keyPair;",
"type": "KeyPair",
"var_name": "keyPair"
},
{
"declarator": "certificate",
"modifier": "private final",
"original_string": "private fin... | {
"body": "@Test\n public void testGenerateCsr() throws Exception {\n assertNotNull(CertificateUtil.generateCsr(keyPair, certificate));\n }",
"class_method_signature": "CertificateUtilTest.testGenerateCsr()",
"constructor": false,
"full_signature": "@Test public void testGenerateCsr()",
"identifi... | {
"fields": [
{
"declarator": "SUBJECT_ALT_NAME_DNS_NAME = GeneralName.dNSName",
"modifier": "public static final",
"original_string": "public static final int SUBJECT_ALT_NAME_DNS_NAME = GeneralName.dNSName;",
"type": "int",
"var_name": "SUBJECT_ALT_NAME_DNS_NAME"
},
{
... | {
"body": "public static PKCS10CertificationRequest generateCsr(\n KeyPair keyPair,\n X509Certificate certificate\n ) throws Exception {\n\n PKCS10CertificationRequestBuilder builder = new JcaPKCS10CertificationRequestBuilder(\n certificate.getSubjectX500Principal(),\n ce... | {
"created": "5/6/2016 1:20:04 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 58208693,
"size": null,
"stargazer_count": null,
"stars": 405,
"updates": "2020-01-26T11:03:08+00:00",
"url": "https://github.com/eclipse/milo"
} |
58208693_53 | {
"fields": [],
"file": "opc-ua-sdk/sdk-server/src/test/java/org/eclipse/milo/opcua/sdk/server/LifecycleManagerTest.java",
"identifier": "LifecycleManagerTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void testShutdownOrderInverse() {\n LifecycleManager manager = new LifecycleManager(LifecycleManager.ShutdownOrder.INVERSE);\n\n AtomicInteger i = new AtomicInteger(0);\n manager.addShutdownTask(() -> assertEquals(i.getAndIncrement(), 2));\n manager.addShutdown... | {
"fields": [
{
"declarator": "lifecycles = new CopyOnWriteArrayList<>()",
"modifier": "private final",
"original_string": "private final CopyOnWriteArrayList<Lifecycle> lifecycles = new CopyOnWriteArrayList<>();",
"type": "CopyOnWriteArrayList<Lifecycle>",
"var_name": "lifecycles"
... | {
"body": "public Lifecycle addShutdownTask(Runnable shutdownTask) {\n Lifecycle lifecycle = new Lifecycle() {\n @Override\n public void startup() {}\n\n @Override\n public void shutdown() {\n shutdownTask.run();\n }\n };\n\n a... | {
"created": "5/6/2016 1:20:04 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 58208693,
"size": null,
"stargazer_count": null,
"stars": 405,
"updates": "2020-01-26T11:03:08+00:00",
"url": "https://github.com/eclipse/milo"
} |
58208693_28 | {
"fields": [
{
"declarator": "namespaceTable = new NamespaceTable()",
"modifier": "private final",
"original_string": "private final NamespaceTable namespaceTable = new NamespaceTable();",
"type": "NamespaceTable",
"var_name": "namespaceTable"
}
],
"file": "opc-ua-stack/stac... | {
"body": "@Test\n public void testLocal() {\n namespaceTable.addUri(\"uri:test\");\n\n ExpandedNodeId xni0 = new ExpandedNodeId(ushort(0), null, \"test\");\n assertTrue(xni0.local(namespaceTable).isPresent());\n\n ExpandedNodeId xni1 = new ExpandedNodeId(ushort(1), null, \"test\");\n ... | {
"fields": [
{
"declarator": "NULL_VALUE = new ExpandedNodeId(\n UShort.MIN,\n null,\n UInteger.MIN,\n UInteger.MIN\n )",
"modifier": "public static final",
"original_string": "public static final ExpandedNodeId NULL_VALUE = new ExpandedNodeId(\n UShort.MIN... | {
"body": "@Deprecated\n public Optional<NodeId> local(NamespaceTable namespaceTable) {\n return toNodeId(namespaceTable);\n }",
"class_method_signature": "ExpandedNodeId.local(NamespaceTable namespaceTable)",
"constructor": false,
"full_signature": "@Deprecated public Optional<NodeId> local(Namesp... | {
"created": "5/6/2016 1:20:04 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 58208693,
"size": null,
"stargazer_count": null,
"stars": 405,
"updates": "2020-01-26T11:03:08+00:00",
"url": "https://github.com/eclipse/milo"
} |
58208693_90 | {
"fields": [
{
"declarator": "CONVERSIONS = new Object[][]{\n {ubyte(0), Boolean.FALSE},\n {ubyte(1), Boolean.TRUE},\n\n {ubyte(0), 0.0d},\n {ubyte(1), 1.0d},\n\n {ubyte(0), 0.0f},\n {ubyte(1), 1.0f}\n }",
"modifier": "public static final",
"original... | {
"body": "@Test\n public void testByteToInt64() {\n assertEquals(byteToInt64(ubyte(0)), Long.valueOf(0));\n assertEquals(byteToInt64(ubyte(1)), Long.valueOf(1));\n }",
"class_method_signature": "ByteConversionsTest.testByteToInt64()",
"constructor": false,
"full_signature": "@Test public vo... | {
"fields": [],
"file": "opc-ua-sdk/sdk-server/src/main/java/org/eclipse/milo/opcua/sdk/server/events/conversions/ByteConversions.java",
"identifier": "ByteConversions",
"interfaces": "",
"methods": [
{
"class_method_signature": "ByteConversions.ByteConversions()",
"constructor": true,
"... | {
"body": "@Nonnull\n static Long byteToInt64(@Nonnull UByte ub) {\n return ub.longValue();\n }",
"class_method_signature": "ByteConversions.byteToInt64(@Nonnull UByte ub)",
"constructor": false,
"full_signature": "@Nonnull static Long byteToInt64(@Nonnull UByte ub)",
"identifier": "byteToInt64",... | {
"created": "5/6/2016 1:20:04 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 58208693,
"size": null,
"stargazer_count": null,
"stars": 405,
"updates": "2020-01-26T11:03:08+00:00",
"url": "https://github.com/eclipse/milo"
} |
58208693_69 | {
"fields": [],
"file": "opc-ua-sdk/sdk-server/src/test/java/org/eclipse/milo/opcua/sdk/server/events/conversions/BooleanConversionsTest.java",
"identifier": "BooleanConversionsTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void testBooleanToInt64() {\n assertEquals((long) booleanToInt64(false), 0);\n assertEquals((long) booleanToInt64(true), 1);\n }",
"class_method_signature": "BooleanConversionsTest.testBooleanToInt64()",
"constructor": false,
"full_signature": "@Test public void tes... | {
"fields": [],
"file": "opc-ua-sdk/sdk-server/src/main/java/org/eclipse/milo/opcua/sdk/server/events/conversions/BooleanConversions.java",
"identifier": "BooleanConversions",
"interfaces": "",
"methods": [
{
"class_method_signature": "BooleanConversions.BooleanConversions()",
"constructor": t... | {
"body": "@Nonnull\n static Long booleanToInt64(@Nonnull Boolean b) {\n return b ? 1L : 0L;\n }",
"class_method_signature": "BooleanConversions.booleanToInt64(@Nonnull Boolean b)",
"constructor": false,
"full_signature": "@Nonnull static Long booleanToInt64(@Nonnull Boolean b)",
"identifier": "b... | {
"created": "5/6/2016 1:20:04 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 58208693,
"size": null,
"stargazer_count": null,
"stars": 405,
"updates": "2020-01-26T11:03:08+00:00",
"url": "https://github.com/eclipse/milo"
} |
58208693_86 | {
"fields": [
{
"declarator": "CONVERSIONS = new Object[][]{\n {ubyte(0), Boolean.FALSE},\n {ubyte(1), Boolean.TRUE},\n\n {ubyte(0), 0.0d},\n {ubyte(1), 1.0d},\n\n {ubyte(0), 0.0f},\n {ubyte(1), 1.0f}\n }",
"modifier": "public static final",
"original... | {
"body": "@Test\n public void testByteToDouble() {\n assertEquals(byteToDouble(ubyte(0)), 0.0d);\n assertEquals(byteToDouble(ubyte(1)), 1.0d);\n }",
"class_method_signature": "ByteConversionsTest.testByteToDouble()",
"constructor": false,
"full_signature": "@Test public void testByteToDoubl... | {
"fields": [],
"file": "opc-ua-sdk/sdk-server/src/main/java/org/eclipse/milo/opcua/sdk/server/events/conversions/ByteConversions.java",
"identifier": "ByteConversions",
"interfaces": "",
"methods": [
{
"class_method_signature": "ByteConversions.ByteConversions()",
"constructor": true,
"... | {
"body": "@Nonnull\n static Double byteToDouble(@Nonnull UByte ub) {\n return ub.doubleValue();\n }",
"class_method_signature": "ByteConversions.byteToDouble(@Nonnull UByte ub)",
"constructor": false,
"full_signature": "@Nonnull static Double byteToDouble(@Nonnull UByte ub)",
"identifier": "byte... | {
"created": "5/6/2016 1:20:04 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 58208693,
"size": null,
"stargazer_count": null,
"stars": 405,
"updates": "2020-01-26T11:03:08+00:00",
"url": "https://github.com/eclipse/milo"
} |
58208693_68 | {
"fields": [],
"file": "opc-ua-sdk/sdk-server/src/test/java/org/eclipse/milo/opcua/sdk/server/events/conversions/BooleanConversionsTest.java",
"identifier": "BooleanConversionsTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void testBooleanToInt32() {\n assertEquals((int) booleanToInt32(false), 0);\n assertEquals((int) booleanToInt32(true), 1);\n }",
"class_method_signature": "BooleanConversionsTest.testBooleanToInt32()",
"constructor": false,
"full_signature": "@Test public void testB... | {
"fields": [],
"file": "opc-ua-sdk/sdk-server/src/main/java/org/eclipse/milo/opcua/sdk/server/events/conversions/BooleanConversions.java",
"identifier": "BooleanConversions",
"interfaces": "",
"methods": [
{
"class_method_signature": "BooleanConversions.BooleanConversions()",
"constructor": t... | {
"body": "@Nonnull\n static Integer booleanToInt32(@Nonnull Boolean b) {\n return b ? 1 : 0;\n }",
"class_method_signature": "BooleanConversions.booleanToInt32(@Nonnull Boolean b)",
"constructor": false,
"full_signature": "@Nonnull static Integer booleanToInt32(@Nonnull Boolean b)",
"identifier"... | {
"created": "5/6/2016 1:20:04 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 58208693,
"size": null,
"stargazer_count": null,
"stars": 405,
"updates": "2020-01-26T11:03:08+00:00",
"url": "https://github.com/eclipse/milo"
} |
58208693_87 | {
"fields": [
{
"declarator": "CONVERSIONS = new Object[][]{\n {ubyte(0), Boolean.FALSE},\n {ubyte(1), Boolean.TRUE},\n\n {ubyte(0), 0.0d},\n {ubyte(1), 1.0d},\n\n {ubyte(0), 0.0f},\n {ubyte(1), 1.0f}\n }",
"modifier": "public static final",
"original... | {
"body": "@Test\n public void testByteToFloat() {\n assertEquals(byteToFloat(ubyte(0)), 0.0f);\n assertEquals(byteToFloat(ubyte(1)), 1.0f);\n }",
"class_method_signature": "ByteConversionsTest.testByteToFloat()",
"constructor": false,
"full_signature": "@Test public void testByteToFloat()",... | {
"fields": [],
"file": "opc-ua-sdk/sdk-server/src/main/java/org/eclipse/milo/opcua/sdk/server/events/conversions/ByteConversions.java",
"identifier": "ByteConversions",
"interfaces": "",
"methods": [
{
"class_method_signature": "ByteConversions.ByteConversions()",
"constructor": true,
"... | {
"body": "@Nonnull\n static Float byteToFloat(@Nonnull UByte ub) {\n return ub.floatValue();\n }",
"class_method_signature": "ByteConversions.byteToFloat(@Nonnull UByte ub)",
"constructor": false,
"full_signature": "@Nonnull static Float byteToFloat(@Nonnull UByte ub)",
"identifier": "byteToFloa... | {
"created": "5/6/2016 1:20:04 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 58208693,
"size": null,
"stargazer_count": null,
"stars": 405,
"updates": "2020-01-26T11:03:08+00:00",
"url": "https://github.com/eclipse/milo"
} |
58208693_91 | {
"fields": [
{
"declarator": "CONVERSIONS = new Object[][]{\n {ubyte(0), Boolean.FALSE},\n {ubyte(1), Boolean.TRUE},\n\n {ubyte(0), 0.0d},\n {ubyte(1), 1.0d},\n\n {ubyte(0), 0.0f},\n {ubyte(1), 1.0f}\n }",
"modifier": "public static final",
"original... | {
"body": "@Test\n public void testByteToSByte() {\n assertEquals(byteToSByte(ubyte(0)), Byte.valueOf((byte) 0));\n assertEquals(byteToSByte(ubyte(Byte.MAX_VALUE)), Byte.valueOf(Byte.MAX_VALUE));\n assertNull(byteToSByte(ubyte(Byte.MAX_VALUE + 1)));\n }",
"class_method_signature": "ByteCo... | {
"fields": [],
"file": "opc-ua-sdk/sdk-server/src/main/java/org/eclipse/milo/opcua/sdk/server/events/conversions/ByteConversions.java",
"identifier": "ByteConversions",
"interfaces": "",
"methods": [
{
"class_method_signature": "ByteConversions.ByteConversions()",
"constructor": true,
"... | {
"body": "@Nullable\n static Byte byteToSByte(@Nonnull UByte ub) {\n return ub.intValue() > Byte.MAX_VALUE ? null : ub.byteValue();\n }",
"class_method_signature": "ByteConversions.byteToSByte(@Nonnull UByte ub)",
"constructor": false,
"full_signature": "@Nullable static Byte byteToSByte(@Nonnull ... | {
"created": "5/6/2016 1:20:04 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 58208693,
"size": null,
"stargazer_count": null,
"stars": 405,
"updates": "2020-01-26T11:03:08+00:00",
"url": "https://github.com/eclipse/milo"
} |
58208693_29 | {
"fields": [
{
"declarator": "namespaceTable = new NamespaceTable()",
"modifier": "private final",
"original_string": "private final NamespaceTable namespaceTable = new NamespaceTable();",
"type": "NamespaceTable",
"var_name": "namespaceTable"
}
],
"file": "opc-ua-stack/stac... | {
"body": "@Test\n public void testIsNull() {\n assertTrue(ExpandedNodeId.newBuilder().setIdentifier(uint(0)).build().isNull());\n assertTrue(ExpandedNodeId.newBuilder().setIdentifier((String) null).build().isNull());\n assertTrue(ExpandedNodeId.newBuilder().setIdentifier(\"\").build().isNull(... | {
"fields": [
{
"declarator": "NULL_VALUE = new ExpandedNodeId(\n UShort.MIN,\n null,\n UInteger.MIN,\n UInteger.MIN\n )",
"modifier": "public static final",
"original_string": "public static final ExpandedNodeId NULL_VALUE = new ExpandedNodeId(\n UShort.MIN... | {
"body": "public boolean isNull() {\n if (namespaceIndex.intValue() > 0) {\n return false;\n }\n\n switch (getType()) {\n case Numeric: {\n UInteger id = (UInteger) this.identifier;\n return id.intValue() == 0;\n }\n case ... | {
"created": "5/6/2016 1:20:04 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 58208693,
"size": null,
"stargazer_count": null,
"stars": 405,
"updates": "2020-01-26T11:03:08+00:00",
"url": "https://github.com/eclipse/milo"
} |
58208693_52 | {
"fields": [],
"file": "opc-ua-sdk/sdk-server/src/test/java/org/eclipse/milo/opcua/sdk/server/LifecycleManagerTest.java",
"identifier": "LifecycleManagerTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void testShutdownOrderLinear() {\n LifecycleManager manager = new LifecycleManager();\n\n AtomicInteger i = new AtomicInteger(0);\n manager.addShutdownTask(() -> assertEquals(i.getAndIncrement(), 0));\n manager.addShutdownTask(() -> assertEquals(i.getAndIncreme... | {
"fields": [
{
"declarator": "lifecycles = new CopyOnWriteArrayList<>()",
"modifier": "private final",
"original_string": "private final CopyOnWriteArrayList<Lifecycle> lifecycles = new CopyOnWriteArrayList<>();",
"type": "CopyOnWriteArrayList<Lifecycle>",
"var_name": "lifecycles"
... | {
"body": "public Lifecycle addShutdownTask(Runnable shutdownTask) {\n Lifecycle lifecycle = new Lifecycle() {\n @Override\n public void startup() {}\n\n @Override\n public void shutdown() {\n shutdownTask.run();\n }\n };\n\n a... | {
"created": "5/6/2016 1:20:04 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 58208693,
"size": null,
"stargazer_count": null,
"stars": 405,
"updates": "2020-01-26T11:03:08+00:00",
"url": "https://github.com/eclipse/milo"
} |
58208693_13 | {
"fields": [
{
"declarator": "keyPair",
"modifier": "private final",
"original_string": "private final KeyPair keyPair;",
"type": "KeyPair",
"var_name": "keyPair"
},
{
"declarator": "certificate",
"modifier": "private final",
"original_string": "private fin... | {
"body": "@Test\n public void testGetSubjectAltNameField() {\n Object uri = CertificateUtil\n .getSubjectAltNameField(certificate, CertificateUtil.SUBJECT_ALT_NAME_URI)\n .get(0);\n\n Object dnsName = CertificateUtil\n .getSubjectAltNameField(certificate, Certificate... | {
"fields": [
{
"declarator": "SUBJECT_ALT_NAME_DNS_NAME = GeneralName.dNSName",
"modifier": "public static final",
"original_string": "public static final int SUBJECT_ALT_NAME_DNS_NAME = GeneralName.dNSName;",
"type": "int",
"var_name": "SUBJECT_ALT_NAME_DNS_NAME"
},
{
... | {
"body": "public static List<Object> getSubjectAltNameField(X509Certificate certificate, int field) {\n try {\n List<Object> values = new ArrayList<>();\n\n Collection<List<?>> subjectAltNames = certificate.getSubjectAlternativeNames();\n if (subjectAltNames == null) subjectAl... | {
"created": "5/6/2016 1:20:04 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 58208693,
"size": null,
"stargazer_count": null,
"stars": 405,
"updates": "2020-01-26T11:03:08+00:00",
"url": "https://github.com/eclipse/milo"
} |
58208693_44 | {
"fields": [
{
"declarator": "nodeManager = new UaNodeManager()",
"modifier": "private final",
"original_string": "private final UaNodeManager nodeManager = new UaNodeManager();",
"type": "UaNodeManager",
"var_name": "nodeManager"
},
{
"declarator": "context = new UaNo... | {
"body": "@Test\n public void testAddFirst() {\n AttributeFilterChain chain = new AttributeFilterChain();\n\n chain.addFirst(\n AttributeFilters.getValue(ctx -> new DataValue(new Variant(\"A\"))),\n AttributeFilters.getValue(ctx -> new DataValue(new Variant(\"B\")))\n );... | {
"fields": [
{
"declarator": "filters = new ConcurrentLinkedDeque<>()",
"modifier": "private final",
"original_string": "private final ConcurrentLinkedDeque<AttributeFilter> filters = new ConcurrentLinkedDeque<>();",
"type": "ConcurrentLinkedDeque<AttributeFilter>",
"var_name": "fil... | {
"body": "public AttributeFilterChain addFirst(AttributeFilter attributeFilter) {\n filters.addFirst(attributeFilter);\n\n return this;\n }",
"class_method_signature": "AttributeFilterChain.addFirst(AttributeFilter attributeFilter)",
"constructor": false,
"full_signature": "public AttributeFil... | {
"created": "5/6/2016 1:20:04 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 58208693,
"size": null,
"stargazer_count": null,
"stars": 405,
"updates": "2020-01-26T11:03:08+00:00",
"url": "https://github.com/eclipse/milo"
} |
58208693_33 | {
"fields": [
{
"declarator": "namespaceTable = new NamespaceTable()",
"modifier": "private final",
"original_string": "private final NamespaceTable namespaceTable = new NamespaceTable();",
"type": "NamespaceTable",
"var_name": "namespaceTable"
}
],
"file": "opc-ua-stack/stac... | {
"body": "@Test\n public void toParseableExplicitNamespaceZero() {\n ExpandedNodeId xni = new ExpandedNodeId(ushort(0), null, \"test\");\n\n assertEquals(\"ns=0;s=test\", xni.toParseableString());\n }",
"class_method_signature": "ExpandedNodeIdTest.toParseableExplicitNamespaceZero()",
"constr... | {
"fields": [
{
"declarator": "NULL_VALUE = new ExpandedNodeId(\n UShort.MIN,\n null,\n UInteger.MIN,\n UInteger.MIN\n )",
"modifier": "public static final",
"original_string": "public static final ExpandedNodeId NULL_VALUE = new ExpandedNodeId(\n UShort.MIN... | {
"body": "public String toParseableString() {\n StringBuilder sb = new StringBuilder();\n\n if (serverIndex.intValue() != 0) {\n sb.append(\"svr=\").append(serverIndex).append(\";\");\n }\n\n if (namespaceUri != null) {\n sb.append(\"nsu=\").append(namespaceUri).appe... | {
"created": "5/6/2016 1:20:04 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 58208693,
"size": null,
"stargazer_count": null,
"stars": 405,
"updates": "2020-01-26T11:03:08+00:00",
"url": "https://github.com/eclipse/milo"
} |
58208693_0 | {
"fields": [
{
"declarator": "ALIAS_CA_INTERMEDIATE = \"ca-intermediate\"",
"modifier": "private static final",
"original_string": "private static final String ALIAS_CA_INTERMEDIATE = \"ca-intermediate\";",
"type": "String",
"var_name": "ALIAS_CA_INTERMEDIATE"
},
{
"de... | {
"body": "@Test\n public void testBuildTrustedCertPath_LeafSelfSigned() throws Exception {\n List<X509Certificate> certificateChain = newArrayList(leafSelfSigned);\n\n buildTrustedCertPath(\n certificateChain,\n newHashSet(leafSelfSigned),\n emptySet()\n );\n ... | {
"fields": [
{
"declarator": "LOGGER = LoggerFactory.getLogger(CertificateValidationUtil.class)",
"modifier": "private static final",
"original_string": "private static final Logger LOGGER = LoggerFactory.getLogger(CertificateValidationUtil.class);",
"type": "Logger",
"var_name": "L... | {
"body": "public static PKIXCertPathBuilderResult buildTrustedCertPath(\n List<X509Certificate> certificateChain,\n Collection<X509Certificate> trustedCertificates,\n Collection<X509Certificate> issuerCertificates\n ) throws UaException {\n\n Preconditions.checkArgument(!certificateCha... | {
"created": "5/6/2016 1:20:04 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 58208693,
"size": null,
"stargazer_count": null,
"stars": 405,
"updates": "2020-01-26T11:03:08+00:00",
"url": "https://github.com/eclipse/milo"
} |
58208693_64 | {
"fields": [],
"file": "opc-ua-sdk/sdk-server/src/test/java/org/eclipse/milo/opcua/sdk/server/events/conversions/BooleanConversionsTest.java",
"identifier": "BooleanConversionsTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void testBooleanToByte() {\n assertEquals(booleanToByte(false), ubyte(0));\n assertEquals(booleanToByte(true), ubyte(1));\n }",
"class_method_signature": "BooleanConversionsTest.testBooleanToByte()",
"constructor": false,
"full_signature": "@Test public void testBoo... | {
"fields": [],
"file": "opc-ua-sdk/sdk-server/src/main/java/org/eclipse/milo/opcua/sdk/server/events/conversions/BooleanConversions.java",
"identifier": "BooleanConversions",
"interfaces": "",
"methods": [
{
"class_method_signature": "BooleanConversions.BooleanConversions()",
"constructor": t... | {
"body": "@Nonnull\n static UByte booleanToByte(@Nonnull Boolean b) {\n return ubyte(b ? 1 : 0);\n }",
"class_method_signature": "BooleanConversions.booleanToByte(@Nonnull Boolean b)",
"constructor": false,
"full_signature": "@Nonnull static UByte booleanToByte(@Nonnull Boolean b)",
"identifier"... | {
"created": "5/6/2016 1:20:04 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 58208693,
"size": null,
"stargazer_count": null,
"stars": 405,
"updates": "2020-01-26T11:03:08+00:00",
"url": "https://github.com/eclipse/milo"
} |
58208693_72 | {
"fields": [],
"file": "opc-ua-sdk/sdk-server/src/test/java/org/eclipse/milo/opcua/sdk/server/events/conversions/BooleanConversionsTest.java",
"identifier": "BooleanConversionsTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void testBooleanToUInt16() {\n assertEquals(booleanToUInt16(false), ushort(0));\n assertEquals(booleanToUInt16(true), ushort(1));\n }",
"class_method_signature": "BooleanConversionsTest.testBooleanToUInt16()",
"constructor": false,
"full_signature": "@Test public vo... | {
"fields": [],
"file": "opc-ua-sdk/sdk-server/src/main/java/org/eclipse/milo/opcua/sdk/server/events/conversions/BooleanConversions.java",
"identifier": "BooleanConversions",
"interfaces": "",
"methods": [
{
"class_method_signature": "BooleanConversions.BooleanConversions()",
"constructor": t... | {
"body": "@Nonnull\n static UShort booleanToUInt16(@Nonnull Boolean b) {\n return b ? ushort(1) : ushort(0);\n }",
"class_method_signature": "BooleanConversions.booleanToUInt16(@Nonnull Boolean b)",
"constructor": false,
"full_signature": "@Nonnull static UShort booleanToUInt16(@Nonnull Boolean b)... | {
"created": "5/6/2016 1:20:04 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 58208693,
"size": null,
"stargazer_count": null,
"stars": 405,
"updates": "2020-01-26T11:03:08+00:00",
"url": "https://github.com/eclipse/milo"
} |
58208693_25 | {
"fields": [],
"file": "opc-ua-stack/stack-core/src/test/java/org/eclipse/milo/opcua/stack/core/security/DefaultCertificateManagerTest.java",
"identifier": "DefaultCertificateManagerTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void testNullPrivateKeyOrCertificateFails() {\n expectThrows(\n Exception.class,\n () -> new DefaultCertificateManager((KeyPair) null, (X509Certificate) null)\n );\n\n expectThrows(\n Exception.class,\n () -> new DefaultCert... | {
"fields": [
{
"declarator": "logger = LoggerFactory.getLogger(getClass())",
"modifier": "private final",
"original_string": "private final Logger logger = LoggerFactory.getLogger(getClass());",
"type": "Logger",
"var_name": "logger"
},
{
"declarator": "privateKeys = n... | {
"body": "public synchronized void add(KeyPair keyPair, X509Certificate certificate) {\n add(keyPair, new X509Certificate[]{certificate});\n }",
"class_method_signature": "DefaultCertificateManager.add(KeyPair keyPair, X509Certificate certificate)",
"constructor": false,
"full_signature": "public syn... | {
"created": "5/6/2016 1:20:04 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 58208693,
"size": null,
"stargazer_count": null,
"stars": 405,
"updates": "2020-01-26T11:03:08+00:00",
"url": "https://github.com/eclipse/milo"
} |
58208693_48 | {
"fields": [
{
"declarator": "server",
"modifier": "private",
"original_string": "private OpcUaServer server;",
"type": "OpcUaServer",
"var_name": "server"
},
{
"declarator": "nodeManager",
"modifier": "private",
"original_string": "private UaNodeManager no... | {
"body": "@Test\n public void testCreateAnalogItemType() throws Exception {\n AnalogItemTypeNode analogItem = (AnalogItemTypeNode) nodeFactory.createNode(\n new NodeId(1, \"TestAnalog\"),\n Identifiers.AnalogItemType,\n new NodeFactory.InstantiationCallback() {\n ... | {
"fields": [
{
"declarator": "IDH_CACHE = CacheBuilder.newBuilder()\n .maximumSize(1024)\n .expireAfterAccess(1, TimeUnit.HOURS)\n .build()",
"modifier": "private static final",
"original_string": "private static final Cache<NodeId, InstanceDeclarationHierarchy> IDH_CACHE =... | {
"body": "public UaNode createNode(\n NodeId rootNodeId,\n NodeId typeDefinitionId\n ) throws UaException {\n\n return createNode(rootNodeId, typeDefinitionId, new InstantiationCallback() {});\n }",
"class_method_signature": "NodeFactory.createNode(\n NodeId rootNodeId,\n N... | {
"created": "5/6/2016 1:20:04 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 58208693,
"size": null,
"stargazer_count": null,
"stars": 405,
"updates": "2020-01-26T11:03:08+00:00",
"url": "https://github.com/eclipse/milo"
} |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.