id stringlengths 7 14 | test_class dict | test_case dict | focal_class dict | focal_method dict | repository dict |
|---|---|---|---|---|---|
21871478_178 | {
"fields": [
{
"declarator": "IPV6_ADDRESS = \"FDB3:0001:0002:0000:0004:0005:0006:0007\"",
"modifier": "private static final",
"original_string": "private static final String IPV6_ADDRESS = \"FDB3:0001:0002:0000:0004:0005:0006:0007\";",
"type": "String",
"var_name": "IPV6_ADDRESS"
... | {
"body": "@Test\n\tpublic final void testGetAPIPacketParametersReceivedDataNotNull() {\n\t\t// Set up the resources for the test.\n\t\tCoAPTxRequestPacket packet = new CoAPTxRequestPacket(frameID, options, method, destAddress, uriData, data);\n\n\t\t// Call the method under test.\n\t\tLinkedHashMap<String, String> p... | {
"fields": [
{
"declarator": "MIN_API_PAYLOAD_LENGTH = 26",
"modifier": "private static final",
"original_string": "private static final int MIN_API_PAYLOAD_LENGTH = 26;",
"type": "int",
"var_name": "MIN_API_PAYLOAD_LENGTH"
},
{
"declarator": "ERROR_PAYLOAD_NULL = \"Co... | {
"body": "@Override\n\tpublic LinkedHashMap<String, String> getAPIPacketParameters() {\n\t\tLinkedHashMap<String, String> parameters = new LinkedHashMap<String, String>();\n\t\tparameters.put(\"Frame ID\", HexUtils.prettyHexString(HexUtils.integerToHexString(frameID, 1)) + \" (\" + frameID + \")\");\n\t\tparameters.... | {
"created": null,
"fork": null,
"fork_count": 54,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 21871478,
"size": 3156,
"stargazer_count": 76,
"stars": null,
"updates": null,
"url": "https://github.com/digidotcom/xbee-java"
} |
21871478_482 | {
"fields": [
{
"declarator": "exception = ExpectedException.none()",
"modifier": "@Rule\n\tpublic",
"original_string": "@Rule\n\tpublic ExpectedException exception = ExpectedException.none();",
"type": "ExpectedException",
"var_name": "exception"
}
],
"file": "library/src/te... | {
"body": "@Test\n\tpublic final void testGetChecksum() {\n\t\t// Setup the resources for the test.\n\t\tfinal byte[] dataArray = new byte[]{0x17, 0x01, 0x00, 0x13, (byte)0xA2, 0x00, 0x40, (byte)0xAD, 0x14, 0x2E, (byte)0xFF, (byte)0xFE, 0x02, 0x4E, 0x49};\n\t\tTestXBeePacket packet = new TestXBeePacket() {\n\t\t\tpub... | {
"fields": [
{
"declarator": "HASH_SEED = 23",
"modifier": "private static final",
"original_string": "private static final int HASH_SEED = 23;",
"type": "int",
"var_name": "HASH_SEED"
},
{
"declarator": "checksum",
"modifier": "private",
"original_string":... | {
"body": "public int getChecksum() {\n\t\tchecksum.reset();\n\t\tbyte[] packetData = getPacketData();\n\t\tif (packetData != null)\n\t\t\tchecksum.add(packetData);\n\t\treturn (byte)checksum.generate() & 0xFF;\n\t}",
"class_method_signature": "XBeePacket.getChecksum()",
"constructor": false,
"full_signature": ... | {
"created": null,
"fork": null,
"fork_count": 54,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 21871478,
"size": 3156,
"stargazer_count": 76,
"stars": null,
"updates": null,
"url": "https://github.com/digidotcom/xbee-java"
} |
21871478_197 | {
"fields": [
{
"declarator": "IPV6_ADDR = \"FDB3:0001:0002:0000:0004:0005:0006:0007\"",
"modifier": "private static final",
"original_string": "private static final String IPV6_ADDR = \"FDB3:0001:0002:0000:0004:0005:0006:0007\";",
"type": "String",
"var_name": "IPV6_ADDR"
},
... | {
"body": "@Test\n\tpublic final void testGetGetCommandValueNullValue() {\n\t\tIPv6RemoteATCommandResponsePacket packet = new IPv6RemoteATCommandResponsePacket(frameID, ipv6address, command, \n\t\t\t\tstatus, (byte[])null);\n\t\t\n\t\t// Call the method under test.\n\t\tbyte[] commandValue = packet.getCommandValue();... | {
"fields": [
{
"declarator": "MIN_API_PAYLOAD_LENGTH = 21",
"modifier": "private static final",
"original_string": "private static final int MIN_API_PAYLOAD_LENGTH = 21;",
"type": "int",
"var_name": "MIN_API_PAYLOAD_LENGTH"
},
{
"declarator": "ERROR_PAYLOAD_NULL = \"IP... | {
"body": "public byte[] getCommandValue() {\n\t\treturn commandValue;\n\t}",
"class_method_signature": "IPv6RemoteATCommandResponsePacket.getCommandValue()",
"constructor": false,
"full_signature": "public byte[] getCommandValue()",
"identifier": "getCommandValue",
"invocations": [],
"modifiers": "public... | {
"created": null,
"fork": null,
"fork_count": 54,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 21871478,
"size": 3156,
"stargazer_count": 76,
"stars": null,
"updates": null,
"url": "https://github.com/digidotcom/xbee-java"
} |
21871478_314 | {
"fields": [
{
"declarator": "exception = ExpectedException.none()",
"modifier": "@Rule\n\tpublic",
"original_string": "@Rule\n\tpublic ExpectedException exception = ExpectedException.none();",
"type": "ExpectedException",
"var_name": "exception"
}
],
"file": "library/src/te... | {
"body": "@Test\n\tpublic final void testCreatePacketInvalidFrameType() {\n\t\t// Setup the resources for the test.\n\t\tint frameType = 0x13;\n\t\t\n\t\tbyte[] payload = new byte[1];\n\t\tpayload[0] = (byte)frameType;\n\t\t\n\t\texception.expect(IllegalArgumentException.class);\n\t\texception.expectMessage(is(equal... | {
"fields": [
{
"declarator": "MIN_API_PAYLOAD_LENGTH = 1",
"modifier": "private static final",
"original_string": "private static final int MIN_API_PAYLOAD_LENGTH = 1;",
"type": "int",
"var_name": "MIN_API_PAYLOAD_LENGTH"
},
{
"declarator": "rfData",
"modifier": ... | {
"body": "public static GenericXBeePacket createPacket(byte[] payload) {\n\t\tif (payload == null)\n\t\t\tthrow new NullPointerException(\"Generic packet payload cannot be null.\");\n\t\t\n\t\t// 1 (Frame type)\n\t\tif (payload.length < MIN_API_PAYLOAD_LENGTH)\n\t\t\tthrow new IllegalArgumentException(\"Incomplete G... | {
"created": null,
"fork": null,
"fork_count": 54,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 21871478,
"size": 3156,
"stargazer_count": 76,
"stars": null,
"updates": null,
"url": "https://github.com/digidotcom/xbee-java"
} |
21871478_744 | {
"fields": [
{
"declarator": "exception = ExpectedException.none()",
"modifier": "@Rule\n\tpublic",
"original_string": "@Rule\n\tpublic ExpectedException exception = ExpectedException.none();",
"type": "ExpectedException",
"var_name": "exception"
}
],
"file": "library/src/te... | {
"body": "@Test\n\tpublic final void testByteToHexString() {\n\t\t// Setup the resources for the test.\n\t\tbyte b = (byte)0xE8;\n\t\tString expectedResult = \"E8\";\n\t\t\n\t\t// Call the method under test.\n\t\tString result = HexUtils.byteToHexString(b);\n\t\t\n\t\t// Verify the result.\n\t\tassertThat(\"Returned... | {
"fields": [
{
"declarator": "HEXES = \"0123456789ABCDEF\"",
"modifier": "private static final",
"original_string": "private static final String HEXES = \"0123456789ABCDEF\";",
"type": "String",
"var_name": "HEXES"
},
{
"declarator": "HEX_HEADER = \"0x\"",
"modif... | {
"body": "public static String byteToHexString(byte value) {\n\t\tfinal StringBuilder hex = new StringBuilder(2);\n\t\tbyte b = value;\n\t\thex.append(HEXES.charAt((b & 0xF0) >> 4))\n\t\t\t.append(HEXES.charAt((b & 0x0F)));\n\t\treturn hex.toString();\n\t}",
"class_method_signature": "HexUtils.byteToHexString(byte... | {
"created": null,
"fork": null,
"fork_count": 54,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 21871478,
"size": 3156,
"stargazer_count": 76,
"stars": null,
"updates": null,
"url": "https://github.com/digidotcom/xbee-java"
} |
21871478_251 | {
"fields": [
{
"declarator": "IPV6_SRC_ADDRESS = \"FDB3:0001:0002:0000:0004:0005:0006:0007\"",
"modifier": "private static final",
"original_string": "private static final String IPV6_SRC_ADDRESS = \"FDB3:0001:0002:0000:0004:0005:0006:0007\";",
"type": "String",
"var_name": "IPV6_SR... | {
"body": "@Test\n\tpublic final void testSetDestPortBigger() {\n\t\t// Set up the resources for the test.\n\t\tCoAPRxResponsePacket packet = new CoAPRxResponsePacket(frameID, destAddress, sourceAddress, destPort, sourcePort, protocol, restFulStatus, data);\n\n\t\texception.expect(IllegalArgumentException.class);\n\t... | {
"fields": [
{
"declarator": "MIN_API_PAYLOAD_LENGTH = 41",
"modifier": "private static final",
"original_string": "private static final int MIN_API_PAYLOAD_LENGTH = 41;",
"type": "int",
"var_name": "MIN_API_PAYLOAD_LENGTH"
},
{
"declarator": "ERROR_PAYLOAD_NULL = \"Co... | {
"body": "public void setDestPort(int destPort) {\n\t\tif (destPort < 0 || destPort > 65535)\n\t\t\tthrow new IllegalArgumentException(ERROR_DEST_PORT_ILLEGAL);\n\n\t\tthis.destPort = destPort;\n\t}",
"class_method_signature": "CoAPRxResponsePacket.setDestPort(int destPort)",
"constructor": false,
"full_signat... | {
"created": null,
"fork": null,
"fork_count": 54,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 21871478,
"size": 3156,
"stargazer_count": 76,
"stars": null,
"updates": null,
"url": "https://github.com/digidotcom/xbee-java"
} |
21871478_601 | {
"fields": [],
"file": "library/src/test/java/com/digi/xbee/api/exceptions/TransmitExceptionTest.java",
"identifier": "TransmitExceptionTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n\tpublic final void testGetTransmitStatusNull() {\n\t\t// Setup the resources for the test.\n\t\tXBeeTransmitStatus transmitStatus = null;\n\t\tTransmitException e = new TransmitException(transmitStatus);\n\t\t\n\t\t// Call the method under test.\n\t\tXBeeTransmitStatus result = e.getTransmitStatus(... | {
"fields": [
{
"declarator": "serialVersionUID = 1L",
"modifier": "private static final",
"original_string": "private static final long serialVersionUID = 1L;",
"type": "long",
"var_name": "serialVersionUID"
},
{
"declarator": "DEFAULT_MESSAGE = \"There was a problem t... | {
"body": "public XBeeTransmitStatus getTransmitStatus() {\n\t\treturn transmitStatus;\n\t}",
"class_method_signature": "TransmitException.getTransmitStatus()",
"constructor": false,
"full_signature": "public XBeeTransmitStatus getTransmitStatus()",
"identifier": "getTransmitStatus",
"invocations": [],
"m... | {
"created": null,
"fork": null,
"fork_count": 54,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 21871478,
"size": 3156,
"stargazer_count": 76,
"stars": null,
"updates": null,
"url": "https://github.com/digidotcom/xbee-java"
} |
21871478_590 | {
"fields": [
{
"declarator": "PARAMETER_MY = \"MY\"",
"modifier": "private static final",
"original_string": "private static final String PARAMETER_MY = \"MY\";",
"type": "String",
"var_name": "PARAMETER_MY"
},
{
"declarator": "PARAMETER_C0 = \"C0\"",
"modifier":... | {
"body": "@SuppressWarnings(\"deprecation\")\n\t@Test\n\tpublic void testNotSupportedOperationSetDestinationAddress() throws Exception {\n\t\texception.expect(UnsupportedOperationException.class);\n\t\texception.expectMessage(is(equalTo(\"Operation not supported in this module.\")));\n\t\t\n\t\t// Call the method th... | {
"fields": [
{
"declarator": "OPERATION_EXCEPTION = \"Operation not supported in this module.\"",
"modifier": "private static final",
"original_string": "private static final String OPERATION_EXCEPTION = \"Operation not supported in this module.\";",
"type": "String",
"var_name": "O... | {
"body": "@Override\n\tpublic void setDestinationAddress(XBee64BitAddress xbee64BitAddress)\n\t\t\tthrows TimeoutException, XBeeException {\n\t\t// Not supported in IPv6 modules.\n\t\tthrow new UnsupportedOperationException(OPERATION_EXCEPTION);\n\t}",
"class_method_signature": "IPv6Device.setDestinationAddress(XB... | {
"created": null,
"fork": null,
"fork_count": 54,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 21871478,
"size": 3156,
"stargazer_count": 76,
"stars": null,
"updates": null,
"url": "https://github.com/digidotcom/xbee-java"
} |
21871478_713 | {
"fields": [
{
"declarator": "exception = ExpectedException.none()",
"modifier": "@Rule\n\tpublic",
"original_string": "@Rule\n\tpublic ExpectedException exception = ExpectedException.none();",
"type": "ExpectedException",
"var_name": "exception"
}
],
"file": "library/src/te... | {
"body": "@Test\n\tpublic final void testByteToInt() {\n\t\t// Setup the resources for the test.\n\t\tbyte b = (byte)0xF8;\n\t\tint expectedResult = 0xF8;\n\t\t\n\t\t// Call the method under test.\n\t\tint result = ByteUtils.byteToInt(b);\n\t\t\n\t\t// Verify the result.\n\t\tassertThat(\"Returned int must be equal ... | {
"fields": [],
"file": "library/src/main/java/com/digi/xbee/api/utils/ByteUtils.java",
"identifier": "ByteUtils",
"interfaces": "",
"methods": [
{
"class_method_signature": "ByteUtils.readBytes(int numBytes, ByteArrayInputStream inputStream)",
"constructor": false,
"full_signature": "pu... | {
"body": "public static int byteToInt(byte b) {\n\t\treturn (int) b & 0xFF;\n\t}",
"class_method_signature": "ByteUtils.byteToInt(byte b)",
"constructor": false,
"full_signature": "public static int byteToInt(byte b)",
"identifier": "byteToInt",
"invocations": [],
"modifiers": "public static",
"paramet... | {
"created": null,
"fork": null,
"fork_count": 54,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 21871478,
"size": 3156,
"stargazer_count": 76,
"stars": null,
"updates": null,
"url": "https://github.com/digidotcom/xbee-java"
} |
21871478_343 | {
"fields": [
{
"declarator": "IP_ADDRESS = \"10.10.11.12\"",
"modifier": "private static final",
"original_string": "private static final String IP_ADDRESS = \"10.10.11.12\";",
"type": "String",
"var_name": "IP_ADDRESS"
},
{
"declarator": "frameType = APIFrameType.RX_I... | {
"body": "@Test\n\tpublic final void testSetSourcePortBigger() {\n\t\t// Set up the resources for the test.\n\t\tRXIPv4Packet packet = new RXIPv4Packet(sourceAddress, destPort, sourcePort, protocol, data);\n\n\t\texception.expect(IllegalArgumentException.class);\n\t\texception.expectMessage(is(equalTo(\"Port must be... | {
"fields": [
{
"declarator": "MIN_API_PAYLOAD_LENGTH = 11",
"modifier": "private static final",
"original_string": "private static final int MIN_API_PAYLOAD_LENGTH = 11;",
"type": "int",
"var_name": "MIN_API_PAYLOAD_LENGTH"
},
{
"declarator": "ERROR_PAYLOAD_NULL = \"RX... | {
"body": "public void setSourcePort(int sourcePort) {\n\t\tif (sourcePort < 0 || sourcePort > 65535)\n\t\t\tthrow new IllegalArgumentException(ERROR_PORT_ILLEGAL);\n\n\t\tthis.sourcePort = sourcePort;\n\t}",
"class_method_signature": "RXIPv4Packet.setSourcePort(int sourcePort)",
"constructor": false,
"full_sig... | {
"created": null,
"fork": null,
"fork_count": 54,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 21871478,
"size": 3156,
"stargazer_count": 76,
"stars": null,
"updates": null,
"url": "https://github.com/digidotcom/xbee-java"
} |
21871478_19 | {
"fields": [
{
"declarator": "exception = ExpectedException.none()",
"modifier": "@Rule\n\tpublic",
"original_string": "@Rule\n\tpublic ExpectedException exception = ExpectedException.none();",
"type": "ExpectedException",
"var_name": "exception"
}
],
"file": "library/src/te... | {
"body": "@Test\n\tpublic final void testGetPacketParametersNoSetFrameIDWithoutData() {\n\t\t// Setup the resources for the test.\n\t\tAPIFrameType frameType = APIFrameType.GENERIC;\n\t\tTestXBeeAPIPacket packet = new TestXBeeAPIPacket(APIFrameType.GENERIC) {\n\t\t\t@Override\n\t\t\tpublic boolean needsAPIFrameID() ... | {
"fields": [
{
"declarator": "NO_FRAME_ID = 9999",
"modifier": "public final static",
"original_string": "public final static int NO_FRAME_ID = 9999;",
"type": "int",
"var_name": "NO_FRAME_ID"
},
{
"declarator": "frameID = NO_FRAME_ID",
"modifier": "protected",
... | {
"body": "@Override\n\tprotected LinkedHashMap<String, String> getPacketParameters() {\n\t\tLinkedHashMap<String, String> parameters = new LinkedHashMap<String, String>();\n\t\tif (getFrameType() != null)\n\t\t\tparameters.put(\"Frame type\", HexUtils.prettyHexString(HexUtils.integerToHexString(frameTypeValue, 1)) +... | {
"created": null,
"fork": null,
"fork_count": 54,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 21871478,
"size": 3156,
"stargazer_count": 76,
"stars": null,
"updates": null,
"url": "https://github.com/digidotcom/xbee-java"
} |
21871478_656 | {
"fields": [
{
"declarator": "PARAMETER_MY = \"MY\"",
"modifier": "private static final",
"original_string": "private static final String PARAMETER_MY = \"MY\";",
"type": "String",
"var_name": "PARAMETER_MY"
},
{
"declarator": "PARAMETER_C0 = \"C0\"",
"modifier":... | {
"body": "@Test(expected=IllegalArgumentException.class)\n\tpublic void testStartListeningInvalidPortNegative() throws TimeoutException, XBeeException {\n\t\tipDevice.startListening(-10);\n\t}",
"class_method_signature": "IPDeviceTest.testStartListeningInvalidPortNegative()",
"constructor": false,
"full_signat... | {
"fields": [
{
"declarator": "BROADCAST_IP = \"255.255.255.255\"",
"modifier": "public static final",
"original_string": "public static final String BROADCAST_IP = \"255.255.255.255\";",
"type": "String",
"var_name": "BROADCAST_IP"
},
{
"declarator": "OPERATION_EXCEPTI... | {
"body": "public void startListening(int sourcePort) throws TimeoutException, XBeeException {\n\t\tif (sourcePort < 0 || sourcePort > 65535)\n\t\t\tthrow new IllegalArgumentException(\"Source port must be between 0 and 65535.\");\n\t\t\n\t\tsetParameter(\"C0\", ByteUtils.shortToByteArray((short)sourcePort));\n\t\tth... | {
"created": null,
"fork": null,
"fork_count": 54,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 21871478,
"size": 3156,
"stargazer_count": 76,
"stars": null,
"updates": null,
"url": "https://github.com/digidotcom/xbee-java"
} |
21871478_206 | {
"fields": [
{
"declarator": "IPV6_ADDR = \"FDB3:0001:0002:0000:0004:0005:0006:0007\"",
"modifier": "private static final",
"original_string": "private static final String IPV6_ADDR = \"FDB3:0001:0002:0000:0004:0005:0006:0007\";",
"type": "String",
"var_name": "IPV6_ADDR"
},
... | {
"body": "@Test\n\tpublic final void testGetParameterAsString() {\n\t\tIPv6RemoteATCommandRequestPacket packet = new IPv6RemoteATCommandRequestPacket(frameID, ipv6address, transmitOptions, command, parameterStr);\n\t\t\n\t\t// Call the method under test.\n\t\tString value = packet.getParameterAsString();\n\t\t\n\t\t... | {
"fields": [
{
"declarator": "MIN_API_PAYLOAD_LENGTH = 21",
"modifier": "private static final",
"original_string": "private static final int MIN_API_PAYLOAD_LENGTH = 21;",
"type": "int",
"var_name": "MIN_API_PAYLOAD_LENGTH"
},
{
"declarator": "ERROR_PAYLOAD_NULL = \"IP... | {
"body": "public String getParameterAsString() {\n\t\tif (parameter == null)\n\t\t\treturn null;\n\t\treturn new String(parameter);\n\t}",
"class_method_signature": "IPv6RemoteATCommandRequestPacket.getParameterAsString()",
"constructor": false,
"full_signature": "public String getParameterAsString()",
"iden... | {
"created": null,
"fork": null,
"fork_count": 54,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 21871478,
"size": 3156,
"stargazer_count": 76,
"stars": null,
"updates": null,
"url": "https://github.com/digidotcom/xbee-java"
} |
21871478_441 | {
"fields": [
{
"declarator": "exception = ExpectedException.none()",
"modifier": "@Rule\n\tpublic",
"original_string": "@Rule\n\tpublic ExpectedException exception = ExpectedException.none();",
"type": "ExpectedException",
"var_name": "exception"
}
],
"file": "library/src/te... | {
"body": "@Test\n\tpublic final void testCreatePacketEmptyPayload() {\n\t\t// Setup the resources for the test.\n\t\tbyte[] payload = new byte[0];\n\t\texception.expect(IllegalArgumentException.class);\n\t\texception.expectMessage(is(equalTo(\"Incomplete RX64 Address IO packet.\")));\n\t\t\n\t\t// Call the method un... | {
"fields": [
{
"declarator": "MIN_API_PAYLOAD_LENGTH = 11",
"modifier": "private static final",
"original_string": "private static final int MIN_API_PAYLOAD_LENGTH = 11;",
"type": "int",
"var_name": "MIN_API_PAYLOAD_LENGTH"
},
{
"declarator": "sourceAddress64",
"... | {
"body": "public static RX64IOPacket createPacket(byte[] payload) {\n\t\tif (payload == null)\n\t\t\tthrow new NullPointerException(\"RX64 Address IO packet payload cannot be null.\");\n\t\t\n\t\t// 1 (Frame type) + 8 (64-bit address) + 1 (RSSI) + 1 (receive options)\n\t\tif (payload.length < MIN_API_PAYLOAD_LENGTH)... | {
"created": null,
"fork": null,
"fork_count": 54,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 21871478,
"size": 3156,
"stargazer_count": 76,
"stars": null,
"updates": null,
"url": "https://github.com/digidotcom/xbee-java"
} |
21871478_154 | {
"fields": [
{
"declarator": "exception = ExpectedException.none()",
"modifier": "@Rule\n\tpublic",
"original_string": "@Rule\n\tpublic ExpectedException exception = ExpectedException.none();",
"type": "ExpectedException",
"var_name": "exception"
}
],
"file": "library/src/te... | {
"body": "@Test\n\tpublic final void testGetAPIPacketParametersATCommandParameterNotNull() {\n\t\t// Setup the resources for the test.\n\t\tint frameID = 0x10;\n\t\tString command = \"NI\";\n\t\tATCommandStatus status = ATCommandStatus.UNKNOWN;\n\t\tbyte[] parameter = new byte[]{0x6D, 0x79, 0x44, 0x65, 0x76, 0x69, 0... | {
"fields": [
{
"declarator": "MIN_API_PAYLOAD_LENGTH = 5",
"modifier": "private static final",
"original_string": "private static final int MIN_API_PAYLOAD_LENGTH = 5;",
"type": "int",
"var_name": "MIN_API_PAYLOAD_LENGTH"
},
{
"declarator": "status",
"modifier": ... | {
"body": "@Override\n\tpublic LinkedHashMap<String, String> getAPIPacketParameters() {\n\t\tLinkedHashMap<String, String> parameters = new LinkedHashMap<String, String>();\n\t\tparameters.put(\"AT Command\", HexUtils.prettyHexString(HexUtils.byteArrayToHexString(command.getBytes())) + \" (\" + command + \")\");\n\t\... | {
"created": null,
"fork": null,
"fork_count": 54,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 21871478,
"size": 3156,
"stargazer_count": 76,
"stars": null,
"updates": null,
"url": "https://github.com/digidotcom/xbee-java"
} |
21871478_504 | {
"fields": [
{
"declarator": "exception = ExpectedException.none()",
"modifier": "@Rule\n\tpublic",
"original_string": "@Rule\n\tpublic ExpectedException exception = ExpectedException.none();",
"type": "ExpectedException",
"var_name": "exception"
}
],
"file": "library/src/te... | {
"body": "@Test\n\tpublic final void testEqualsWithNull() {\n\t\t// Setup the resources for the test.\n\t\tfinal byte[] dataArray = new byte[]{0x17, 0x01, 0x00, 0x13, (byte)0xA2, 0x00, 0x40, (byte)0xAD, 0x14, 0x2E, (byte)0xFF, (byte)0xFE, 0x02, 0x4E, 0x49};\n\t\tTestXBeePacket packet = new TestXBeePacket() {\n\t\t\t... | {
"fields": [
{
"declarator": "HASH_SEED = 23",
"modifier": "private static final",
"original_string": "private static final int HASH_SEED = 23;",
"type": "int",
"var_name": "HASH_SEED"
},
{
"declarator": "checksum",
"modifier": "private",
"original_string":... | {
"body": "@Override\n\tpublic boolean equals(Object obj) {\n\t\tif (!(obj instanceof XBeePacket))\n\t\t\treturn false;\n\t\tXBeePacket packet = (XBeePacket)obj;\n\t\t\n\t\treturn Arrays.equals(packet.generateByteArray(), generateByteArray());\n\t}",
"class_method_signature": "XBeePacket.equals(Object obj)",
"con... | {
"created": null,
"fork": null,
"fork_count": 54,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 21871478,
"size": 3156,
"stargazer_count": 76,
"stars": null,
"updates": null,
"url": "https://github.com/digidotcom/xbee-java"
} |
21871478_62 | {
"fields": [
{
"declarator": "exception = ExpectedException.none()",
"modifier": "@Rule\n\tpublic",
"original_string": "@Rule\n\tpublic ExpectedException exception = ExpectedException.none();",
"type": "ExpectedException",
"var_name": "exception"
}
],
"file": "library/src/te... | {
"body": "@Test\n\tpublic final void testCreatePacketPayloadNotIncludingFrameType() {\n\t\t// Setup the resources for the test.\n\t\tXBee64BitAddress source64Addr = new XBee64BitAddress(\"0013A2004032D9AB\");\n\t\tXBee16BitAddress source16Addr = new XBee16BitAddress(\"B45C\");\n\t\tint sourceEndpoint = 0xA0;\n\t\tin... | {
"fields": [
{
"declarator": "MIN_API_PAYLOAD_LENGTH = 18",
"modifier": "private static final",
"original_string": "private static final int MIN_API_PAYLOAD_LENGTH = 18;",
"type": "int",
"var_name": "MIN_API_PAYLOAD_LENGTH"
},
{
"declarator": "DATA_ENDPOINT = 0xE8",
... | {
"body": "public static ExplicitRxIndicatorPacket createPacket(byte[] payload) {\n\t\tif (payload == null)\n\t\t\tthrow new NullPointerException(\"Explicit Rx Indicator packet payload cannot be null.\");\n\t\t\n\t\t// 1 (Frame type) + 8 (64-bit address) + 2 (16-bit address) + 1 (source endpoint) + 1 (destination end... | {
"created": null,
"fork": null,
"fork_count": 54,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 21871478,
"size": 3156,
"stargazer_count": 76,
"stars": null,
"updates": null,
"url": "https://github.com/digidotcom/xbee-java"
} |
21871478_787 | {
"fields": [
{
"declarator": "MAX_LENGTH = XBeePacketsQueue.DEFAULT_MAX_LENGTH",
"modifier": "private final static",
"original_string": "private final static int MAX_LENGTH = XBeePacketsQueue.DEFAULT_MAX_LENGTH;",
"type": "int",
"var_name": "MAX_LENGTH"
},
{
"declarato... | {
"body": "@Test\n\tpublic void testGetFirstDataPacketFrom() {\n\t\t// Create a mocked remote XBee device.\n\t\tRemoteXBeeDevice mockedRemoteDevice = Mockito.mock(RemoteXBeeDevice.class);\n\t\tMockito.when(mockedRemoteDevice.get64BitAddress()).thenReturn(xbee64BitAddress1);\n\t\t// Create an XBeePacketsQueue of 5 slo... | {
"fields": [
{
"declarator": "DEFAULT_MAX_LENGTH = 50",
"modifier": "public static final",
"original_string": "public static final int DEFAULT_MAX_LENGTH = 50;",
"type": "int",
"var_name": "DEFAULT_MAX_LENGTH"
},
{
"declarator": "maxLength = DEFAULT_MAX_LENGTH",
... | {
"body": "public XBeePacket getFirstDataPacketFrom(RemoteXBeeDevice remoteXBeeDevice, int timeout) {\n\t\tif (timeout > 0) {\n\t\t\tXBeePacket xbeePacket = getFirstDataPacketFrom(remoteXBeeDevice, 0);\n\t\t\t// Wait for a timeout or until an XBee packet from remoteXBeeDevice is read.\n\t\t\tLong deadLine = System.cu... | {
"created": null,
"fork": null,
"fork_count": 54,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 21871478,
"size": 3156,
"stargazer_count": 76,
"stars": null,
"updates": null,
"url": "https://github.com/digidotcom/xbee-java"
} |
21871478_768 | {
"fields": [
{
"declarator": "exception = ExpectedException.none()",
"modifier": "@Rule\n\tpublic",
"original_string": "@Rule\n\tpublic ExpectedException exception = ExpectedException.none();",
"type": "ExpectedException",
"var_name": "exception"
},
{
"declarator": "lp... | {
"body": "@SuppressWarnings(\"deprecation\")\n\t@Test\n\tpublic void testNotSupportedOperationSendSMS() throws Exception {\n\t\texception.expect(UnsupportedOperationException.class);\n\t\texception.expectMessage(is(equalTo(\"Operation not supported in this module.\")));\n\t\t\n\t\t// Call the method that should thro... | {
"fields": [
{
"declarator": "OPERATION_EXCEPTION = \"Operation not supported in this module.\"",
"modifier": "private static final",
"original_string": "private static final String OPERATION_EXCEPTION = \"Operation not supported in this module.\";",
"type": "String",
"var_name": "O... | {
"body": "@Override\n\tpublic void sendSMS(String phoneNumber, String data)\n\t\t\tthrows TimeoutException, XBeeException {\n\t\t// Not supported in Cellular.\n\t\tthrow new UnsupportedOperationException(OPERATION_EXCEPTION);\n\t}",
"class_method_signature": "LPWANDevice.sendSMS(String phoneNumber, String data)",
... | {
"created": null,
"fork": null,
"fork_count": 54,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 21871478,
"size": 3156,
"stargazer_count": 76,
"stars": null,
"updates": null,
"url": "https://github.com/digidotcom/xbee-java"
} |
21871478_292 | {
"fields": [
{
"declarator": "frameType = APIFrameType.DEVICE_REQUEST.getValue()",
"modifier": "private",
"original_string": "private int frameType = APIFrameType.DEVICE_REQUEST.getValue();",
"type": "int",
"var_name": "frameType"
},
{
"declarator": "requestID = 0x01",... | {
"body": "@Test\n\tpublic final void testCreatePacketPayloadShorterThanNeeded() {\n\t\t// Set up the resources for the test.\n\t\tbyte[] payload = new byte[4];\n\t\tpayload[0] = (byte)frameType;\n\t\tpayload[1] = (byte)requestID;\n\t\tpayload[2] = (byte)transport;\n\t\tpayload[3] = (byte)flags;\n\n\t\texception.expe... | {
"fields": [
{
"declarator": "MIN_API_PAYLOAD_LENGTH = 5",
"modifier": "private static final",
"original_string": "private static final int MIN_API_PAYLOAD_LENGTH = 5;",
"type": "int",
"var_name": "MIN_API_PAYLOAD_LENGTH"
},
{
"declarator": "ERROR_PAYLOAD_NULL = \"Devi... | {
"body": "public static DeviceRequestPacket createPacket(byte[] payload) {\n\t\tif (payload == null)\n\t\t\tthrow new NullPointerException(ERROR_PAYLOAD_NULL);\n\n\t\tif (payload.length < MIN_API_PAYLOAD_LENGTH)\n\t\t\tthrow new IllegalArgumentException(ERROR_INCOMPLETE_PACKET);\n\n\t\tif ((payload[0] & 0xFF) != API... | {
"created": null,
"fork": null,
"fork_count": 54,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 21871478,
"size": 3156,
"stargazer_count": 76,
"stars": null,
"updates": null,
"url": "https://github.com/digidotcom/xbee-java"
} |
21871478_338 | {
"fields": [
{
"declarator": "IP_ADDRESS = \"10.10.11.12\"",
"modifier": "private static final",
"original_string": "private static final String IP_ADDRESS = \"10.10.11.12\";",
"type": "String",
"var_name": "IP_ADDRESS"
},
{
"declarator": "frameType = APIFrameType.RX_I... | {
"body": "@Test\n\tpublic final void testCreatePacketPayloadInvalidIP() throws Exception {\n\t\t// Set up the resources for the test.\n\t\tbyte[] payload = new byte[11];\n\t\tpayload[0] = (byte)frameType;\n\t\tSystem.arraycopy(sourceAddress.getAddress(), 0, payload, 1, sourceAddress.getAddress().length);\n\t\tpayloa... | {
"fields": [
{
"declarator": "MIN_API_PAYLOAD_LENGTH = 11",
"modifier": "private static final",
"original_string": "private static final int MIN_API_PAYLOAD_LENGTH = 11;",
"type": "int",
"var_name": "MIN_API_PAYLOAD_LENGTH"
},
{
"declarator": "ERROR_PAYLOAD_NULL = \"RX... | {
"body": "public static RXIPv4Packet createPacket(byte[] payload) {\n\t\tif (payload == null)\n\t\t\tthrow new NullPointerException(ERROR_PAYLOAD_NULL);\n\n\t\tif (payload.length < MIN_API_PAYLOAD_LENGTH)\n\t\t\tthrow new IllegalArgumentException(ERROR_INCOMPLETE_PACKET);\n\n\t\tif ((payload[0] & 0xFF) != APIFrameTy... | {
"created": null,
"fork": null,
"fork_count": 54,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 21871478,
"size": 3156,
"stargazer_count": 76,
"stars": null,
"updates": null,
"url": "https://github.com/digidotcom/xbee-java"
} |
21871478_416 | {
"fields": [
{
"declarator": "exception = ExpectedException.none()",
"modifier": "@Rule\n\tpublic",
"original_string": "@Rule\n\tpublic ExpectedException exception = ExpectedException.none();",
"type": "ExpectedException",
"var_name": "exception"
}
],
"file": "library/src/te... | {
"body": "@Test\n\tpublic final void testIsBroadcastWithBroadcastOptionBit2Enabled() {\n\t\t// Setup the resources for the test.\n\t\tXBee16BitAddress source16Addr = new XBee16BitAddress(\"D817\");\n\t\tint rssi = 75;\n\t\tint options = 0x84; /* bit 2 */\n\t\tbyte[] receivedData = new byte[]{(byte)0xFF, (byte)0xFF, ... | {
"fields": [
{
"declarator": "MIN_API_PAYLOAD_LENGTH = 5",
"modifier": "private static final",
"original_string": "private static final int MIN_API_PAYLOAD_LENGTH = 5;",
"type": "int",
"var_name": "MIN_API_PAYLOAD_LENGTH"
},
{
"declarator": "sourceAddress16",
"mo... | {
"body": "@Override\n\tpublic boolean isBroadcast() {\n\t\treturn ByteUtils.isBitEnabled(getReceiveOptions(), 1)\n\t\t\t\t|| ByteUtils.isBitEnabled(getReceiveOptions(), 2);\n\t}",
"class_method_signature": "RX16IOPacket.isBroadcast()",
"constructor": false,
"full_signature": "@Override public boolean isBroadca... | {
"created": null,
"fork": null,
"fork_count": 54,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 21871478,
"size": 3156,
"stargazer_count": 76,
"stars": null,
"updates": null,
"url": "https://github.com/digidotcom/xbee-java"
} |
21871478_553 | {
"fields": [
{
"declarator": "RECEIVED_BUFFER = \"Hello, this is the received data\".getBytes()",
"modifier": "private static final",
"original_string": "private static final byte[] RECEIVED_BUFFER = \"Hello, this is the received data\".getBytes();",
"type": "byte[]",
"var_name": "R... | {
"body": "@Test\n\tpublic final void testReadDataCompleteOffsetBiggerThanDataSize() throws IOException {\n\t\t// Setup the resources for the test.\n\t\tTestAbstractSerialPort port = Mockito.spy(new TestAbstractSerialPort(\"COM1\", 9600));\n\t\tbyte[] data = new byte[] {'h', 'e', 'l', 'l', 'o'};\n\t\tint offset = dat... | {
"fields": [
{
"declarator": "DEFAULT_PORT_TIMEOUT = 10",
"modifier": "public static final",
"original_string": "public static final int DEFAULT_PORT_TIMEOUT = 10;",
"type": "int",
"var_name": "DEFAULT_PORT_TIMEOUT"
},
{
"declarator": "DEFAULT_DATA_BITS = 8",
"mo... | {
"body": "@Override\n\tpublic int readData(byte[] data) throws IOException {\n\t\tif (data == null)\n\t\t\tthrow new NullPointerException(\"Buffer cannot be null.\");\n\t\t\n\t\tint readBytes = 0;\n\t\tif (getInputStream() != null)\n\t\t\treadBytes = getInputStream().read(data);\n\t\treturn readBytes;\n\t}",
"clas... | {
"created": null,
"fork": null,
"fork_count": 54,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 21871478,
"size": 3156,
"stargazer_count": 76,
"stars": null,
"updates": null,
"url": "https://github.com/digidotcom/xbee-java"
} |
21871478_103 | {
"fields": [
{
"declarator": "exception = ExpectedException.none()",
"modifier": "@Rule\n\tpublic",
"original_string": "@Rule\n\tpublic ExpectedException exception = ExpectedException.none();",
"type": "ExpectedException",
"var_name": "exception"
}
],
"file": "library/src/te... | {
"body": "@Test\n\tpublic final void testIsBroadcastWithBroadcastOptionEnabled() {\n\t\t// Setup the resources for the test.\n\t\tXBee64BitAddress source64Addr = new XBee64BitAddress(\"0013A2004032D9AB\");\n\t\tXBee16BitAddress source16Addr = new XBee16BitAddress(\"D817\");\n\t\tint options = 0x8A; /* bit 1 */\n\t\t... | {
"fields": [
{
"declarator": "MIN_API_PAYLOAD_LENGTH = 12",
"modifier": "private static final",
"original_string": "private static final int MIN_API_PAYLOAD_LENGTH = 12;",
"type": "int",
"var_name": "MIN_API_PAYLOAD_LENGTH"
},
{
"declarator": "sourceAddress64",
"... | {
"body": "@Override\n\tpublic boolean isBroadcast() {\n\t\treturn ByteUtils.isBitEnabled(getReceiveOptions(), 1);\n\t}",
"class_method_signature": "ReceivePacket.isBroadcast()",
"constructor": false,
"full_signature": "@Override public boolean isBroadcast()",
"identifier": "isBroadcast",
"invocations": [
... | {
"created": null,
"fork": null,
"fork_count": 54,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 21871478,
"size": 3156,
"stargazer_count": 76,
"stars": null,
"updates": null,
"url": "https://github.com/digidotcom/xbee-java"
} |
21871478_800 | {
"fields": [
{
"declarator": "INVALID_BYTE_ARRAY = new byte[]{0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, 0x09}",
"modifier": "private final static",
"original_string": "private final static byte[] INVALID_BYTE_ARRAY = new byte[]{0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, 0... | {
"body": "@Test\n\tpublic final void testEqualsIsSymetric() {\n\t\t// Setup the resources for the test.\n\t\tXBee64BitAddress addr1 = new XBee64BitAddress(\"0x0013A20040123456\");\n\t\tXBee64BitAddress addr2 = new XBee64BitAddress(\"0x0013A20040123456\");\n\t\t\n\t\t// Call the method under test.\n\t\tboolean areEqu... | {
"fields": [
{
"declarator": "COORDINATOR_ADDRESS = new XBee64BitAddress(\"0000\")",
"modifier": "public static final",
"original_string": "public static final XBee64BitAddress COORDINATOR_ADDRESS = new XBee64BitAddress(\"0000\");",
"type": "XBee64BitAddress",
"var_name": "COORDINAT... | {
"body": "@Override\n\tpublic boolean equals(Object obj) {\n\t\tif (!(obj instanceof XBee64BitAddress))\n\t\t\treturn false;\n\t\tXBee64BitAddress addr = (XBee64BitAddress)obj;\n\t\treturn Arrays.equals(addr.getValue(), getValue());\n\t}",
"class_method_signature": "XBee64BitAddress.equals(Object obj)",
"constru... | {
"created": null,
"fork": null,
"fork_count": 54,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 21871478,
"size": 3156,
"stargazer_count": 76,
"stars": null,
"updates": null,
"url": "https://github.com/digidotcom/xbee-java"
} |
21871478_380 | {
"fields": [
{
"declarator": "IP_ADDRESS = \"10.10.11.12\"",
"modifier": "private static final",
"original_string": "private static final String IP_ADDRESS = \"10.10.11.12\";",
"type": "String",
"var_name": "IP_ADDRESS"
},
{
"declarator": "frameType = APIFrameType.REMO... | {
"body": "@Test\n\tpublic final void testCreatePacketEmptyPayload() {\n\t\t// Setup the resources for the test.\n\t\tbyte[] payload = new byte[0];\n\t\texception.expect(IllegalArgumentException.class);\n\t\texception.expectMessage(is(equalTo(\"Incomplete Remote AT Command Request (Wi-Fi) packet.\")));\n\n\t\t// Call... | {
"fields": [
{
"declarator": "MIN_API_PAYLOAD_LENGTH = 13",
"modifier": "private static final",
"original_string": "private static final int MIN_API_PAYLOAD_LENGTH = 13;",
"type": "int",
"var_name": "MIN_API_PAYLOAD_LENGTH"
},
{
"declarator": "ERROR_PAYLOAD_NULL = \"Re... | {
"body": "public static RemoteATCommandWifiPacket createPacket(byte[] payload) {\n\t\tif (payload == null)\n\t\t\tthrow new NullPointerException(ERROR_PAYLOAD_NULL);\n\n\t\tif (payload.length < MIN_API_PAYLOAD_LENGTH)\n\t\t\tthrow new IllegalArgumentException(ERROR_INCOMPLETE_PACKET);\n\n\t\tif ((payload[0] & 0xFF) ... | {
"created": null,
"fork": null,
"fork_count": 54,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 21871478,
"size": 3156,
"stargazer_count": 76,
"stars": null,
"updates": null,
"url": "https://github.com/digidotcom/xbee-java"
} |
21871478_35 | {
"fields": [
{
"declarator": "exception = ExpectedException.none()",
"modifier": "@Rule\n\tpublic",
"original_string": "@Rule\n\tpublic ExpectedException exception = ExpectedException.none();",
"type": "ExpectedException",
"var_name": "exception"
}
],
"file": "library/src/te... | {
"body": "@Test\n\tpublic final void testCreatePacketPayloadShorterThanNeeded() {\n\t\t// Setup the resources for the test.\n\t\tint frameType = APIFrameType.MODEM_STATUS.getValue();\n\t\t\n\t\t// Create a payload without modem status.\n\t\tbyte[] payload = new byte[1];\n\t\tpayload[0] = (byte)frameType;\n\t\t\n\t\t... | {
"fields": [
{
"declarator": "MIN_API_PAYLOAD_LENGTH = 2",
"modifier": "private static final",
"original_string": "private static final int MIN_API_PAYLOAD_LENGTH = 2;",
"type": "int",
"var_name": "MIN_API_PAYLOAD_LENGTH"
},
{
"declarator": "modemStatusEvent",
"m... | {
"body": "public static ModemStatusPacket createPacket(byte[] payload) {\n\t\tif (payload == null)\n\t\t\tthrow new NullPointerException(\"Modem Status packet payload cannot be null.\");\n\t\t\n\t\t// 1 (Frame type) + 1 (Modem status)\n\t\tif (payload.length < MIN_API_PAYLOAD_LENGTH)\n\t\t\tthrow new IllegalArgument... | {
"created": null,
"fork": null,
"fork_count": 54,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 21871478,
"size": 3156,
"stargazer_count": 76,
"stars": null,
"updates": null,
"url": "https://github.com/digidotcom/xbee-java"
} |
21871478_695 | {
"fields": [
{
"declarator": "exception = ExpectedException.none()",
"modifier": "@Rule\n\tpublic",
"original_string": "@Rule\n\tpublic ExpectedException exception = ExpectedException.none();",
"type": "ExpectedException",
"var_name": "exception"
}
],
"file": "library/src/te... | {
"body": "@Test\n\tpublic final void testIntToByteArray() {\n\t\t// Setup the resources for the test.\n\t\tint i = 0x98563214;\n\t\tbyte[] expectedResult = new byte[]{(byte)0x98, 0x56, 0x32, 0x14};\n\t\t\n\t\t// Call the method under test.\n\t\tbyte[] result = ByteUtils.intToByteArray(i);\n\t\t\n\t\t// Verify the re... | {
"fields": [],
"file": "library/src/main/java/com/digi/xbee/api/utils/ByteUtils.java",
"identifier": "ByteUtils",
"interfaces": "",
"methods": [
{
"class_method_signature": "ByteUtils.readBytes(int numBytes, ByteArrayInputStream inputStream)",
"constructor": false,
"full_signature": "pu... | {
"body": "public static byte[] intToByteArray(int value) {\n\t\treturn new byte[] {\n\t\t\t\t(byte)((value >>> 24) & 0xFF),\n\t\t\t\t(byte)((value >>> 16) & 0xFF),\n\t\t\t\t(byte)((value >>> 8) & 0xFF),\n\t\t\t\t(byte)(value & 0xFF)\n\t\t};\n\t}",
"class_method_signature": "ByteUtils.intToByteArray(int value)",
... | {
"created": null,
"fork": null,
"fork_count": 54,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 21871478,
"size": 3156,
"stargazer_count": 76,
"stars": null,
"updates": null,
"url": "https://github.com/digidotcom/xbee-java"
} |
21871478_400 | {
"fields": [
{
"declarator": "exception = ExpectedException.none()",
"modifier": "@Rule\n\tpublic",
"original_string": "@Rule\n\tpublic ExpectedException exception = ExpectedException.none();",
"type": "ExpectedException",
"var_name": "exception"
}
],
"file": "library/src/te... | {
"body": "@Test\n\tpublic final void testGetAPIPacketParametersReceivedDataNull() {\n\t\t// Setup the resources for the test.\n\t\tXBee64BitAddress source64Addr = new XBee64BitAddress(\"0013A2004032D9AB\");\n\t\tint rssi = 75;\n\t\tint options = 40;\n\t\tbyte[] receivedData = null;\n\t\tRX64Packet packet = new RX64P... | {
"fields": [
{
"declarator": "MIN_API_PAYLOAD_LENGTH = 11",
"modifier": "private static final",
"original_string": "private static final int MIN_API_PAYLOAD_LENGTH = 11;",
"type": "int",
"var_name": "MIN_API_PAYLOAD_LENGTH"
},
{
"declarator": "sourceAddress64",
"... | {
"body": "@Override\n\tpublic LinkedHashMap<String, String> getAPIPacketParameters() {\n\t\tLinkedHashMap<String, String> parameters = new LinkedHashMap<String, String>();\n\t\tparameters.put(\"64-bit source address\", HexUtils.prettyHexString(sourceAddress64.toString()));\n\t\tparameters.put(\"RSSI\", HexUtils.pret... | {
"created": null,
"fork": null,
"fork_count": 54,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 21871478,
"size": 3156,
"stargazer_count": 76,
"stars": null,
"updates": null,
"url": "https://github.com/digidotcom/xbee-java"
} |
21871478_816 | {
"fields": [
{
"declarator": "INVALID_BYTE_ARRAY = new byte[]{0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08}",
"modifier": "private final static",
"original_string": "private final static byte[] INVALID_BYTE_ARRAY = new byte[]{0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08};",
... | {
"body": "@Test\n\tpublic final void testEqualsIsReflexive() {\n\t\t// Setup the resources for the test.\n\t\tXBeeIMEIAddress imei = new XBeeIMEIAddress(\"1234\");\n\t\t\n\t\t// Call the method under test.\n\t\tboolean areEqual = imei.equals(imei);\n\t\t\n\t\t// Verify the result.\n\t\tassertThat(\"IMEI imei must be... | {
"fields": [
{
"declarator": "ERROR_IMEI_NULL = \"IMEI address cannot be null.\"",
"modifier": "private static final",
"original_string": "private static final String ERROR_IMEI_NULL = \"IMEI address cannot be null.\";",
"type": "String",
"var_name": "ERROR_IMEI_NULL"
},
{
... | {
"body": "@Override\n\tpublic boolean equals(Object obj) {\n\t\tif (obj == null)\n\t\t\treturn false;\n\t\tif (!(obj instanceof XBeeIMEIAddress))\n\t\t\treturn false;\n\t\tXBeeIMEIAddress addr = (XBeeIMEIAddress)obj;\n\t\treturn addr.getValue().equals(getValue());\n\t}",
"class_method_signature": "XBeeIMEIAddress.... | {
"created": null,
"fork": null,
"fork_count": 54,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 21871478,
"size": 3156,
"stargazer_count": 76,
"stars": null,
"updates": null,
"url": "https://github.com/digidotcom/xbee-java"
} |
21871478_115 | {
"fields": [
{
"declarator": "exception = ExpectedException.none()",
"modifier": "@Rule\n\tpublic",
"original_string": "@Rule\n\tpublic ExpectedException exception = ExpectedException.none();",
"type": "ExpectedException",
"var_name": "exception"
}
],
"file": "library/src/te... | {
"body": "@Test\n\tpublic final void testIsBroadcastWith16BitAnd64BitBroadcastDestinationAddress() {\n\t\t// Setup the resources for the test.\n\t\tint frameID = 0x10;\n\t\tXBee64BitAddress dest64Addr = new XBee64BitAddress(\"FFFF\");\n\t\tXBee16BitAddress dest16Addr = new XBee16BitAddress(\"FFFF\");\n\t\tint option... | {
"fields": [
{
"declarator": "MIN_API_PAYLOAD_LENGTH = 15",
"modifier": "private static final",
"original_string": "private static final int MIN_API_PAYLOAD_LENGTH = 15;",
"type": "int",
"var_name": "MIN_API_PAYLOAD_LENGTH"
},
{
"declarator": "destAddress64",
"mo... | {
"body": "@Override\n\tpublic boolean isBroadcast() {\n\t\treturn get64bitDestinationAddress().equals(XBee64BitAddress.BROADCAST_ADDRESS) \n\t\t\t\t|| get16bitDestinationAddress().equals(XBee16BitAddress.BROADCAST_ADDRESS);\n\t}",
"class_method_signature": "RemoteATCommandPacket.isBroadcast()",
"constructor": fa... | {
"created": null,
"fork": null,
"fork_count": 54,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 21871478,
"size": 3156,
"stargazer_count": 76,
"stars": null,
"updates": null,
"url": "https://github.com/digidotcom/xbee-java"
} |
21871478_545 | {
"fields": [
{
"declarator": "RECEIVED_BUFFER = \"Hello, this is the received data\".getBytes()",
"modifier": "private static final",
"original_string": "private static final byte[] RECEIVED_BUFFER = \"Hello, this is the received data\".getBytes();",
"type": "byte[]",
"var_name": "R... | {
"body": "@Test\n\tpublic final void testReadDataByteArrayNullData() throws IOException {\n\t\t// Setup the resources for the test.\n\t\tTestAbstractSerialPort port = Mockito.spy(new TestAbstractSerialPort(\"COM1\", 9600));\n\t\tbyte[] data = null;\n\t\t\n\t\texception.expect(NullPointerException.class);\n\t\texcept... | {
"fields": [
{
"declarator": "DEFAULT_PORT_TIMEOUT = 10",
"modifier": "public static final",
"original_string": "public static final int DEFAULT_PORT_TIMEOUT = 10;",
"type": "int",
"var_name": "DEFAULT_PORT_TIMEOUT"
},
{
"declarator": "DEFAULT_DATA_BITS = 8",
"mo... | {
"body": "@Override\n\tpublic int readData(byte[] data) throws IOException {\n\t\tif (data == null)\n\t\t\tthrow new NullPointerException(\"Buffer cannot be null.\");\n\t\t\n\t\tint readBytes = 0;\n\t\tif (getInputStream() != null)\n\t\t\treadBytes = getInputStream().read(data);\n\t\treturn readBytes;\n\t}",
"clas... | {
"created": null,
"fork": null,
"fork_count": 54,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 21871478,
"size": 3156,
"stargazer_count": 76,
"stars": null,
"updates": null,
"url": "https://github.com/digidotcom/xbee-java"
} |
21871478_23 | {
"fields": [
{
"declarator": "exception = ExpectedException.none()",
"modifier": "@Rule\n\tpublic",
"original_string": "@Rule\n\tpublic ExpectedException exception = ExpectedException.none();",
"type": "ExpectedException",
"var_name": "exception"
}
],
"file": "library/src/te... | {
"body": "@Test\n\tpublic final void testCreatePacketPayloadShorterThanNeeded() {\n\t\t// Setup the resources for the test.\n\t\tint frameType = APIFrameType.TRANSMIT_REQUEST.getValue();\n\t\tint frameID = 0xE7;\n\t\tXBee64BitAddress dest64Addr = new XBee64BitAddress(\"0013A2004032D9AB\");\n\t\tXBee16BitAddress dest... | {
"fields": [
{
"declarator": "MIN_API_PAYLOAD_LENGTH = 14",
"modifier": "private static final",
"original_string": "private static final int MIN_API_PAYLOAD_LENGTH = 14;",
"type": "int",
"var_name": "MIN_API_PAYLOAD_LENGTH"
},
{
"declarator": "destAddress64",
"mo... | {
"body": "public static TransmitPacket createPacket(byte[] payload) {\n\t\tif (payload == null)\n\t\t\tthrow new NullPointerException(\"Transmit packet payload cannot be null.\");\n\t\t\n\t\t// 1 (Frame type) + 1 (frame ID) + 8 (64-bit address) + 2 (16-bit address) + 1 (broadcast radious) + 1 (options)\n\t\tif (payl... | {
"created": null,
"fork": null,
"fork_count": 54,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 21871478,
"size": 3156,
"stargazer_count": 76,
"stars": null,
"updates": null,
"url": "https://github.com/digidotcom/xbee-java"
} |
21871478_396 | {
"fields": [
{
"declarator": "exception = ExpectedException.none()",
"modifier": "@Rule\n\tpublic",
"original_string": "@Rule\n\tpublic ExpectedException exception = ExpectedException.none();",
"type": "ExpectedException",
"var_name": "exception"
}
],
"file": "library/src/te... | {
"body": "@Test\n\tpublic final void testCreatePacketNullPayload() {\n\t\t// Setup the resources for the test.\n\t\tbyte[] payload = null;\n\t\texception.expect(NullPointerException.class);\n\t\texception.expectMessage(is(equalTo(\"RX64 packet payload cannot be null.\")));\n\t\t\n\t\t// Call the method under test th... | {
"fields": [
{
"declarator": "MIN_API_PAYLOAD_LENGTH = 11",
"modifier": "private static final",
"original_string": "private static final int MIN_API_PAYLOAD_LENGTH = 11;",
"type": "int",
"var_name": "MIN_API_PAYLOAD_LENGTH"
},
{
"declarator": "sourceAddress64",
"... | {
"body": "public static RX64Packet createPacket(byte[] payload) {\n\t\tif (payload == null)\n\t\t\tthrow new NullPointerException(\"RX64 packet payload cannot be null.\");\n\t\t\n\t\t// 1 (Frame type) + 8 (64-bit address) + 1 (signal strength) + 1 (receive options)\n\t\tif (payload.length < MIN_API_PAYLOAD_LENGTH)\n... | {
"created": null,
"fork": null,
"fork_count": 54,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 21871478,
"size": 3156,
"stargazer_count": 76,
"stars": null,
"updates": null,
"url": "https://github.com/digidotcom/xbee-java"
} |
21871478_729 | {
"fields": [
{
"declarator": "exception = ExpectedException.none()",
"modifier": "@Rule\n\tpublic",
"original_string": "@Rule\n\tpublic ExpectedException exception = ExpectedException.none();",
"type": "ExpectedException",
"var_name": "exception"
}
],
"file": "library/src/te... | {
"body": "@Test\n\tpublic final void testReadUntilCREmptyInputStream() {\n\t\t// Setup the resources for the test.\n\t\tByteArrayInputStream in = new ByteArrayInputStream(new byte[0]);\n\t\t\n\t\t// Call the method under test.\n\t\tbyte[] result = ByteUtils.readUntilCR(in);\n\t\t\n\t\t// Verify the result.\n\t\tasse... | {
"fields": [],
"file": "library/src/main/java/com/digi/xbee/api/utils/ByteUtils.java",
"identifier": "ByteUtils",
"interfaces": "",
"methods": [
{
"class_method_signature": "ByteUtils.readBytes(int numBytes, ByteArrayInputStream inputStream)",
"constructor": false,
"full_signature": "pu... | {
"body": "public static byte[] readUntilCR(ByteArrayInputStream inputStream) {\n\t\tif (inputStream == null)\n\t\t\tthrow new NullPointerException(\"Input stream cannot be null.\");\n\t\t\n\t\tByteArrayOutputStream outputStream = new ByteArrayOutputStream();\n\t\tbyte readByte;\n\t\twhile (((readByte = (byte)inputSt... | {
"created": null,
"fork": null,
"fork_count": 54,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 21871478,
"size": 3156,
"stargazer_count": 76,
"stars": null,
"updates": null,
"url": "https://github.com/digidotcom/xbee-java"
} |
21871478_379 | {
"fields": [
{
"declarator": "IP_ADDRESS = \"10.10.11.12\"",
"modifier": "private static final",
"original_string": "private static final String IP_ADDRESS = \"10.10.11.12\";",
"type": "String",
"var_name": "IP_ADDRESS"
},
{
"declarator": "frameType = APIFrameType.REMO... | {
"body": "@Test\n\tpublic final void testCreatePacketNullPayload() {\n\t\t// Setup the resources for the test.\n\t\tbyte[] payload = null;\n\t\texception.expect(NullPointerException.class);\n\t\texception.expectMessage(is(equalTo(\"Remote AT Command Request (Wi-Fi) packet payload cannot be null.\")));\n\n\t\t// Call... | {
"fields": [
{
"declarator": "MIN_API_PAYLOAD_LENGTH = 13",
"modifier": "private static final",
"original_string": "private static final int MIN_API_PAYLOAD_LENGTH = 13;",
"type": "int",
"var_name": "MIN_API_PAYLOAD_LENGTH"
},
{
"declarator": "ERROR_PAYLOAD_NULL = \"Re... | {
"body": "public static RemoteATCommandWifiPacket createPacket(byte[] payload) {\n\t\tif (payload == null)\n\t\t\tthrow new NullPointerException(ERROR_PAYLOAD_NULL);\n\n\t\tif (payload.length < MIN_API_PAYLOAD_LENGTH)\n\t\t\tthrow new IllegalArgumentException(ERROR_INCOMPLETE_PACKET);\n\n\t\tif ((payload[0] & 0xFF) ... | {
"created": null,
"fork": null,
"fork_count": 54,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 21871478,
"size": 3156,
"stargazer_count": 76,
"stars": null,
"updates": null,
"url": "https://github.com/digidotcom/xbee-java"
} |
21871478_683 | {
"fields": [
{
"declarator": "exception = ExpectedException.none()",
"modifier": "@Rule\n\tpublic",
"original_string": "@Rule\n\tpublic ExpectedException exception = ExpectedException.none();",
"type": "ExpectedException",
"var_name": "exception"
}
],
"file": "library/src/te... | {
"body": "@Test\n\tpublic final void testReadBytesLessThanAvailable() {\n\t\t// Setup the resources for the test.\n\t\tbyte[] contents = new byte[]{0x00, 0x01, 0x02, 0x03, 0x04};\n\t\tbyte[] expectedResult = new byte[]{0x00, 0x01, 0x02, 0x03};\n\t\tByteArrayInputStream in = new ByteArrayInputStream(contents);\n\t\t\... | {
"fields": [],
"file": "library/src/main/java/com/digi/xbee/api/utils/ByteUtils.java",
"identifier": "ByteUtils",
"interfaces": "",
"methods": [
{
"class_method_signature": "ByteUtils.readBytes(int numBytes, ByteArrayInputStream inputStream)",
"constructor": false,
"full_signature": "pu... | {
"body": "public static byte[] readBytes(int numBytes, ByteArrayInputStream inputStream) {\n\t\tif (inputStream == null)\n\t\t\tthrow new NullPointerException(\"Input stream cannot be null.\");\n\t\tif (numBytes < 0)\n\t\t\tthrow new IllegalArgumentException(\"Number of bytes to read must be equal or greater than 0.... | {
"created": null,
"fork": null,
"fork_count": 54,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 21871478,
"size": 3156,
"stargazer_count": 76,
"stars": null,
"updates": null,
"url": "https://github.com/digidotcom/xbee-java"
} |
21871478_457 | {
"fields": [
{
"declarator": "exception = ExpectedException.none()",
"modifier": "@Rule\n\tpublic",
"original_string": "@Rule\n\tpublic ExpectedException exception = ExpectedException.none();",
"type": "ExpectedException",
"var_name": "exception"
}
],
"file": "library/src/te... | {
"body": "@Test\n\tpublic final void testGetAPIDataUnknownStatus() {\n\t\t// Setup the resources for the test.\n\t\tint frameType = APIFrameType.TX_STATUS.getValue();\n\t\tint frameID = 0x65;\n\t\tint status = 255;\n\t\t\n\t\tbyte[] payload = new byte[3];\n\t\tpayload[0] = (byte)frameType;\n\t\tpayload[1] = (byte)fr... | {
"fields": [
{
"declarator": "MIN_API_PAYLOAD_LENGTH = 3",
"modifier": "private static final",
"original_string": "private static final int MIN_API_PAYLOAD_LENGTH = 3;",
"type": "int",
"var_name": "MIN_API_PAYLOAD_LENGTH"
},
{
"declarator": "transmitStatus",
"mod... | {
"body": "public static TXStatusPacket createPacket(byte[] payload) {\n\t\tif (payload == null)\n\t\t\tthrow new NullPointerException(\"TX Status packet payload cannot be null.\");\n\t\t\n\t\t// 1 (Frame type) + 1 (frame ID) + 1 (status)\n\t\tif (payload.length < MIN_API_PAYLOAD_LENGTH)\n\t\t\tthrow new IllegalArgum... | {
"created": null,
"fork": null,
"fork_count": 54,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 21871478,
"size": 3156,
"stargazer_count": 76,
"stars": null,
"updates": null,
"url": "https://github.com/digidotcom/xbee-java"
} |
21871478_512 | {
"fields": [
{
"declarator": "exception = ExpectedException.none()",
"modifier": "@Rule\n\tpublic",
"original_string": "@Rule\n\tpublic ExpectedException exception = ExpectedException.none();",
"type": "ExpectedException",
"var_name": "exception"
}
],
"file": "library/src/te... | {
"body": "@Test\n\tpublic final void testEqualsWithDifferentFlowControl() {\n\t\t// Setup the resources for the test.\n\t\tSerialPortParameters parameters1 = new SerialPortParameters(9600, 8, 1, 0, 0);\n\t\tSerialPortParameters parameters2 = new SerialPortParameters(9600, 8, 1, 0, 1);\n\t\t\n\t\t// Call the method u... | {
"fields": [
{
"declarator": "HASH_SEED = 23",
"modifier": "private static final",
"original_string": "private static final int HASH_SEED = 23;",
"type": "int",
"var_name": "HASH_SEED"
},
{
"declarator": "baudrate",
"modifier": "public final",
"original_str... | {
"body": "@Override\n\tpublic boolean equals(Object obj) {\n\t\tif (obj instanceof SerialPortParameters)\n\t\t\treturn ((SerialPortParameters)obj).baudrate == baudrate \n\t\t\t\t&& ((SerialPortParameters)obj).dataBits == dataBits \n\t\t\t\t&& ((SerialPortParameters)obj).stopBits == stopBits\n\t\t\t\t&& ((SerialPortP... | {
"created": null,
"fork": null,
"fork_count": 54,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 21871478,
"size": 3156,
"stargazer_count": 76,
"stars": null,
"updates": null,
"url": "https://github.com/digidotcom/xbee-java"
} |
21871478_142 | {
"fields": [
{
"declarator": "exception = ExpectedException.none()",
"modifier": "@Rule\n\tpublic",
"original_string": "@Rule\n\tpublic ExpectedException exception = ExpectedException.none();",
"type": "ExpectedException",
"var_name": "exception"
}
],
"file": "library/src/te... | {
"body": "@Test\n\tpublic final void testIsBroadcastWithNon16BitBroadcastAnd64BitBroadcastDestinationAddress() {\n\t\t// Setup the resources for the test.\n\t\tint frameID = 0x65;\n\t\tXBee64BitAddress dest64Addr = new XBee64BitAddress(\"FFFF\");\n\t\tXBee16BitAddress dest16Addr = new XBee16BitAddress(\"D817\");\n\t... | {
"fields": [
{
"declarator": "MIN_API_PAYLOAD_LENGTH = 20",
"modifier": "private static final",
"original_string": "private static final int MIN_API_PAYLOAD_LENGTH = 20;",
"type": "int",
"var_name": "MIN_API_PAYLOAD_LENGTH"
},
{
"declarator": "destAddress64",
"mo... | {
"body": "@Override\n\tpublic boolean isBroadcast() {\n\t\tif (get64BitDestinationAddress().equals(XBee64BitAddress.BROADCAST_ADDRESS) \n\t\t\t\t|| get16BitDestinationAddress().equals(XBee16BitAddress.BROADCAST_ADDRESS))\n\t\t\treturn true;\n\t\treturn false;\n\t}",
"class_method_signature": "ExplicitAddressingPac... | {
"created": null,
"fork": null,
"fork_count": 54,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 21871478,
"size": 3156,
"stargazer_count": 76,
"stars": null,
"updates": null,
"url": "https://github.com/digidotcom/xbee-java"
} |
21871478_791 | {
"fields": [
{
"declarator": "MAX_LENGTH = XBeePacketsQueue.DEFAULT_MAX_LENGTH",
"modifier": "private final static",
"original_string": "private final static int MAX_LENGTH = XBeePacketsQueue.DEFAULT_MAX_LENGTH;",
"type": "int",
"var_name": "MAX_LENGTH"
},
{
"declarato... | {
"body": "@Test\n\tpublic void testGetFirstIPDataPacketFrom() {\n\t\t// Create an XBeePacketsQueue of 5 slots.\n\t\tXBeePacketsQueue xbeePacketsQueue = new XBeePacketsQueue(5);\n\t\t\n\t\t// Add 2 dummy packets.\n\t\tfor (int i = 0; i < 2; i ++)\n\t\t\txbeePacketsQueue.addPacket(Mockito.mock(XBeePacket.class));\n\t\... | {
"fields": [
{
"declarator": "DEFAULT_MAX_LENGTH = 50",
"modifier": "public static final",
"original_string": "public static final int DEFAULT_MAX_LENGTH = 50;",
"type": "int",
"var_name": "DEFAULT_MAX_LENGTH"
},
{
"declarator": "maxLength = DEFAULT_MAX_LENGTH",
... | {
"body": "public XBeePacket getFirstIPDataPacketFrom(Inet4Address ipAddress, int timeout) {\n\t\tif (timeout > 0) {\n\t\t\tXBeePacket xbeePacket = getFirstIPDataPacketFrom(ipAddress, 0);\n\t\t\t// Wait for a timeout or until a IP data packet with the provided IP address is read.\n\t\t\tLong deadLine = System.current... | {
"created": null,
"fork": null,
"fork_count": 54,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 21871478,
"size": 3156,
"stargazer_count": 76,
"stars": null,
"updates": null,
"url": "https://github.com/digidotcom/xbee-java"
} |
21871478_74 | {
"fields": [
{
"declarator": "exception = ExpectedException.none()",
"modifier": "@Rule\n\tpublic",
"original_string": "@Rule\n\tpublic ExpectedException exception = ExpectedException.none();",
"type": "ExpectedException",
"var_name": "exception"
}
],
"file": "library/src/te... | {
"body": "@Test\n\tpublic final void testGetAPIPacketParametersATCommandParameterNull() {\n\t\t// Setup the resources for the test.\n\t\tint frameID = 0x10;\n\t\tString command = \"NI\";\n\t\tString parameter = null;\n\t\tATCommandQueuePacket packet = new ATCommandQueuePacket(frameID, command, parameter);\n\t\t\n\t\... | {
"fields": [
{
"declarator": "MIN_API_PAYLOAD_LENGTH = 4",
"modifier": "private static final",
"original_string": "private static final int MIN_API_PAYLOAD_LENGTH = 4;",
"type": "int",
"var_name": "MIN_API_PAYLOAD_LENGTH"
},
{
"declarator": "command",
"modifier":... | {
"body": "@Override\n\tpublic LinkedHashMap<String, String> getAPIPacketParameters() {\n\t\tLinkedHashMap<String, String> parameters = new LinkedHashMap<String, String>();\n\t\tparameters.put(\"AT Command\", HexUtils.prettyHexString(HexUtils.byteArrayToHexString(command.getBytes())) + \" (\" + command + \")\");\n\t\... | {
"created": null,
"fork": null,
"fork_count": 54,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 21871478,
"size": 3156,
"stargazer_count": 76,
"stars": null,
"updates": null,
"url": "https://github.com/digidotcom/xbee-java"
} |
21871478_284 | {
"fields": [
{
"declarator": "frameType = APIFrameType.SEND_DATA_REQUEST.getValue()",
"modifier": "private",
"original_string": "private int frameType = APIFrameType.SEND_DATA_REQUEST.getValue();",
"type": "int",
"var_name": "frameType"
},
{
"declarator": "frameID = 0x... | {
"body": "@Test\n\tpublic final void testGetAPIPacketParametersContentTypeNull() {\n\t\t// Set up the resources for the test.\n\t\tcontentType = null;\n\n\t\tSendDataRequestPacket packet = new SendDataRequestPacket(frameID, path, contentType, options, data);\n\n\t\t// Call the method under test.\n\t\tLinkedHashMap<S... | {
"fields": [
{
"declarator": "MIN_API_PAYLOAD_LENGTH = 6",
"modifier": "private static final",
"original_string": "private static final int MIN_API_PAYLOAD_LENGTH = 6;",
"type": "int",
"var_name": "MIN_API_PAYLOAD_LENGTH"
},
{
"declarator": "ERROR_PAYLOAD_NULL = \"Send... | {
"body": "@Override\n\tpublic LinkedHashMap<String, String> getAPIPacketParameters() {\n\t\tLinkedHashMap<String, String> parameters = new LinkedHashMap<String, String>();\n\t\tif (path != null) {\n\t\t\tparameters.put(\"Path length\", HexUtils.prettyHexString(HexUtils.integerToHexString(path.length(), 1)) + \" (\" ... | {
"created": null,
"fork": null,
"fork_count": 54,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 21871478,
"size": 3156,
"stargazer_count": 76,
"stars": null,
"updates": null,
"url": "https://github.com/digidotcom/xbee-java"
} |
21871478_709 | {
"fields": [
{
"declarator": "exception = ExpectedException.none()",
"modifier": "@Rule\n\tpublic",
"original_string": "@Rule\n\tpublic ExpectedException exception = ExpectedException.none();",
"type": "ExpectedException",
"var_name": "exception"
}
],
"file": "library/src/te... | {
"body": "@Test\n\tpublic final void testStringToByteArray() {\n\t\t// Setup the resources for the test.\n\t\tString s = \"Hello\";\n\t\tbyte[] expectedResult = new byte[]{'H', 'e', 'l', 'l', 'o'};\n\t\t\n\t\t// Call the method under test.\n\t\tbyte[] result = ByteUtils.stringToByteArray(s);\n\t\t\n\t\t// Verify th... | {
"fields": [],
"file": "library/src/main/java/com/digi/xbee/api/utils/ByteUtils.java",
"identifier": "ByteUtils",
"interfaces": "",
"methods": [
{
"class_method_signature": "ByteUtils.readBytes(int numBytes, ByteArrayInputStream inputStream)",
"constructor": false,
"full_signature": "pu... | {
"body": "public static byte[] stringToByteArray(String value) {\n\t\tif (value == null)\n\t\t\tthrow new NullPointerException(\"Value cannot be null.\");\n\t\t\n\t\treturn value.getBytes();\n\t}",
"class_method_signature": "ByteUtils.stringToByteArray(String value)",
"constructor": false,
"full_signature": "p... | {
"created": null,
"fork": null,
"fork_count": 54,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 21871478,
"size": 3156,
"stargazer_count": 76,
"stars": null,
"updates": null,
"url": "https://github.com/digidotcom/xbee-java"
} |
21871478_359 | {
"fields": [
{
"declarator": "frameType = APIFrameType.RX_SMS.getValue()",
"modifier": "private",
"original_string": "private int frameType = APIFrameType.RX_SMS.getValue();",
"type": "int",
"var_name": "frameType"
},
{
"declarator": "phoneNumber = \"555203203\"",
... | {
"body": "@Test\n\tpublic final void testCreatePacketPayloadShorterThanNeeded() {\n\t\t// Set up the resources for the test.\n\t\tbyte[] phoneNumber = Arrays.copyOf(this.phoneNumber.getBytes(), 20);\n\n\t\tbyte[] payload = phoneNumber;\n\n\t\texception.expect(IllegalArgumentException.class);\n\t\texception.expectMes... | {
"fields": [
{
"declarator": "MIN_API_PAYLOAD_LENGTH = 1 /* (Frame type) */ + TXSMSPacket.PHONE_NUMBER_LENGTH",
"modifier": "private static final",
"original_string": "private static final int MIN_API_PAYLOAD_LENGTH = 1 /* (Frame type) */ + TXSMSPacket.PHONE_NUMBER_LENGTH;",
"type": "int"... | {
"body": "public static RXSMSPacket createPacket(byte[] payload) {\n\t\tif (payload == null)\n\t\t\tthrow new NullPointerException(ERROR_PAYLOAD_NULL);\n\n\t\tif (payload.length < MIN_API_PAYLOAD_LENGTH)\n\t\t\tthrow new IllegalArgumentException(ERROR_INCOMPLETE_PACKET);\n\n\t\tif ((payload[0] & 0xFF) != APIFrameTyp... | {
"created": null,
"fork": null,
"fork_count": 54,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 21871478,
"size": 3156,
"stargazer_count": 76,
"stars": null,
"updates": null,
"url": "https://github.com/digidotcom/xbee-java"
} |
21871478_135 | {
"fields": [
{
"declarator": "exception = ExpectedException.none()",
"modifier": "@Rule\n\tpublic",
"original_string": "@Rule\n\tpublic ExpectedException exception = ExpectedException.none();",
"type": "ExpectedException",
"var_name": "exception"
}
],
"file": "library/src/te... | {
"body": "@Test\n\tpublic final void testCreatePacketEmptyPayload() {\n\t\t// Setup the resources for the test.\n\t\tbyte[] payload = new byte[0];\n\t\texception.expect(IllegalArgumentException.class);\n\t\texception.expectMessage(is(equalTo(\"Incomplete Explicit Addressing packet.\")));\n\t\t\n\t\t// Call the metho... | {
"fields": [
{
"declarator": "MIN_API_PAYLOAD_LENGTH = 20",
"modifier": "private static final",
"original_string": "private static final int MIN_API_PAYLOAD_LENGTH = 20;",
"type": "int",
"var_name": "MIN_API_PAYLOAD_LENGTH"
},
{
"declarator": "destAddress64",
"mo... | {
"body": "public static ExplicitAddressingPacket createPacket(byte[] payload) {\n\t\tif (payload == null)\n\t\t\tthrow new NullPointerException(\"Explicit Addressing packet payload cannot be null.\");\n\t\t\n\t\t// 1 (Frame type) + 1 (frame ID) + 8 (64-bit address) + 2 (16-bit address) + 1 (source endpoint) + 1 (des... | {
"created": null,
"fork": null,
"fork_count": 54,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 21871478,
"size": 3156,
"stargazer_count": 76,
"stars": null,
"updates": null,
"url": "https://github.com/digidotcom/xbee-java"
} |
21871478_565 | {
"fields": [
{
"declarator": "RECEIVED_BUFFER = \"Hello, this is the received data\".getBytes()",
"modifier": "private static final",
"original_string": "private static final byte[] RECEIVED_BUFFER = \"Hello, this is the received data\".getBytes();",
"type": "byte[]",
"var_name": "R... | {
"body": "@Test\n\tpublic void testToStringParityMark() {\n\t\t// Setup the resources for the test.\n\t\tSerialPortParameters params = new SerialPortParameters(115200, 7, 2, 3, 3);\n\t\tTestAbstractSerialPort port = Mockito.spy(new TestAbstractSerialPort(\"COM1\", params));\n\t\tString expected = \"[COM1 - 115200/7/... | {
"fields": [
{
"declarator": "DEFAULT_PORT_TIMEOUT = 10",
"modifier": "public static final",
"original_string": "public static final int DEFAULT_PORT_TIMEOUT = 10;",
"type": "int",
"var_name": "DEFAULT_PORT_TIMEOUT"
},
{
"declarator": "DEFAULT_DATA_BITS = 8",
"mo... | {
"body": "@Override\n\tpublic String toString() {\n\t\tif (parameters != null) {\n\t\t\tString parity = \"N\";\n\t\t\tString flowControl = \"N\";\n\t\t\tif (parameters.parity == 1)\n\t\t\t\tparity = \"O\";\n\t\t\telse if (parameters.parity == 2)\n\t\t\t\tparity = \"E\";\n\t\t\telse if (parameters.parity == 3)\n\t\t\... | {
"created": null,
"fork": null,
"fork_count": 54,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 21871478,
"size": 3156,
"stargazer_count": 76,
"stars": null,
"updates": null,
"url": "https://github.com/digidotcom/xbee-java"
} |
21871478_420 | {
"fields": [
{
"declarator": "exception = ExpectedException.none()",
"modifier": "@Rule\n\tpublic",
"original_string": "@Rule\n\tpublic ExpectedException exception = ExpectedException.none();",
"type": "ExpectedException",
"var_name": "exception"
}
],
"file": "library/src/te... | {
"body": "@Test\n\tpublic final void testCreatePacketNullPayload() {\n\t\t// Setup the resources for the test.\n\t\tbyte[] payload = null;\n\t\texception.expect(NullPointerException.class);\n\t\texception.expectMessage(is(equalTo(\"TX64 Request packet payload cannot be null.\")));\n\t\t\n\t\t// Call the method under... | {
"fields": [
{
"declarator": "MIN_API_PAYLOAD_LENGTH = 11",
"modifier": "private static final",
"original_string": "private static final int MIN_API_PAYLOAD_LENGTH = 11;",
"type": "int",
"var_name": "MIN_API_PAYLOAD_LENGTH"
},
{
"declarator": "transmitOptions",
"... | {
"body": "public static TX64Packet createPacket(byte[] payload) {\n\t\tif (payload == null)\n\t\t\tthrow new NullPointerException(\"TX64 Request packet payload cannot be null.\");\n\t\t\n\t\t// 1 (Frame type) + 1 (frame ID) + 8 (address) + 1 (transmit options)\n\t\tif (payload.length < MIN_API_PAYLOAD_LENGTH)\n\t\t\... | {
"created": null,
"fork": null,
"fork_count": 54,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 21871478,
"size": 3156,
"stargazer_count": 76,
"stars": null,
"updates": null,
"url": "https://github.com/digidotcom/xbee-java"
} |
21871478_54 | {
"fields": [
{
"declarator": "exception = ExpectedException.none()",
"modifier": "@Rule\n\tpublic",
"original_string": "@Rule\n\tpublic ExpectedException exception = ExpectedException.none();",
"type": "ExpectedException",
"var_name": "exception"
}
],
"file": "library/src/te... | {
"body": "@Test\n\tpublic final void testIsBroadcastWithNonBroadcastOption() {\n\t\t// Setup the resources for the test.\n\t\tXBee64BitAddress source64Addr = new XBee64BitAddress(\"0013A2004032D9AB\");\n\t\tXBee16BitAddress source16Addr = new XBee16BitAddress(\"D817\");\n\t\tint options = 0x0D; /* bit 1 */\n\t\tbyte... | {
"fields": [
{
"declarator": "MIN_API_PAYLOAD_LENGTH = 12",
"modifier": "private static final",
"original_string": "private static final int MIN_API_PAYLOAD_LENGTH = 12;",
"type": "int",
"var_name": "MIN_API_PAYLOAD_LENGTH"
},
{
"declarator": "sourceAddress64",
"... | {
"body": "@Override\n\tpublic boolean isBroadcast() {\n\t\treturn ByteUtils.isBitEnabled(getReceiveOptions(), 1);\n\t}",
"class_method_signature": "IODataSampleRxIndicatorPacket.isBroadcast()",
"constructor": false,
"full_signature": "@Override public boolean isBroadcast()",
"identifier": "isBroadcast",
"i... | {
"created": null,
"fork": null,
"fork_count": 54,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 21871478,
"size": 3156,
"stargazer_count": 76,
"stars": null,
"updates": null,
"url": "https://github.com/digidotcom/xbee-java"
} |
21871478_532 | {
"fields": [
{
"declarator": "RECEIVED_BUFFER = \"Hello, this is the received data\".getBytes()",
"modifier": "private static final",
"original_string": "private static final byte[] RECEIVED_BUFFER = \"Hello, this is the received data\".getBytes();",
"type": "byte[]",
"var_name": "R... | {
"body": "@Test\n\tpublic final void testPurge() throws IOException {\n\t\t// Setup the resources for the test.\n\t\tTestAbstractSerialPort port = Mockito.spy(new TestAbstractSerialPort(\"COM1\", 9600));\n\t\t\n\t\t// Call the method under test.\n\t\tport.purge();\n\t\t\n\t\t// Verify the result.\n\t\tMockito.verify... | {
"fields": [
{
"declarator": "DEFAULT_PORT_TIMEOUT = 10",
"modifier": "public static final",
"original_string": "public static final int DEFAULT_PORT_TIMEOUT = 10;",
"type": "int",
"var_name": "DEFAULT_PORT_TIMEOUT"
},
{
"declarator": "DEFAULT_DATA_BITS = 8",
"mo... | {
"body": "public void purge() {\n\t\tif (getInputStream() != null) {\n\t\t\ttry {\n\t\t\t\tbyte[] availableBytes = new byte[getInputStream().available()];\n\t\t\t\tif (getInputStream().available() > 0)\n\t\t\t\t\tgetInputStream().read(availableBytes, 0, getInputStream().available());\n\t\t\t} catch (IOException e) {... | {
"created": null,
"fork": null,
"fork_count": 54,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 21871478,
"size": 3156,
"stargazer_count": 76,
"stars": null,
"updates": null,
"url": "https://github.com/digidotcom/xbee-java"
} |
21871478_162 | {
"fields": [
{
"declarator": "IPV6_ADDR = \"FDB3:0001:0002:0000:0004:0005:0006:0007\"",
"modifier": "private static final",
"original_string": "private static final String IPV6_ADDR = \"FDB3:0001:0002:0000:0004:0005:0006:0007\";",
"type": "String",
"var_name": "IPV6_ADDR"
},
... | {
"body": "@Test\n\tpublic final void testCreatePacketEmptyPayload() {\n\t\t// Setup the resources for the test.\n\t\tbyte[] payload = new byte[0];\n\t\texception.expect(IllegalArgumentException.class);\n\t\texception.expectMessage(is(equalTo(\"Incomplete IPv6 IO Data Sample RX Indicator packet.\")));\n\t\t\n\t\t// C... | {
"fields": [
{
"declarator": "MIN_API_PAYLOAD_LENGTH = 17",
"modifier": "private static final",
"original_string": "private static final int MIN_API_PAYLOAD_LENGTH = 17;",
"type": "int",
"var_name": "MIN_API_PAYLOAD_LENGTH"
},
{
"declarator": "ERROR_PAYLOAD_NULL = \"IP... | {
"body": "public static IPv6IODataSampleRxIndicator createPacket(byte[] payload) {\n\t\tif (payload == null)\n\t\t\tthrow new NullPointerException(ERROR_PAYLOAD_NULL);\n\n\t\t// 1 (Frame type) + 8 (32-bit address) + 2 (16-bit address) + 1 (receive options)\n\t\tif (payload.length < MIN_API_PAYLOAD_LENGTH)\n\t\t\tthr... | {
"created": null,
"fork": null,
"fork_count": 54,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 21871478,
"size": 3156,
"stargazer_count": 76,
"stars": null,
"updates": null,
"url": "https://github.com/digidotcom/xbee-java"
} |
21871478_498 | {
"fields": [
{
"declarator": "exception = ExpectedException.none()",
"modifier": "@Rule\n\tpublic",
"original_string": "@Rule\n\tpublic ExpectedException exception = ExpectedException.none();",
"type": "ExpectedException",
"var_name": "exception"
}
],
"file": "library/src/te... | {
"body": "@Test\n\tpublic final void testParsePacketByteArrayUnknownOperatingMode() throws InvalidPacketException {\n\t\t// Setup the resources for the test.\n\t\tbyte[] byteArray = {0x7E, 0x00, 0x08, 0x08, 0x01, 0x4E, 0x49, 0x41, 0x54, 0x49, (byte)0x81, (byte)0x7E};\n\t\texception.expect(IllegalArgumentException.cl... | {
"fields": [
{
"declarator": "HASH_SEED = 23",
"modifier": "private static final",
"original_string": "private static final int HASH_SEED = 23;",
"type": "int",
"var_name": "HASH_SEED"
},
{
"declarator": "checksum",
"modifier": "private",
"original_string":... | {
"body": "public static XBeePacket parsePacket(String packet, OperatingMode mode) throws InvalidPacketException {\n\t\tif (packet == null)\n\t\t\tthrow new NullPointerException(\"Packet cannot be null.\");\n\t\t\t\n\t\treturn parsePacket(HexUtils.hexStringToByteArray(packet.trim().replace(\" \", \"\")), mode);\n\t}... | {
"created": null,
"fork": null,
"fork_count": 54,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 21871478,
"size": 3156,
"stargazer_count": 76,
"stars": null,
"updates": null,
"url": "https://github.com/digidotcom/xbee-java"
} |
21871478_3 | {
"fields": [
{
"declarator": "PARAMETER_AI = \"AI\"",
"modifier": "private static final",
"original_string": "private static final String PARAMETER_AI = \"AI\";",
"type": "String",
"var_name": "PARAMETER_AI"
},
{
"declarator": "RESPONSE_AI = new byte[]{0x00}",
"m... | {
"body": "@SuppressWarnings(\"deprecation\")\n\t@Test\n\tpublic void testNotSupportedOperationSetIOSamplingRate() throws Exception {\n\t\texception.expect(UnsupportedOperationException.class);\n\t\texception.expectMessage(is(equalTo(\"Operation not supported in Cellular protocol.\")));\n\t\t\n\t\t// Call the method ... | {
"fields": [
{
"declarator": "OPERATION_EXCEPTION = \"Operation not supported in Cellular protocol.\"",
"modifier": "private static final",
"original_string": "private static final String OPERATION_EXCEPTION = \"Operation not supported in Cellular protocol.\";",
"type": "String",
"v... | {
"body": "@Override\n\tpublic void setIOSamplingRate(int rate) throws TimeoutException,\n\t\t\tXBeeException {\n\t\t// Not supported in Cellular.\n\t\tthrow new UnsupportedOperationException(OPERATION_EXCEPTION);\n\t}",
"class_method_signature": "CellularDevice.setIOSamplingRate(int rate)",
"constructor": false,... | {
"created": null,
"fork": null,
"fork_count": 54,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 21871478,
"size": 3156,
"stargazer_count": 76,
"stars": null,
"updates": null,
"url": "https://github.com/digidotcom/xbee-java"
} |
21871478_477 | {
"fields": [
{
"declarator": "exception = ExpectedException.none()",
"modifier": "@Rule\n\tpublic",
"original_string": "@Rule\n\tpublic ExpectedException exception = ExpectedException.none();",
"type": "ExpectedException",
"var_name": "exception"
}
],
"file": "library/src/te... | {
"body": "@Test\n\tpublic final void testGetPacketLengthNullData() {\n\t\t// Setup the resources for the test.\n\t\tTestXBeePacket packet = new TestXBeePacket();\n\t\tint expectedLength = 0;\n\t\t\n\t\t// Call the method under test.\n\t\tint length = packet.getPacketLength();\n\t\t\n\t\t// Verify the result.\n\t\tas... | {
"fields": [
{
"declarator": "HASH_SEED = 23",
"modifier": "private static final",
"original_string": "private static final int HASH_SEED = 23;",
"type": "int",
"var_name": "HASH_SEED"
},
{
"declarator": "checksum",
"modifier": "private",
"original_string":... | {
"body": "public int getPacketLength() {\n\t\tbyte[] packetData = getPacketData();\n\t\tif (packetData == null)\n\t\t\treturn 0;\n\t\treturn packetData.length;\n\t}",
"class_method_signature": "XBeePacket.getPacketLength()",
"constructor": false,
"full_signature": "public int getPacketLength()",
"identifier"... | {
"created": null,
"fork": null,
"fork_count": 54,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 21871478,
"size": 3156,
"stargazer_count": 76,
"stars": null,
"updates": null,
"url": "https://github.com/digidotcom/xbee-java"
} |
21871478_748 | {
"fields": [
{
"declarator": "exception = ExpectedException.none()",
"modifier": "@Rule\n\tpublic",
"original_string": "@Rule\n\tpublic ExpectedException exception = ExpectedException.none();",
"type": "ExpectedException",
"var_name": "exception"
}
],
"file": "library/src/te... | {
"body": "@Test\n\tpublic final void testContainsLettersNullParameter() {\n\t\t// Setup the resources for the test.\n\t\tString s = null;\n\t\texception.expect(NullPointerException.class);\n\t\texception.expectMessage(is(equalTo(\"Parameter cannot be null.\")));\n\t\t\n\t\t// Call the method under test.\n\t\tHexUtil... | {
"fields": [
{
"declarator": "HEXES = \"0123456789ABCDEF\"",
"modifier": "private static final",
"original_string": "private static final String HEXES = \"0123456789ABCDEF\";",
"type": "String",
"var_name": "HEXES"
},
{
"declarator": "HEX_HEADER = \"0x\"",
"modif... | {
"body": "public static boolean containsLetters(String parameter) {\n\t\tif (parameter == null)\n\t\t\tthrow new NullPointerException(\"Parameter cannot be null.\");\n\t\t\n\t\tbyte[] byteArray = parameter.getBytes();\n\t\tfor (int i = 0; i < byteArray.length; i++){\n\t\t\tif (!((byteArray[i] >= '0') && (byteArray[i... | {
"created": null,
"fork": null,
"fork_count": 54,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 21871478,
"size": 3156,
"stargazer_count": 76,
"stars": null,
"updates": null,
"url": "https://github.com/digidotcom/xbee-java"
} |
21871478_318 | {
"fields": [
{
"declarator": "exception = ExpectedException.none()",
"modifier": "@Rule\n\tpublic",
"original_string": "@Rule\n\tpublic ExpectedException exception = ExpectedException.none();",
"type": "ExpectedException",
"var_name": "exception"
}
],
"file": "library/src/te... | {
"body": "@Test\n\tpublic final void testGetRFDataNullData() {\n\t\t// Setup the resources for the test.\n\t\tbyte[] data = null;\n\t\tGenericXBeePacket packet = new GenericXBeePacket(data);\n\t\t\n\t\t// Call the method under test.\n\t\tbyte[] result = packet.getRFData();\n\t\t\n\t\t// Verify the result.\n\t\tasser... | {
"fields": [
{
"declarator": "MIN_API_PAYLOAD_LENGTH = 1",
"modifier": "private static final",
"original_string": "private static final int MIN_API_PAYLOAD_LENGTH = 1;",
"type": "int",
"var_name": "MIN_API_PAYLOAD_LENGTH"
},
{
"declarator": "rfData",
"modifier": ... | {
"body": "public byte[] getRFData() {\n\t\tif (rfData == null)\n\t\t\treturn null;\n\t\treturn Arrays.copyOf(rfData, rfData.length);\n\t}",
"class_method_signature": "GenericXBeePacket.getRFData()",
"constructor": false,
"full_signature": "public byte[] getRFData()",
"identifier": "getRFData",
"invocations... | {
"created": null,
"fork": null,
"fork_count": 54,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 21871478,
"size": 3156,
"stargazer_count": 76,
"stars": null,
"updates": null,
"url": "https://github.com/digidotcom/xbee-java"
} |
21871478_42 | {
"fields": [
{
"declarator": "exception = ExpectedException.none()",
"modifier": "@Rule\n\tpublic",
"original_string": "@Rule\n\tpublic ExpectedException exception = ExpectedException.none();",
"type": "ExpectedException",
"var_name": "exception"
}
],
"file": "library/src/te... | {
"body": "@Test\n\tpublic final void testCreatePacketPayloadNotIncludingFrameType() {\n\t\t// Setup the resources for the test.\n\t\tint frameID = 0xE7;\n\t\tXBee16BitAddress address = new XBee16BitAddress(\"B45C\");\n\t\tint retryCount = 3;\n\t\tint deliveryStatus = XBeeTransmitStatus.SUCCESS.getId();\n\t\tint disc... | {
"fields": [
{
"declarator": "MIN_API_PAYLOAD_LENGTH = 7",
"modifier": "private static final",
"original_string": "private static final int MIN_API_PAYLOAD_LENGTH = 7;",
"type": "int",
"var_name": "MIN_API_PAYLOAD_LENGTH"
},
{
"declarator": "destAddress16",
"modi... | {
"body": "public static TransmitStatusPacket createPacket(byte[] payload) {\n\t\tif (payload == null)\n\t\t\tthrow new NullPointerException(\"Transmit Status packet payload cannot be null.\");\n\t\t\n\t\t// 1 (Frame type) + 1 (frame ID) + 2 (16-bit address) + 1 (retry count) + 1 (delivery status) + 1 (discovery stat... | {
"created": null,
"fork": null,
"fork_count": 54,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 21871478,
"size": 3156,
"stargazer_count": 76,
"stars": null,
"updates": null,
"url": "https://github.com/digidotcom/xbee-java"
} |
21871478_174 | {
"fields": [
{
"declarator": "IPV6_ADDRESS = \"FDB3:0001:0002:0000:0004:0005:0006:0007\"",
"modifier": "private static final",
"original_string": "private static final String IPV6_ADDRESS = \"FDB3:0001:0002:0000:0004:0005:0006:0007\";",
"type": "String",
"var_name": "IPV6_ADDRESS"
... | {
"body": "@Test\n\tpublic final void testCreatePacketPayloadShorterThanNeeded() {\n\t\t// Set up the resources for the test.\n\t\tbyte[] payload = new byte[25];\n\t\tpayload[0] = (byte)frameType;\n\t\tpayload[1] = (byte)frameID;\n\t\tpayload[2] = (byte)options;\n\t\tpayload[3] = (byte)method.getValue();\n\t\tSystem.... | {
"fields": [
{
"declarator": "MIN_API_PAYLOAD_LENGTH = 26",
"modifier": "private static final",
"original_string": "private static final int MIN_API_PAYLOAD_LENGTH = 26;",
"type": "int",
"var_name": "MIN_API_PAYLOAD_LENGTH"
},
{
"declarator": "ERROR_PAYLOAD_NULL = \"Co... | {
"body": "public static CoAPTxRequestPacket createPacket(byte[] payload) {\n\t\tif (payload == null)\n\t\t\tthrow new NullPointerException(ERROR_PAYLOAD_NULL);\n\n\t\tif (payload.length < MIN_API_PAYLOAD_LENGTH)\n\t\t\tthrow new IllegalArgumentException(ERROR_INCOMPLETE_PACKET);\n\n\t\tif ((payload[0] & 0xFF) != API... | {
"created": null,
"fork": null,
"fork_count": 54,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 21871478,
"size": 3156,
"stargazer_count": 76,
"stars": null,
"updates": null,
"url": "https://github.com/digidotcom/xbee-java"
} |
21871478_524 | {
"fields": [
{
"declarator": "RECEIVED_BUFFER = \"Hello, this is the received data\".getBytes()",
"modifier": "private static final",
"original_string": "private static final byte[] RECEIVED_BUFFER = \"Hello, this is the received data\".getBytes();",
"type": "byte[]",
"var_name": "R... | {
"body": "@Test\n\tpublic final void testSetPortParametersNegativeBaudrate() throws InvalidConfigurationException, ConnectionException {\n\t\t// Setup the resources for the test.\n\t\tint baudrate = -115200;\n\t\tint dataBits = 7;\n\t\tint stopBits = 2;\n\t\tint parity = 1;\n\t\tint flowControl = 3;\n\t\tTestAbstrac... | {
"fields": [
{
"declarator": "DEFAULT_PORT_TIMEOUT = 10",
"modifier": "public static final",
"original_string": "public static final int DEFAULT_PORT_TIMEOUT = 10;",
"type": "int",
"var_name": "DEFAULT_PORT_TIMEOUT"
},
{
"declarator": "DEFAULT_DATA_BITS = 8",
"mo... | {
"body": "public void setPortParameters(int baudRate, int dataBits, int stopBits, int parity, int flowControl) throws InvalidConfigurationException, ConnectionException {\n\t\tSerialPortParameters parameters = new SerialPortParameters(baudRate, dataBits, stopBits, parity, flowControl);\n\t\tsetPortParameters(paramet... | {
"created": null,
"fork": null,
"fork_count": 54,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 21871478,
"size": 3156,
"stargazer_count": 76,
"stars": null,
"updates": null,
"url": "https://github.com/digidotcom/xbee-java"
} |
21871478_461 | {
"fields": [
{
"declarator": "exception = ExpectedException.none()",
"modifier": "@Rule\n\tpublic",
"original_string": "@Rule\n\tpublic ExpectedException exception = ExpectedException.none();",
"type": "ExpectedException",
"var_name": "exception"
}
],
"file": "library/src/te... | {
"body": "@Test\n\tpublic final void testCreatePacketEmptyPayload() {\n\t\t// Setup the resources for the test.\n\t\tbyte[] payload = new byte[0];\n\t\texception.expect(IllegalArgumentException.class);\n\t\texception.expectMessage(is(equalTo(\"Incomplete RX16 packet.\")));\n\t\t\n\t\t// Call the method under test th... | {
"fields": [
{
"declarator": "MIN_API_PAYLOAD_LENGTH = 5",
"modifier": "private static final",
"original_string": "private static final int MIN_API_PAYLOAD_LENGTH = 5;",
"type": "int",
"var_name": "MIN_API_PAYLOAD_LENGTH"
},
{
"declarator": "sourceAddress16",
"mo... | {
"body": "public static RX16Packet createPacket(byte[] payload) {\n\t\tif (payload == null)\n\t\t\tthrow new NullPointerException(\"RX16 packet payload cannot be null.\");\n\t\t\n\t\t// 1 (Frame type) + 2 (16-bit address) + 1 (signal strength) + 1 (receive options)\n\t\tif (payload.length < MIN_API_PAYLOAD_LENGTH)\n... | {
"created": null,
"fork": null,
"fork_count": 54,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 21871478,
"size": 3156,
"stargazer_count": 76,
"stars": null,
"updates": null,
"url": "https://github.com/digidotcom/xbee-java"
} |
21871478_15 | {
"fields": [
{
"declarator": "exception = ExpectedException.none()",
"modifier": "@Rule\n\tpublic",
"original_string": "@Rule\n\tpublic ExpectedException exception = ExpectedException.none();",
"type": "ExpectedException",
"var_name": "exception"
}
],
"file": "library/src/te... | {
"body": "@Test\n\tpublic final void testSetFrameIDNegative() {\n\t\t// Setup the resources for the test.\n\t\tint frameID = -1;\n\t\tTestXBeeAPIPacket packet = new TestXBeeAPIPacket(APIFrameType.GENERIC);\n\t\t\n\t\texception.expect(IllegalArgumentException.class);\n\t\texception.expectMessage(is(equalTo(\"Frame ID... | {
"fields": [
{
"declarator": "NO_FRAME_ID = 9999",
"modifier": "public final static",
"original_string": "public final static int NO_FRAME_ID = 9999;",
"type": "int",
"var_name": "NO_FRAME_ID"
},
{
"declarator": "frameID = NO_FRAME_ID",
"modifier": "protected",
... | {
"body": "public void setFrameID(int frameID) {\n\t\tif (frameID < 0 || frameID > 255)\n\t\t\tthrow new IllegalArgumentException(\"Frame ID must be between 0 and 255.\");\n\t\t\n\t\tif (needsAPIFrameID())\n\t\t\tthis.frameID = frameID;\n\t}",
"class_method_signature": "XBeeAPIPacket.setFrameID(int frameID)",
"co... | {
"created": null,
"fork": null,
"fork_count": 54,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 21871478,
"size": 3156,
"stargazer_count": 76,
"stars": null,
"updates": null,
"url": "https://github.com/digidotcom/xbee-java"
} |
21871478_573 | {
"fields": [
{
"declarator": "INVALID_IO_DATA = new byte[]{0x00, 0x01, 0x02, 0x03}",
"modifier": "private static final",
"original_string": "private static final byte[] INVALID_IO_DATA = new byte[]{0x00, 0x01, 0x02, 0x03};",
"type": "byte[]",
"var_name": "INVALID_IO_DATA"
},
... | {
"body": "@Test\n\tpublic void testToString() throws OperationNotSupportedException {\n\t\tIOSample[] samples = new IOSample[] {new IOSample(IO_DATA_ONLY_DIGITAL), \n\t\t\t\tnew IOSample(IO_DATA_ONLY_ANALOG), \n\t\t\t\tnew IOSample(IO_DATA_MIXED)};\n\t\tfor (IOSample s:samples) {\n\t\t\tString result = s.toString();... | {
"fields": [
{
"declarator": "ioSamplePayload",
"modifier": "private final",
"original_string": "private final byte[] ioSamplePayload;",
"type": "byte[]",
"var_name": "ioSamplePayload"
},
{
"declarator": "rawMask",
"modifier": "private",
"original_string": ... | {
"body": "@Override\n\tpublic String toString() {\n\t\tStringBuilder sb = new StringBuilder(\"{\");\n\t\tif (hasDigitalValues()) {\n\t\t\tfor (IOLine line : digitalValuesMap.keySet()) {\n\t\t\t\tsb.append(\"[\").append(line).append(\": \").append(digitalValuesMap.get(line)).append(\"], \");\n\t\t\t}\n\t\t}\n\t\tif (... | {
"created": null,
"fork": null,
"fork_count": 54,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 21871478,
"size": 3156,
"stargazer_count": 76,
"stars": null,
"updates": null,
"url": "https://github.com/digidotcom/xbee-java"
} |
21871478_123 | {
"fields": [
{
"declarator": "exception = ExpectedException.none()",
"modifier": "@Rule\n\tpublic",
"original_string": "@Rule\n\tpublic ExpectedException exception = ExpectedException.none();",
"type": "ExpectedException",
"var_name": "exception"
}
],
"file": "library/src/te... | {
"body": "@Test\n\tpublic final void testCreatePacketEmptyPayload() {\n\t\t// Setup the resources for the test.\n\t\tbyte[] payload = new byte[0];\n\t\texception.expect(IllegalArgumentException.class);\n\t\texception.expectMessage(is(equalTo(\"Incomplete Remote AT Command Response packet.\")));\n\t\t\n\t\t// Call th... | {
"fields": [
{
"declarator": "MIN_API_PAYLOAD_LENGTH = 15",
"modifier": "private static final",
"original_string": "private static final int MIN_API_PAYLOAD_LENGTH = 15;",
"type": "int",
"var_name": "MIN_API_PAYLOAD_LENGTH"
},
{
"declarator": "sourceAddress64",
"... | {
"body": "public static RemoteATCommandResponsePacket createPacket(byte[] payload) {\n\t\tif (payload == null)\n\t\t\tthrow new NullPointerException(\"Remote AT Command Response packet payload cannot be null.\");\n\t\t\n\t\t// 1 (Frame type) + 1 (frame ID) + 8 (32-bit address) + 2 (16-bit address) + 2 (AT command) +... | {
"created": null,
"fork": null,
"fork_count": 54,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 21871478,
"size": 3156,
"stargazer_count": 76,
"stars": null,
"updates": null,
"url": "https://github.com/digidotcom/xbee-java"
} |
21871478_436 | {
"fields": [
{
"declarator": "exception = ExpectedException.none()",
"modifier": "@Rule\n\tpublic",
"original_string": "@Rule\n\tpublic ExpectedException exception = ExpectedException.none();",
"type": "ExpectedException",
"var_name": "exception"
}
],
"file": "library/src/te... | {
"body": "@Test\n\tpublic final void testIsBroadcastWithNonBroadcastDestinationAddress() {\n\t\t// Setup the resources for the test.\n\t\tint frameID = 0x65;\n\t\tXBee16BitAddress dest16Addr = new XBee16BitAddress(\"D817\");\n\t\tint options = 40; /* bit 1 */\n\t\tbyte[] data = new byte[]{0x68, 0x6F, 0x6C, 0x61};\n\... | {
"fields": [
{
"declarator": "MIN_API_PAYLOAD_LENGTH = 5",
"modifier": "private static final",
"original_string": "private static final int MIN_API_PAYLOAD_LENGTH = 5;",
"type": "int",
"var_name": "MIN_API_PAYLOAD_LENGTH"
},
{
"declarator": "transmitOptions",
"mo... | {
"body": "@Override\n\tpublic boolean isBroadcast() {\n\t\treturn get16bitDestinationAddress().equals(XBee16BitAddress.BROADCAST_ADDRESS);\n\t}",
"class_method_signature": "TX16Packet.isBroadcast()",
"constructor": false,
"full_signature": "@Override public boolean isBroadcast()",
"identifier": "isBroadcast"... | {
"created": null,
"fork": null,
"fork_count": 54,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 21871478,
"size": 3156,
"stargazer_count": 76,
"stars": null,
"updates": null,
"url": "https://github.com/digidotcom/xbee-java"
} |
21871478_271 | {
"fields": [
{
"declarator": "frameType = APIFrameType.SEND_DATA_RESPONSE.getValue()",
"modifier": "private",
"original_string": "private int frameType = APIFrameType.SEND_DATA_RESPONSE.getValue();",
"type": "int",
"var_name": "frameType"
},
{
"declarator": "frameID = ... | {
"body": "@Test\n\tpublic final void testSetStatusNull() {\n\t\t// Set up the resources for the test.\n\t\tSendDataResponsePacket packet = new SendDataResponsePacket(frameID, status);\n\n\t\tstatus = null;\n\n\t\texception.expect(NullPointerException.class);\n\t\texception.expectMessage(is(equalTo(\"Status cannot be... | {
"fields": [
{
"declarator": "MIN_API_PAYLOAD_LENGTH = 3",
"modifier": "private static final",
"original_string": "private static final int MIN_API_PAYLOAD_LENGTH = 3;",
"type": "int",
"var_name": "MIN_API_PAYLOAD_LENGTH"
},
{
"declarator": "ERROR_PAYLOAD_NULL = \"Send... | {
"body": "public void setStatus(DeviceCloudStatus status) {\n\t\tif (status == null)\n\t\t\tthrow new NullPointerException(ERROR_STATUS_NULL);\n\n\t\tthis.status = status;\n\t}",
"class_method_signature": "SendDataResponsePacket.setStatus(DeviceCloudStatus status)",
"constructor": false,
"full_signature": "pub... | {
"created": null,
"fork": null,
"fork_count": 54,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 21871478,
"size": 3156,
"stargazer_count": 76,
"stars": null,
"updates": null,
"url": "https://github.com/digidotcom/xbee-java"
} |
21871478_621 | {
"fields": [],
"file": "library/src/test/java/com/digi/xbee/api/exceptions/ATCommandExceptionTest.java",
"identifier": "ATCommandExceptionTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n\tpublic final void testGetCommandStatusNull() {\n\t\t// Setup the resources for the test.\n\t\tATCommandStatus atCommandStatus = null;\n\t\tATCommandException e = new ATCommandException(atCommandStatus);\n\t\t\n\t\t// Call the method under test.\n\t\tATCommandStatus result = e.getCommandStatus();\n... | {
"fields": [
{
"declarator": "serialVersionUID = 1L",
"modifier": "private static final",
"original_string": "private static final long serialVersionUID = 1L;",
"type": "long",
"var_name": "serialVersionUID"
},
{
"declarator": "DEFAULT_MESSAGE = \"There was a problem s... | {
"body": "public ATCommandStatus getCommandStatus() {\n\t\treturn atCommandStatus;\n\t}",
"class_method_signature": "ATCommandException.getCommandStatus()",
"constructor": false,
"full_signature": "public ATCommandStatus getCommandStatus()",
"identifier": "getCommandStatus",
"invocations": [],
"modifiers... | {
"created": null,
"fork": null,
"fork_count": 54,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 21871478,
"size": 3156,
"stargazer_count": 76,
"stars": null,
"updates": null,
"url": "https://github.com/digidotcom/xbee-java"
} |
21871478_81 | {
"fields": [
{
"declarator": "exception = ExpectedException.none()",
"modifier": "@Rule\n\tpublic",
"original_string": "@Rule\n\tpublic ExpectedException exception = ExpectedException.none();",
"type": "ExpectedException",
"var_name": "exception"
}
],
"file": "library/src/te... | {
"body": "@Test\n\tpublic final void testGetParameter() {\n\t\t// Setup the resources for the test.\n\t\tint frameID = 0x10;\n\t\tString command = \"NI\";\n\t\tString parameterToSet = \"newNIValue\";\n\t\tATCommandQueuePacket packet = new ATCommandQueuePacket(frameID, command, parameterToSet);\n\t\t\n\t\t// Call the... | {
"fields": [
{
"declarator": "MIN_API_PAYLOAD_LENGTH = 4",
"modifier": "private static final",
"original_string": "private static final int MIN_API_PAYLOAD_LENGTH = 4;",
"type": "int",
"var_name": "MIN_API_PAYLOAD_LENGTH"
},
{
"declarator": "command",
"modifier":... | {
"body": "public byte[] getParameter() {\n\t\treturn parameter;\n\t}",
"class_method_signature": "ATCommandQueuePacket.getParameter()",
"constructor": false,
"full_signature": "public byte[] getParameter()",
"identifier": "getParameter",
"invocations": [],
"modifiers": "public",
"parameters": "()",
"... | {
"created": null,
"fork": null,
"fork_count": 54,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 21871478,
"size": 3156,
"stargazer_count": 76,
"stars": null,
"updates": null,
"url": "https://github.com/digidotcom/xbee-java"
} |
21871478_334 | {
"fields": [
{
"declarator": "IP_ADDRESS = \"10.10.11.12\"",
"modifier": "private static final",
"original_string": "private static final String IP_ADDRESS = \"10.10.11.12\";",
"type": "String",
"var_name": "IP_ADDRESS"
},
{
"declarator": "frameType = APIFrameType.RX_I... | {
"body": "@Test\n\tpublic final void testCreatePacketNullPayload() {\n\t\t// Set up the resources for the test.\n\t\tbyte[] payload = null;\n\t\texception.expect(NullPointerException.class);\n\t\texception.expectMessage(is(equalTo(\"RX IPv4 packet payload cannot be null.\")));\n\n\t\t// Call the method under test th... | {
"fields": [
{
"declarator": "MIN_API_PAYLOAD_LENGTH = 11",
"modifier": "private static final",
"original_string": "private static final int MIN_API_PAYLOAD_LENGTH = 11;",
"type": "int",
"var_name": "MIN_API_PAYLOAD_LENGTH"
},
{
"declarator": "ERROR_PAYLOAD_NULL = \"RX... | {
"body": "public static RXIPv4Packet createPacket(byte[] payload) {\n\t\tif (payload == null)\n\t\t\tthrow new NullPointerException(ERROR_PAYLOAD_NULL);\n\n\t\tif (payload.length < MIN_API_PAYLOAD_LENGTH)\n\t\t\tthrow new IllegalArgumentException(ERROR_INCOMPLETE_PACKET);\n\n\t\tif ((payload[0] & 0xFF) != APIFrameTy... | {
"created": null,
"fork": null,
"fork_count": 54,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 21871478,
"size": 3156,
"stargazer_count": 76,
"stars": null,
"updates": null,
"url": "https://github.com/digidotcom/xbee-java"
} |
21871478_764 | {
"fields": [
{
"declarator": "exception = ExpectedException.none()",
"modifier": "@Rule\n\tpublic",
"original_string": "@Rule\n\tpublic ExpectedException exception = ExpectedException.none();",
"type": "ExpectedException",
"var_name": "exception"
},
{
"declarator": "nb... | {
"body": "@Test\n\tpublic void testNotNBIoTDevice() throws Exception {\n\t\t// Suppress the 'readDeviceInfo' method of the parent class so that it is not\n\t\t// called from the child (NBIoTDevice) class.\n\t\tPowerMockito.suppress(PowerMockito.method(CellularDevice.class, \"open\"));\n\t\t\n\t\texception.expect(XBe... | {
"fields": [],
"file": "library/src/main/java/com/digi/xbee/api/NBIoTDevice.java",
"identifier": "NBIoTDevice",
"interfaces": "",
"methods": [
{
"class_method_signature": "NBIoTDevice.NBIoTDevice(String port, int baudRate)",
"constructor": true,
"full_signature": "public NBIoTDevice(St... | {
"body": "@Override\n\tpublic void open() throws XBeeException {\n\t\tsuper.open();\n\t\tif (xbeeProtocol != XBeeProtocol.CELLULAR_NBIOT)\n\t\t\tthrow new XBeeDeviceException(\"XBee device is not a \" + getXBeeProtocol().getDescription() + \n\t\t\t\t\t\" device, it is a \" + xbeeProtocol.getDescription() + \" device... | {
"created": null,
"fork": null,
"fork_count": 54,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 21871478,
"size": 3156,
"stargazer_count": 76,
"stars": null,
"updates": null,
"url": "https://github.com/digidotcom/xbee-java"
} |
21871478_508 | {
"fields": [
{
"declarator": "exception = ExpectedException.none()",
"modifier": "@Rule\n\tpublic",
"original_string": "@Rule\n\tpublic ExpectedException exception = ExpectedException.none();",
"type": "ExpectedException",
"var_name": "exception"
}
],
"file": "library/src/te... | {
"body": "@Test\n\tpublic final void testEqualsWithDifferentBaudrates() {\n\t\t// Setup the resources for the test.\n\t\tSerialPortParameters parameters1 = new SerialPortParameters(9600, 8, 1, 0, 0);\n\t\tSerialPortParameters parameters2 = new SerialPortParameters(115200, 8, 1, 0, 0);\n\t\t\n\t\t// Call the method u... | {
"fields": [
{
"declarator": "HASH_SEED = 23",
"modifier": "private static final",
"original_string": "private static final int HASH_SEED = 23;",
"type": "int",
"var_name": "HASH_SEED"
},
{
"declarator": "baudrate",
"modifier": "public final",
"original_str... | {
"body": "@Override\n\tpublic boolean equals(Object obj) {\n\t\tif (obj instanceof SerialPortParameters)\n\t\t\treturn ((SerialPortParameters)obj).baudrate == baudrate \n\t\t\t\t&& ((SerialPortParameters)obj).dataBits == dataBits \n\t\t\t\t&& ((SerialPortParameters)obj).stopBits == stopBits\n\t\t\t\t&& ((SerialPortP... | {
"created": null,
"fork": null,
"fork_count": 54,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 21871478,
"size": 3156,
"stargazer_count": 76,
"stars": null,
"updates": null,
"url": "https://github.com/digidotcom/xbee-java"
} |
21871478_158 | {
"fields": [
{
"declarator": "exception = ExpectedException.none()",
"modifier": "@Rule\n\tpublic",
"original_string": "@Rule\n\tpublic ExpectedException exception = ExpectedException.none();",
"type": "ExpectedException",
"var_name": "exception"
}
],
"file": "library/src/te... | {
"body": "@Test\n\tpublic final void testGetCommandValueAsStringNullValue() {\n\t\t// Setup the resources for the test.\n\t\tint frameID = 0x10;\n\t\tString command = \"NI\";\n\t\tATCommandStatus status = ATCommandStatus.UNKNOWN;\n\t\tATCommandResponsePacket packet = new ATCommandResponsePacket(frameID, status, comm... | {
"fields": [
{
"declarator": "MIN_API_PAYLOAD_LENGTH = 5",
"modifier": "private static final",
"original_string": "private static final int MIN_API_PAYLOAD_LENGTH = 5;",
"type": "int",
"var_name": "MIN_API_PAYLOAD_LENGTH"
},
{
"declarator": "status",
"modifier": ... | {
"body": "public String getCommandValueAsString() {\n\t\tif (commandValue == null)\n\t\t\treturn null;\n\t\treturn new String(commandValue);\n\t}",
"class_method_signature": "ATCommandResponsePacket.getCommandValueAsString()",
"constructor": false,
"full_signature": "public String getCommandValueAsString()",
... | {
"created": null,
"fork": null,
"fork_count": 54,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 21871478,
"size": 3156,
"stargazer_count": 76,
"stars": null,
"updates": null,
"url": "https://github.com/digidotcom/xbee-java"
} |
21871478_39 | {
"fields": [
{
"declarator": "exception = ExpectedException.none()",
"modifier": "@Rule\n\tpublic",
"original_string": "@Rule\n\tpublic ExpectedException exception = ExpectedException.none();",
"type": "ExpectedException",
"var_name": "exception"
}
],
"file": "library/src/te... | {
"body": "@Test\n\tpublic final void testCreatePacketNullPayload() {\n\t\t// Setup the resources for the test.\n\t\tbyte[] payload = null;\n\t\texception.expect(NullPointerException.class);\n\t\texception.expectMessage(is(equalTo(\"Transmit Status packet payload cannot be null.\")));\n\t\t\n\t\t// Call the method un... | {
"fields": [
{
"declarator": "MIN_API_PAYLOAD_LENGTH = 7",
"modifier": "private static final",
"original_string": "private static final int MIN_API_PAYLOAD_LENGTH = 7;",
"type": "int",
"var_name": "MIN_API_PAYLOAD_LENGTH"
},
{
"declarator": "destAddress16",
"modi... | {
"body": "public static TransmitStatusPacket createPacket(byte[] payload) {\n\t\tif (payload == null)\n\t\t\tthrow new NullPointerException(\"Transmit Status packet payload cannot be null.\");\n\t\t\n\t\t// 1 (Frame type) + 1 (frame ID) + 2 (16-bit address) + 1 (retry count) + 1 (delivery status) + 1 (discovery stat... | {
"created": null,
"fork": null,
"fork_count": 54,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 21871478,
"size": 3156,
"stargazer_count": 76,
"stars": null,
"updates": null,
"url": "https://github.com/digidotcom/xbee-java"
} |
21871478_676 | {
"fields": [
{
"declarator": "PARAMETER_MY = \"MY\"",
"modifier": "private static final",
"original_string": "private static final String PARAMETER_MY = \"MY\";",
"type": "String",
"var_name": "PARAMETER_MY"
},
{
"declarator": "PARAMETER_C0 = \"C0\"",
"modifier":... | {
"body": "@SuppressWarnings(\"deprecation\")\n\t@Test\n\tpublic void testNotSupportedOperationSendData() throws Exception {\n\t\texception.expect(UnsupportedOperationException.class);\n\t\texception.expectMessage(is(equalTo(\"Operation not supported in this module.\")));\n\t\t\n\t\t// All the following operations sh... | {
"fields": [
{
"declarator": "BROADCAST_IP = \"255.255.255.255\"",
"modifier": "public static final",
"original_string": "public static final String BROADCAST_IP = \"255.255.255.255\";",
"type": "String",
"var_name": "BROADCAST_IP"
},
{
"declarator": "OPERATION_EXCEPTI... | {
"body": "@Override\n\tpublic void sendData(RemoteXBeeDevice remoteXBeeDevice, byte[] data)\n\t\t\tthrows TimeoutException, XBeeException {\n\t\t// Not supported in IP modules.\n\t\tthrow new UnsupportedOperationException(OPERATION_EXCEPTION);\n\t}",
"class_method_signature": "IPDevice.sendData(RemoteXBeeDevice re... | {
"created": null,
"fork": null,
"fork_count": 54,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 21871478,
"size": 3156,
"stargazer_count": 76,
"stars": null,
"updates": null,
"url": "https://github.com/digidotcom/xbee-java"
} |
21871478_226 | {
"fields": [
{
"declarator": "IPV6_SRC_ADDRESS = \"FDB3:0001:0002:0000:0004:0005:0006:0007\"",
"modifier": "private static final",
"original_string": "private static final String IPV6_SRC_ADDRESS = \"FDB3:0001:0002:0000:0004:0005:0006:0007\";",
"type": "String",
"var_name": "IPV6_SR... | {
"body": "@Test\n\tpublic final void testCreatePacketEmptyPayload() {\n\t\t// Set up the resources for the test.\n\t\tbyte[] payload = new byte[0];\n\t\texception.expect(IllegalArgumentException.class);\n\t\texception.expectMessage(is(equalTo(\"Incomplete RX IPv6 packet.\")));\n\n\t\t// Call the method under test th... | {
"fields": [
{
"declarator": "MIN_API_PAYLOAD_LENGTH = 39",
"modifier": "private static final",
"original_string": "private static final int MIN_API_PAYLOAD_LENGTH = 39;",
"type": "int",
"var_name": "MIN_API_PAYLOAD_LENGTH"
},
{
"declarator": "ERROR_PAYLOAD_NULL = \"RX... | {
"body": "public static RXIPv6Packet createPacket(byte[] payload) {\n\t\tif (payload == null)\n\t\t\tthrow new NullPointerException(ERROR_PAYLOAD_NULL);\n\n\t\tif (payload.length < MIN_API_PAYLOAD_LENGTH)\n\t\t\tthrow new IllegalArgumentException(ERROR_INCOMPLETE_PACKET);\n\n\t\tif ((payload[0] & 0xFF) != APIFrameTy... | {
"created": null,
"fork": null,
"fork_count": 54,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 21871478,
"size": 3156,
"stargazer_count": 76,
"stars": null,
"updates": null,
"url": "https://github.com/digidotcom/xbee-java"
} |
21871478_733 | {
"fields": [
{
"declarator": "exception = ExpectedException.none()",
"modifier": "@Rule\n\tpublic",
"original_string": "@Rule\n\tpublic ExpectedException exception = ExpectedException.none();",
"type": "ExpectedException",
"var_name": "exception"
}
],
"file": "library/src/te... | {
"body": "@Test\n\tpublic final void testNewByteArrayNegativeSize() {\n\t\t// Setup the resources for the test.\n\t\texception.expect(IllegalArgumentException.class);\n\t\texception.expectMessage(is(equalTo(\"Final size must be equal or greater than 0.\")));\n\t\t\n\t\t// Call the method under test.\n\t\tByteUtils.n... | {
"fields": [],
"file": "library/src/main/java/com/digi/xbee/api/utils/ByteUtils.java",
"identifier": "ByteUtils",
"interfaces": "",
"methods": [
{
"class_method_signature": "ByteUtils.readBytes(int numBytes, ByteArrayInputStream inputStream)",
"constructor": false,
"full_signature": "pu... | {
"body": "public static byte[] newByteArray(byte[] data, int finalSize) {\n\t\tif (data == null)\n\t\t\tthrow new NullPointerException(\"Data cannot be null.\");\n\t\tif (finalSize < 0)\n\t\t\tthrow new IllegalArgumentException(\"Final size must be equal or greater than 0.\");\n\t\t\n\t\tif (finalSize == 0)\n\t\t\tr... | {
"created": null,
"fork": null,
"fork_count": 54,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 21871478,
"size": 3156,
"stargazer_count": 76,
"stars": null,
"updates": null,
"url": "https://github.com/digidotcom/xbee-java"
} |
21871478_363 | {
"fields": [
{
"declarator": "frameType = APIFrameType.RX_SMS.getValue()",
"modifier": "private",
"original_string": "private int frameType = APIFrameType.RX_SMS.getValue();",
"type": "int",
"var_name": "frameType"
},
{
"declarator": "phoneNumber = \"555203203\"",
... | {
"body": "@Test\n\tpublic final void testIsBroadcast() {\n\t\t// Set up the resources for the test.\n\t\tRXSMSPacket packet = new RXSMSPacket(phoneNumber, data);\n\n\t\t// Call the method under test and verify the result.\n\t\tassertThat(\"Packet should not be broadcast\", packet.isBroadcast(), is(equalTo(false)));\... | {
"fields": [
{
"declarator": "MIN_API_PAYLOAD_LENGTH = 1 /* (Frame type) */ + TXSMSPacket.PHONE_NUMBER_LENGTH",
"modifier": "private static final",
"original_string": "private static final int MIN_API_PAYLOAD_LENGTH = 1 /* (Frame type) */ + TXSMSPacket.PHONE_NUMBER_LENGTH;",
"type": "int"... | {
"body": "@Override\n\tpublic boolean isBroadcast() {\n\t\treturn false;\n\t}",
"class_method_signature": "RXSMSPacket.isBroadcast()",
"constructor": false,
"full_signature": "@Override public boolean isBroadcast()",
"identifier": "isBroadcast",
"invocations": [],
"modifiers": "@Override public",
"para... | {
"created": null,
"fork": null,
"fork_count": 54,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 21871478,
"size": 3156,
"stargazer_count": 76,
"stars": null,
"updates": null,
"url": "https://github.com/digidotcom/xbee-java"
} |
21871478_699 | {
"fields": [
{
"declarator": "exception = ExpectedException.none()",
"modifier": "@Rule\n\tpublic",
"original_string": "@Rule\n\tpublic ExpectedException exception = ExpectedException.none();",
"type": "ExpectedException",
"var_name": "exception"
}
],
"file": "library/src/te... | {
"body": "@Test\n\tpublic final void testByteArrayToInt4Bytes() {\n\t\t// Setup the resources for the test.\n\t\tbyte[] byteArray = new byte[]{0x12, 0x34, (byte)0x85, (byte)0x96};\n\t\tint expectedResult = 0x12348596;\n\t\t\n\t\t// Call the method under test.\n\t\tint result = ByteUtils.byteArrayToInt(byteArray);\n\... | {
"fields": [],
"file": "library/src/main/java/com/digi/xbee/api/utils/ByteUtils.java",
"identifier": "ByteUtils",
"interfaces": "",
"methods": [
{
"class_method_signature": "ByteUtils.readBytes(int numBytes, ByteArrayInputStream inputStream)",
"constructor": false,
"full_signature": "pu... | {
"body": "public static int byteArrayToInt(byte[] byteArray) {\n\t\tif (byteArray == null)\n\t\t\tthrow new NullPointerException(\"Byte array cannot be null.\");\n\t\t\n\t\tif (byteArray.length == 0)\n\t\t\treturn 0;\n\t\t\n\t\tbyte[] values = byteArray;\n\t\tif (byteArray.length < 4) {\n\t\t\tvalues = new byte[4];\... | {
"created": null,
"fork": null,
"fork_count": 54,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 21871478,
"size": 3156,
"stargazer_count": 76,
"stars": null,
"updates": null,
"url": "https://github.com/digidotcom/xbee-java"
} |
21871478_230 | {
"fields": [
{
"declarator": "IPV6_SRC_ADDRESS = \"FDB3:0001:0002:0000:0004:0005:0006:0007\"",
"modifier": "private static final",
"original_string": "private static final String IPV6_SRC_ADDRESS = \"FDB3:0001:0002:0000:0004:0005:0006:0007\";",
"type": "String",
"var_name": "IPV6_SR... | {
"body": "@Test\n\tpublic final void testGetAPIPacketParametersReceivedDataNull() {\n\t\t// Set up the resources for the test.\n\t\tdata = null;\n\n\t\tRXIPv6Packet packet = new RXIPv6Packet(destAddress, sourceAddress, destPort, sourcePort, protocol, data);\n\n\t\t// Call the method under test.\n\t\tLinkedHashMap<St... | {
"fields": [
{
"declarator": "MIN_API_PAYLOAD_LENGTH = 39",
"modifier": "private static final",
"original_string": "private static final int MIN_API_PAYLOAD_LENGTH = 39;",
"type": "int",
"var_name": "MIN_API_PAYLOAD_LENGTH"
},
{
"declarator": "ERROR_PAYLOAD_NULL = \"RX... | {
"body": "@Override\n\tpublic LinkedHashMap<String, String> getAPIPacketParameters() {\n\t\tLinkedHashMap<String, String> parameters = new LinkedHashMap<String, String>();\n\t\tparameters.put(\"Destination address\", HexUtils.prettyHexString(destAddress.getAddress()) + \" (\" + destAddress.getHostAddress() + \")\");... | {
"created": null,
"fork": null,
"fork_count": 54,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 21871478,
"size": 3156,
"stargazer_count": 76,
"stars": null,
"updates": null,
"url": "https://github.com/digidotcom/xbee-java"
} |
21871478_660 | {
"fields": [
{
"declarator": "PARAMETER_MY = \"MY\"",
"modifier": "private static final",
"original_string": "private static final String PARAMETER_MY = \"MY\";",
"type": "String",
"var_name": "PARAMETER_MY"
},
{
"declarator": "PARAMETER_C0 = \"C0\"",
"modifier":... | {
"body": "@Test\n\tpublic void testStartListeningSuccess() throws TimeoutException, XBeeException {\n\t\tint newSourcePort = 123;\n\t\t// Do nothing when setting any parameter.\n\t\tMockito.doNothing().when(ipDevice).setParameter(Mockito.anyString(), Mockito.any(byte[].class));\n\t\t\n\t\tipDevice.startListening(new... | {
"fields": [
{
"declarator": "BROADCAST_IP = \"255.255.255.255\"",
"modifier": "public static final",
"original_string": "public static final String BROADCAST_IP = \"255.255.255.255\";",
"type": "String",
"var_name": "BROADCAST_IP"
},
{
"declarator": "OPERATION_EXCEPTI... | {
"body": "public void startListening(int sourcePort) throws TimeoutException, XBeeException {\n\t\tif (sourcePort < 0 || sourcePort > 65535)\n\t\t\tthrow new IllegalArgumentException(\"Source port must be between 0 and 65535.\");\n\t\t\n\t\tsetParameter(\"C0\", ByteUtils.shortToByteArray((short)sourcePort));\n\t\tth... | {
"created": null,
"fork": null,
"fork_count": 54,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 21871478,
"size": 3156,
"stargazer_count": 76,
"stars": null,
"updates": null,
"url": "https://github.com/digidotcom/xbee-java"
} |
21871478_375 | {
"fields": [
{
"declarator": "IP_ADDRESS = \"10.10.11.12\"",
"modifier": "private static final",
"original_string": "private static final String IP_ADDRESS = \"10.10.11.12\";",
"type": "String",
"var_name": "IP_ADDRESS"
},
{
"declarator": "frameType = APIFrameType.IO_D... | {
"body": "@Test\n\tpublic final void testSetRSSIBiggerThan255() {\n\t\t// Set up the resources for the test.\n\t\tIODataSampleRxIndicatorWifiPacket packet = new IODataSampleRxIndicatorWifiPacket(sourceAddress, rssi, receiveOptions, data);\n\n\t\trssi = 256;\n\n\t\texception.expect(IllegalArgumentException.class);\n\... | {
"fields": [
{
"declarator": "MIN_API_PAYLOAD_LENGTH = 11",
"modifier": "private static final",
"original_string": "private static final int MIN_API_PAYLOAD_LENGTH = 11;",
"type": "int",
"var_name": "MIN_API_PAYLOAD_LENGTH"
},
{
"declarator": "ERROR_PAYLOAD_NULL = \"IO... | {
"body": "public void setRSSI(int rssi) {\n\t\tif (rssi < 0 || rssi > 255)\n\t\t\tthrow new IllegalArgumentException(ERROR_RSSI_ILLEGAL);\n\n\t\tthis.rssi = rssi;\n\t}",
"class_method_signature": "IODataSampleRxIndicatorWifiPacket.setRSSI(int rssi)",
"constructor": false,
"full_signature": "public void setRSSI... | {
"created": null,
"fork": null,
"fork_count": 54,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 21871478,
"size": 3156,
"stargazer_count": 76,
"stars": null,
"updates": null,
"url": "https://github.com/digidotcom/xbee-java"
} |
21871478_725 | {
"fields": [
{
"declarator": "exception = ExpectedException.none()",
"modifier": "@Rule\n\tpublic",
"original_string": "@Rule\n\tpublic ExpectedException exception = ExpectedException.none();",
"type": "ExpectedException",
"var_name": "exception"
}
],
"file": "library/src/te... | {
"body": "@Test\n\tpublic final void testReadBooleanFromByteOffsetBiggerThan7() {\n\t\t// Setup the resources for the test.\n\t\texception.expect(IllegalArgumentException.class);\n\t\texception.expectMessage(is(equalTo(\"Bit offset must be between 0 and 7.\")));\n\t\t\n\t\t// Call the method under test.\n\t\tByteUti... | {
"fields": [],
"file": "library/src/main/java/com/digi/xbee/api/utils/ByteUtils.java",
"identifier": "ByteUtils",
"interfaces": "",
"methods": [
{
"class_method_signature": "ByteUtils.readBytes(int numBytes, ByteArrayInputStream inputStream)",
"constructor": false,
"full_signature": "pu... | {
"body": "public static boolean readBooleanFromByte(byte containerByte, int bitOffset) {\n\t\tif (bitOffset < 0 || bitOffset > 31)\n\t\t\tthrow new IllegalArgumentException(\"Bit offset must be between 0 and 7.\");\n\t\t\n\t\treturn isBitEnabled(containerByte, bitOffset);\n\t}",
"class_method_signature": "ByteUtil... | {
"created": null,
"fork": null,
"fork_count": 54,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 21871478,
"size": 3156,
"stargazer_count": 76,
"stars": null,
"updates": null,
"url": "https://github.com/digidotcom/xbee-java"
} |
21871478_549 | {
"fields": [
{
"declarator": "RECEIVED_BUFFER = \"Hello, this is the received data\".getBytes()",
"modifier": "private static final",
"original_string": "private static final byte[] RECEIVED_BUFFER = \"Hello, this is the received data\".getBytes();",
"type": "byte[]",
"var_name": "R... | {
"body": "@Test\n\tpublic final void testReadDataByteArray() throws IOException {\n\t\t// Setup the resources for the test.\n\t\tTestAbstractSerialPort port = Mockito.spy(new TestAbstractSerialPort(\"COM1\", 9600));\n\t\tbyte[] data = new byte[10];\n\t\t\n\t\t// Call the method under test.\n\t\tint nBytes = port.rea... | {
"fields": [
{
"declarator": "DEFAULT_PORT_TIMEOUT = 10",
"modifier": "public static final",
"original_string": "public static final int DEFAULT_PORT_TIMEOUT = 10;",
"type": "int",
"var_name": "DEFAULT_PORT_TIMEOUT"
},
{
"declarator": "DEFAULT_DATA_BITS = 8",
"mo... | {
"body": "@Override\n\tpublic int readData(byte[] data) throws IOException {\n\t\tif (data == null)\n\t\t\tthrow new NullPointerException(\"Buffer cannot be null.\");\n\t\t\n\t\tint readBytes = 0;\n\t\tif (getInputStream() != null)\n\t\t\treadBytes = getInputStream().read(data);\n\t\treturn readBytes;\n\t}",
"clas... | {
"created": null,
"fork": null,
"fork_count": 54,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 21871478,
"size": 3156,
"stargazer_count": 76,
"stars": null,
"updates": null,
"url": "https://github.com/digidotcom/xbee-java"
} |
21871478_119 | {
"fields": [
{
"declarator": "exception = ExpectedException.none()",
"modifier": "@Rule\n\tpublic",
"original_string": "@Rule\n\tpublic ExpectedException exception = ExpectedException.none();",
"type": "ExpectedException",
"var_name": "exception"
}
],
"file": "library/src/te... | {
"body": "@Test\n\tpublic final void testGetParameterAsStringNullValue() {\n\t\t// Setup the resources for the test.\n\t\tint frameID = 0x10;\n\t\tXBee64BitAddress dest64Addr = new XBee64BitAddress(\"0013A2004032D9AB\");\n\t\tXBee16BitAddress dest16Addr = new XBee16BitAddress(\"FFFF\");\n\t\tint options = 23;\n\t\tS... | {
"fields": [
{
"declarator": "MIN_API_PAYLOAD_LENGTH = 15",
"modifier": "private static final",
"original_string": "private static final int MIN_API_PAYLOAD_LENGTH = 15;",
"type": "int",
"var_name": "MIN_API_PAYLOAD_LENGTH"
},
{
"declarator": "destAddress64",
"mo... | {
"body": "public String getParameterAsString() {\n\t\tif (parameter == null)\n\t\t\treturn null;\n\t\treturn new String(parameter);\n\t}",
"class_method_signature": "RemoteATCommandPacket.getParameterAsString()",
"constructor": false,
"full_signature": "public String getParameterAsString()",
"identifier": "g... | {
"created": null,
"fork": null,
"fork_count": 54,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 21871478,
"size": 3156,
"stargazer_count": 76,
"stars": null,
"updates": null,
"url": "https://github.com/digidotcom/xbee-java"
} |
21871478_78 | {
"fields": [
{
"declarator": "exception = ExpectedException.none()",
"modifier": "@Rule\n\tpublic",
"original_string": "@Rule\n\tpublic ExpectedException exception = ExpectedException.none();",
"type": "ExpectedException",
"var_name": "exception"
}
],
"file": "library/src/te... | {
"body": "@Test\n\tpublic final void testIsBroadcast() {\n\t\t// Setup the resources for the test.\n\t\tint frameID = 0x10;\n\t\tString command = \"DL\";\n\t\tbyte[] parameter = new byte[]{0x6D, 0x79};\n\t\tATCommandQueuePacket packet = new ATCommandQueuePacket(frameID, command, parameter);\n\t\t\n\t\t// Call the me... | {
"fields": [
{
"declarator": "MIN_API_PAYLOAD_LENGTH = 4",
"modifier": "private static final",
"original_string": "private static final int MIN_API_PAYLOAD_LENGTH = 4;",
"type": "int",
"var_name": "MIN_API_PAYLOAD_LENGTH"
},
{
"declarator": "command",
"modifier":... | {
"body": "@Override\n\tpublic boolean isBroadcast() {\n\t\treturn false;\n\t}",
"class_method_signature": "ATCommandQueuePacket.isBroadcast()",
"constructor": false,
"full_signature": "@Override public boolean isBroadcast()",
"identifier": "isBroadcast",
"invocations": [],
"modifiers": "@Override public"... | {
"created": null,
"fork": null,
"fork_count": 54,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 21871478,
"size": 3156,
"stargazer_count": 76,
"stars": null,
"updates": null,
"url": "https://github.com/digidotcom/xbee-java"
} |
21871478_637 | {
"fields": [
{
"declarator": "PARAMETER_AI = \"AI\"",
"modifier": "private static final",
"original_string": "private static final String PARAMETER_AI = \"AI\";",
"type": "String",
"var_name": "PARAMETER_AI"
},
{
"declarator": "PARAMETER_MA = \"MA\"",
"modifier":... | {
"body": "@Test\n\tpublic void testSetIPAddressMaskNull() throws Exception {\n\t\t// Set up the resources for the test.\n\t\texception.expect(NullPointerException.class);\n\t\texception.expectMessage(is(equalTo(\"Address mask cannot be null.\")));\n\n\t\t// Call the method under test that should throw a NullPointerE... | {
"fields": [
{
"declarator": "DEFAULT_ACCESS_POINT_TIMETOUT = 15000",
"modifier": "private final static",
"original_string": "private final static int DEFAULT_ACCESS_POINT_TIMETOUT = 15000;",
"type": "int",
"var_name": "DEFAULT_ACCESS_POINT_TIMETOUT"
},
{
"declarator":... | {
"body": "public void setIPAddressMask(Inet4Address address) throws TimeoutException, XBeeException {\n\t\tif (address == null)\n\t\t\tthrow new NullPointerException(\"Address mask cannot be null.\");\n\t\t\n\t\tsetParameter(\"MK\", address.getAddress());\n\t}",
"class_method_signature": "WiFiDevice.setIPAddressMa... | {
"created": null,
"fork": null,
"fork_count": 54,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 21871478,
"size": 3156,
"stargazer_count": 76,
"stars": null,
"updates": null,
"url": "https://github.com/digidotcom/xbee-java"
} |
21871478_267 | {
"fields": [
{
"declarator": "frameType = APIFrameType.SEND_DATA_RESPONSE.getValue()",
"modifier": "private",
"original_string": "private int frameType = APIFrameType.SEND_DATA_RESPONSE.getValue();",
"type": "int",
"var_name": "frameType"
},
{
"declarator": "frameID = ... | {
"body": "@Test\n\tpublic final void testCreatePacketPayloadShorterThanNeeded() {\n\t\t// Set up the resources for the test.\n\t\tbyte[] payload = new byte[2];\n\t\tpayload[0] = (byte)frameType;\n\t\tpayload[1] = (byte)frameID;\n\n\t\texception.expect(IllegalArgumentException.class);\n\t\texception.expectMessage(is(... | {
"fields": [
{
"declarator": "MIN_API_PAYLOAD_LENGTH = 3",
"modifier": "private static final",
"original_string": "private static final int MIN_API_PAYLOAD_LENGTH = 3;",
"type": "int",
"var_name": "MIN_API_PAYLOAD_LENGTH"
},
{
"declarator": "ERROR_PAYLOAD_NULL = \"Send... | {
"body": "public static SendDataResponsePacket createPacket(byte[] payload) {\n\t\tif (payload == null)\n\t\t\tthrow new NullPointerException(ERROR_PAYLOAD_NULL);\n\n\t\tif (payload.length < MIN_API_PAYLOAD_LENGTH)\n\t\t\tthrow new IllegalArgumentException(ERROR_INCOMPLETE_PACKET);\n\n\t\tif ((payload[0] & 0xFF) != ... | {
"created": null,
"fork": null,
"fork_count": 54,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 21871478,
"size": 3156,
"stargazer_count": 76,
"stars": null,
"updates": null,
"url": "https://github.com/digidotcom/xbee-java"
} |
21871478_772 | {
"fields": [
{
"declarator": "exception = ExpectedException.none()",
"modifier": "@Rule\n\tpublic",
"original_string": "@Rule\n\tpublic ExpectedException exception = ExpectedException.none();",
"type": "ExpectedException",
"var_name": "exception"
},
{
"declarator": "lp... | {
"body": "@SuppressWarnings(\"deprecation\")\n\t@Test\n\tpublic void testSendIPDataDeprecated() throws Exception {\n\t\t// Do nothing when the sendIPData of NBIoTDevice is called.\n\t\tMockito.doNothing().when(lpWanDevice).sendIPData(Mockito.any(Inet4Address.class), \n\t\t\t\tMockito.anyInt(), Mockito.any(IPProtocol... | {
"fields": [
{
"declarator": "OPERATION_EXCEPTION = \"Operation not supported in this module.\"",
"modifier": "private static final",
"original_string": "private static final String OPERATION_EXCEPTION = \"Operation not supported in this module.\";",
"type": "String",
"var_name": "O... | {
"body": "@Override\n\tpublic void sendIPData(Inet4Address ipAddress, int destPort, IPProtocol protocol, \n\t\t\tbyte[] data) throws TimeoutException, XBeeException {\n\t\tif (protocol != IPProtocol.UDP)\n\t\t\tthrow new IllegalArgumentException(ONLY_UDP_TRANSMISSIONS);\n\t\tsuper.sendIPData(ipAddress, destPort, pro... | {
"created": null,
"fork": null,
"fork_count": 54,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 21871478,
"size": 3156,
"stargazer_count": 76,
"stars": null,
"updates": null,
"url": "https://github.com/digidotcom/xbee-java"
} |
21871478_288 | {
"fields": [
{
"declarator": "frameType = APIFrameType.SEND_DATA_REQUEST.getValue()",
"modifier": "private",
"original_string": "private int frameType = APIFrameType.SEND_DATA_REQUEST.getValue();",
"type": "int",
"var_name": "frameType"
},
{
"declarator": "frameID = 0x... | {
"body": "@Test\n\tpublic final void testGetTransport() {\n\t\t// Set up the resources for the test.\n\t\tSendDataRequestPacket packet = new SendDataRequestPacket(frameID, path, contentType, options, data);\n\n\t\t// Verify the result.\n\t\tassertThat(\"Returned transport is not the expected\", packet.getTransport()... | {
"fields": [
{
"declarator": "MIN_API_PAYLOAD_LENGTH = 6",
"modifier": "private static final",
"original_string": "private static final int MIN_API_PAYLOAD_LENGTH = 6;",
"type": "int",
"var_name": "MIN_API_PAYLOAD_LENGTH"
},
{
"declarator": "ERROR_PAYLOAD_NULL = \"Send... | {
"body": "public int getTransport() {\n\t\treturn transport;\n\t}",
"class_method_signature": "SendDataRequestPacket.getTransport()",
"constructor": false,
"full_signature": "public int getTransport()",
"identifier": "getTransport",
"invocations": [],
"modifiers": "public",
"parameters": "()",
"retur... | {
"created": null,
"fork": null,
"fork_count": 54,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 21871478,
"size": 3156,
"stargazer_count": 76,
"stars": null,
"updates": null,
"url": "https://github.com/digidotcom/xbee-java"
} |
21871478_322 | {
"fields": [
{
"declarator": "IP_ADDRESS = \"10.10.11.12\"",
"modifier": "private static final",
"original_string": "private static final String IP_ADDRESS = \"10.10.11.12\";",
"type": "String",
"var_name": "IP_ADDRESS"
},
{
"declarator": "frameType = APIFrameType.TX_I... | {
"body": "@Test\n\tpublic final void testCreatePacketPayloadShorterThanNeeded() {\n\t\t// Set up the resources for the test.\n\t\tbyte[] payload = new byte[11];\n\t\tpayload[0] = (byte)frameType;\n\t\tpayload[1] = (byte)frameID;\n\t\tSystem.arraycopy(destAddress.getAddress(), 0, payload, 2, destAddress.getAddress().... | {
"fields": [
{
"declarator": "OPTIONS_CLOSE_SOCKET = 2",
"modifier": "public static final",
"original_string": "public static final int OPTIONS_CLOSE_SOCKET = 2;",
"type": "int",
"var_name": "OPTIONS_CLOSE_SOCKET"
},
{
"declarator": "OPTIONS_LEAVE_SOCKET_OPEN = 0",
... | {
"body": "public static TXIPv4Packet createPacket(byte[] payload) {\n\t\tif (payload == null)\n\t\t\tthrow new NullPointerException(ERROR_PAYLOAD_NULL);\n\n\t\tif (payload.length < MIN_API_PAYLOAD_LENGTH)\n\t\t\tthrow new IllegalArgumentException(ERROR_INCOMPLETE_PACKET);\n\n\t\tif ((payload[0] & 0xFF) != APIFrameTy... | {
"created": null,
"fork": null,
"fork_count": 54,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 21871478,
"size": 3156,
"stargazer_count": 76,
"stars": null,
"updates": null,
"url": "https://github.com/digidotcom/xbee-java"
} |
21871478_97 | {
"fields": [
{
"declarator": "exception = ExpectedException.none()",
"modifier": "@Rule\n\tpublic",
"original_string": "@Rule\n\tpublic ExpectedException exception = ExpectedException.none();",
"type": "ExpectedException",
"var_name": "exception"
}
],
"file": "library/src/te... | {
"body": "@Test\n\tpublic final void testCreatePacketEmptyPayload() {\n\t\t// Setup the resources for the test.\n\t\tbyte[] payload = new byte[0];\n\t\texception.expect(IllegalArgumentException.class);\n\t\texception.expectMessage(is(equalTo(\"Incomplete Receive packet.\")));\n\t\t\n\t\t// Call the method under test... | {
"fields": [
{
"declarator": "MIN_API_PAYLOAD_LENGTH = 12",
"modifier": "private static final",
"original_string": "private static final int MIN_API_PAYLOAD_LENGTH = 12;",
"type": "int",
"var_name": "MIN_API_PAYLOAD_LENGTH"
},
{
"declarator": "sourceAddress64",
"... | {
"body": "public static ReceivePacket createPacket(byte[] payload) {\n\t\tif (payload == null)\n\t\t\tthrow new NullPointerException(\"Receive packet payload cannot be null.\");\n\t\t\n\t\t// 1 (Frame type) + 8 (32-bit address) + 2 (16-bit address) + 1 (receive options)\n\t\tif (payload.length < MIN_API_PAYLOAD_LENG... | {
"created": null,
"fork": null,
"fork_count": 54,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 21871478,
"size": 3156,
"stargazer_count": 76,
"stars": null,
"updates": null,
"url": "https://github.com/digidotcom/xbee-java"
} |
21871478_79 | {
"fields": [
{
"declarator": "exception = ExpectedException.none()",
"modifier": "@Rule\n\tpublic",
"original_string": "@Rule\n\tpublic ExpectedException exception = ExpectedException.none();",
"type": "ExpectedException",
"var_name": "exception"
}
],
"file": "library/src/te... | {
"body": "@Test\n\tpublic final void testGetParameterAsString() {\n\t\t// Setup the resources for the test.\n\t\tint frameID = 0x10;\n\t\tString command = \"NI\";\n\t\tString parameterToSet = \"newNIValue\";\n\t\tATCommandQueuePacket packet = new ATCommandQueuePacket(frameID, command, parameterToSet);\n\t\t\n\t\t// ... | {
"fields": [
{
"declarator": "MIN_API_PAYLOAD_LENGTH = 4",
"modifier": "private static final",
"original_string": "private static final int MIN_API_PAYLOAD_LENGTH = 4;",
"type": "int",
"var_name": "MIN_API_PAYLOAD_LENGTH"
},
{
"declarator": "command",
"modifier":... | {
"body": "public String getParameterAsString() {\n\t\tif (parameter == null)\n\t\t\treturn null;\n\t\treturn new String(parameter);\n\t}",
"class_method_signature": "ATCommandQueuePacket.getParameterAsString()",
"constructor": false,
"full_signature": "public String getParameterAsString()",
"identifier": "ge... | {
"created": null,
"fork": null,
"fork_count": 54,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 21871478,
"size": 3156,
"stargazer_count": 76,
"stars": null,
"updates": null,
"url": "https://github.com/digidotcom/xbee-java"
} |
21871478_636 | {
"fields": [
{
"declarator": "PARAMETER_AI = \"AI\"",
"modifier": "private static final",
"original_string": "private static final String PARAMETER_AI = \"AI\";",
"type": "String",
"var_name": "PARAMETER_AI"
},
{
"declarator": "PARAMETER_MA = \"MA\"",
"modifier":... | {
"body": "@Test\n\tpublic void testSetIPAddress() throws Exception {\n\t\t// Do nothing when trying to set the MY parameter.\n\t\tMockito.doNothing().when(wifiDevice).setParameter(Mockito.eq(PARAMETER_MY), Mockito.any(byte[].class));\n\n\t\t// Set the IP address.\n\t\twifiDevice.setIPAddress((Inet4Address) Inet4Addr... | {
"fields": [
{
"declarator": "DEFAULT_ACCESS_POINT_TIMETOUT = 15000",
"modifier": "private final static",
"original_string": "private final static int DEFAULT_ACCESS_POINT_TIMETOUT = 15000;",
"type": "int",
"var_name": "DEFAULT_ACCESS_POINT_TIMETOUT"
},
{
"declarator":... | {
"body": "public void setIPAddress(Inet4Address address) throws TimeoutException, XBeeException {\n\t\tif (address == null)\n\t\t\tthrow new NullPointerException(\"IP address cannot be null.\");\n\t\t\n\t\tsetParameter(\"MY\", address.getAddress());\n\t}",
"class_method_signature": "WiFiDevice.setIPAddress(Inet4Ad... | {
"created": null,
"fork": null,
"fork_count": 54,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 21871478,
"size": 3156,
"stargazer_count": 76,
"stars": null,
"updates": null,
"url": "https://github.com/digidotcom/xbee-java"
} |
21871478_266 | {
"fields": [
{
"declarator": "frameType = APIFrameType.SEND_DATA_RESPONSE.getValue()",
"modifier": "private",
"original_string": "private int frameType = APIFrameType.SEND_DATA_RESPONSE.getValue();",
"type": "int",
"var_name": "frameType"
},
{
"declarator": "frameID = ... | {
"body": "@Test\n\tpublic final void testCreatePacketEmptyPayload() {\n\t\t// Set up the resources for the test.\n\t\tbyte[] payload = new byte[0];\n\t\texception.expect(IllegalArgumentException.class);\n\t\texception.expectMessage(is(equalTo(\"Incomplete Send Data Response packet.\")));\n\n\t\t// Call the method un... | {
"fields": [
{
"declarator": "MIN_API_PAYLOAD_LENGTH = 3",
"modifier": "private static final",
"original_string": "private static final int MIN_API_PAYLOAD_LENGTH = 3;",
"type": "int",
"var_name": "MIN_API_PAYLOAD_LENGTH"
},
{
"declarator": "ERROR_PAYLOAD_NULL = \"Send... | {
"body": "public static SendDataResponsePacket createPacket(byte[] payload) {\n\t\tif (payload == null)\n\t\t\tthrow new NullPointerException(ERROR_PAYLOAD_NULL);\n\n\t\tif (payload.length < MIN_API_PAYLOAD_LENGTH)\n\t\t\tthrow new IllegalArgumentException(ERROR_INCOMPLETE_PACKET);\n\n\t\tif ((payload[0] & 0xFF) != ... | {
"created": null,
"fork": null,
"fork_count": 54,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 21871478,
"size": 3156,
"stargazer_count": 76,
"stars": null,
"updates": null,
"url": "https://github.com/digidotcom/xbee-java"
} |
21871478_773 | {
"fields": [
{
"declarator": "exception = ExpectedException.none()",
"modifier": "@Rule\n\tpublic",
"original_string": "@Rule\n\tpublic ExpectedException exception = ExpectedException.none();",
"type": "ExpectedException",
"var_name": "exception"
},
{
"declarator": "lp... | {
"body": "@Test\n\tpublic void testSendIPDataAsyncNotUDP() throws Exception {\n\t\texception.expect(IllegalArgumentException.class);\n\t\texception.expectMessage(is(equalTo(\"This protocol only supports UDP transmissions.\")));\n\t\t\n\t\tInet4Address destAddr = (Inet4Address)Inet4Address.getByName(\"192.168.1.55\")... | {
"fields": [
{
"declarator": "OPERATION_EXCEPTION = \"Operation not supported in this module.\"",
"modifier": "private static final",
"original_string": "private static final String OPERATION_EXCEPTION = \"Operation not supported in this module.\";",
"type": "String",
"var_name": "O... | {
"body": "@Override\n\tpublic void sendIPDataAsync(Inet4Address ipAddress, int destPort, IPProtocol protocol, \n\t\t\tbyte[] data) throws TimeoutException, XBeeException {\n\t\tif (protocol != IPProtocol.UDP)\n\t\t\tthrow new IllegalArgumentException(ONLY_UDP_TRANSMISSIONS);\n\t\tsuper.sendIPDataAsync(ipAddress, des... | {
"created": null,
"fork": null,
"fork_count": 54,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 21871478,
"size": 3156,
"stargazer_count": 76,
"stars": null,
"updates": null,
"url": "https://github.com/digidotcom/xbee-java"
} |
21871478_289 | {
"fields": [
{
"declarator": "frameType = APIFrameType.SEND_DATA_REQUEST.getValue()",
"modifier": "private",
"original_string": "private int frameType = APIFrameType.SEND_DATA_REQUEST.getValue();",
"type": "int",
"var_name": "frameType"
},
{
"declarator": "frameID = 0x... | {
"body": "@Test\n\tpublic final void testSetOptionsNull() {\n\t\t// Set up the resources for the test.\n\t\tSendDataRequestPacket packet = new SendDataRequestPacket(frameID, path, contentType, options, data);\n\n\t\toptions = null;\n\n\t\texception.expect(NullPointerException.class);\n\t\texception.expectMessage(is(... | {
"fields": [
{
"declarator": "MIN_API_PAYLOAD_LENGTH = 6",
"modifier": "private static final",
"original_string": "private static final int MIN_API_PAYLOAD_LENGTH = 6;",
"type": "int",
"var_name": "MIN_API_PAYLOAD_LENGTH"
},
{
"declarator": "ERROR_PAYLOAD_NULL = \"Send... | {
"body": "public void setOptions(SendDataRequestOptions options) {\n\t\tif (options == null)\n\t\t\tthrow new NullPointerException(ERROR_OPTIONS_NULL);\n\n\t\tthis.options = options;\n\t}",
"class_method_signature": "SendDataRequestPacket.setOptions(SendDataRequestOptions options)",
"constructor": false,
"full... | {
"created": null,
"fork": null,
"fork_count": 54,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 21871478,
"size": 3156,
"stargazer_count": 76,
"stars": null,
"updates": null,
"url": "https://github.com/digidotcom/xbee-java"
} |
21871478_323 | {
"fields": [
{
"declarator": "IP_ADDRESS = \"10.10.11.12\"",
"modifier": "private static final",
"original_string": "private static final String IP_ADDRESS = \"10.10.11.12\";",
"type": "String",
"var_name": "IP_ADDRESS"
},
{
"declarator": "frameType = APIFrameType.TX_I... | {
"body": "@Test\n\tpublic final void testCreatePacketPayloadNotIncludingFrameType() {\n\t\t// Set up the resources for the test.\n\t\tbyte[] payload = new byte[10 + data.length];\n\t\tpayload[0] = (byte)frameID;\n\t\tSystem.arraycopy(destAddress.getAddress(), 0, payload, 1, destAddress.getAddress().length);\n\t\tpay... | {
"fields": [
{
"declarator": "OPTIONS_CLOSE_SOCKET = 2",
"modifier": "public static final",
"original_string": "public static final int OPTIONS_CLOSE_SOCKET = 2;",
"type": "int",
"var_name": "OPTIONS_CLOSE_SOCKET"
},
{
"declarator": "OPTIONS_LEAVE_SOCKET_OPEN = 0",
... | {
"body": "public static TXIPv4Packet createPacket(byte[] payload) {\n\t\tif (payload == null)\n\t\t\tthrow new NullPointerException(ERROR_PAYLOAD_NULL);\n\n\t\tif (payload.length < MIN_API_PAYLOAD_LENGTH)\n\t\t\tthrow new IllegalArgumentException(ERROR_INCOMPLETE_PACKET);\n\n\t\tif ((payload[0] & 0xFF) != APIFrameTy... | {
"created": null,
"fork": null,
"fork_count": 54,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 21871478,
"size": 3156,
"stargazer_count": 76,
"stars": null,
"updates": null,
"url": "https://github.com/digidotcom/xbee-java"
} |
21871478_96 | {
"fields": [
{
"declarator": "exception = ExpectedException.none()",
"modifier": "@Rule\n\tpublic",
"original_string": "@Rule\n\tpublic ExpectedException exception = ExpectedException.none();",
"type": "ExpectedException",
"var_name": "exception"
}
],
"file": "library/src/te... | {
"body": "@Test\n\tpublic final void testCreatePacketNullPayload() {\n\t\t// Setup the resources for the test.\n\t\tbyte[] payload = null;\n\t\texception.expect(NullPointerException.class);\n\t\texception.expectMessage(is(equalTo(\"Receive packet payload cannot be null.\")));\n\t\t\n\t\t// Call the method under test... | {
"fields": [
{
"declarator": "MIN_API_PAYLOAD_LENGTH = 12",
"modifier": "private static final",
"original_string": "private static final int MIN_API_PAYLOAD_LENGTH = 12;",
"type": "int",
"var_name": "MIN_API_PAYLOAD_LENGTH"
},
{
"declarator": "sourceAddress64",
"... | {
"body": "public static ReceivePacket createPacket(byte[] payload) {\n\t\tif (payload == null)\n\t\t\tthrow new NullPointerException(\"Receive packet payload cannot be null.\");\n\t\t\n\t\t// 1 (Frame type) + 8 (32-bit address) + 2 (16-bit address) + 1 (receive options)\n\t\tif (payload.length < MIN_API_PAYLOAD_LENG... | {
"created": null,
"fork": null,
"fork_count": 54,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 21871478,
"size": 3156,
"stargazer_count": 76,
"stars": null,
"updates": null,
"url": "https://github.com/digidotcom/xbee-java"
} |
21871478_548 | {
"fields": [
{
"declarator": "RECEIVED_BUFFER = \"Hello, this is the received data\".getBytes()",
"modifier": "private static final",
"original_string": "private static final byte[] RECEIVED_BUFFER = \"Hello, this is the received data\".getBytes();",
"type": "byte[]",
"var_name": "R... | {
"body": "@Test\n\tpublic final void testReadDataByteArrayReadIOException() throws IOException {\n\t\t// Setup the resources for the test.\n\t\tTestAbstractSerialPort port = Mockito.spy(new TestAbstractSerialPort(\"COM1\", 9600));\n\t\tbyte[] data = new byte[20];\n\t\tMockito.doThrow(new IOException(\"IO exception: ... | {
"fields": [
{
"declarator": "DEFAULT_PORT_TIMEOUT = 10",
"modifier": "public static final",
"original_string": "public static final int DEFAULT_PORT_TIMEOUT = 10;",
"type": "int",
"var_name": "DEFAULT_PORT_TIMEOUT"
},
{
"declarator": "DEFAULT_DATA_BITS = 8",
"mo... | {
"body": "@Override\n\tpublic int readData(byte[] data) throws IOException {\n\t\tif (data == null)\n\t\t\tthrow new NullPointerException(\"Buffer cannot be null.\");\n\t\t\n\t\tint readBytes = 0;\n\t\tif (getInputStream() != null)\n\t\t\treadBytes = getInputStream().read(data);\n\t\treturn readBytes;\n\t}",
"clas... | {
"created": null,
"fork": null,
"fork_count": 54,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 21871478,
"size": 3156,
"stargazer_count": 76,
"stars": null,
"updates": null,
"url": "https://github.com/digidotcom/xbee-java"
} |
21871478_118 | {
"fields": [
{
"declarator": "exception = ExpectedException.none()",
"modifier": "@Rule\n\tpublic",
"original_string": "@Rule\n\tpublic ExpectedException exception = ExpectedException.none();",
"type": "ExpectedException",
"var_name": "exception"
}
],
"file": "library/src/te... | {
"body": "@Test\n\tpublic final void testGetParameterAsString() {\n\t\t// Setup the resources for the test.\n\t\tint frameID = 0x10;\n\t\tXBee64BitAddress dest64Addr = new XBee64BitAddress(\"0013A2004032D9AB\");\n\t\tXBee16BitAddress dest16Addr = new XBee16BitAddress(\"FFFF\");\n\t\tint options = 23;\n\t\tString com... | {
"fields": [
{
"declarator": "MIN_API_PAYLOAD_LENGTH = 15",
"modifier": "private static final",
"original_string": "private static final int MIN_API_PAYLOAD_LENGTH = 15;",
"type": "int",
"var_name": "MIN_API_PAYLOAD_LENGTH"
},
{
"declarator": "destAddress64",
"mo... | {
"body": "public String getParameterAsString() {\n\t\tif (parameter == null)\n\t\t\treturn null;\n\t\treturn new String(parameter);\n\t}",
"class_method_signature": "RemoteATCommandPacket.getParameterAsString()",
"constructor": false,
"full_signature": "public String getParameterAsString()",
"identifier": "g... | {
"created": null,
"fork": null,
"fork_count": 54,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 21871478,
"size": 3156,
"stargazer_count": 76,
"stars": null,
"updates": null,
"url": "https://github.com/digidotcom/xbee-java"
} |
21871478_231 | {
"fields": [
{
"declarator": "IPV6_SRC_ADDRESS = \"FDB3:0001:0002:0000:0004:0005:0006:0007\"",
"modifier": "private static final",
"original_string": "private static final String IPV6_SRC_ADDRESS = \"FDB3:0001:0002:0000:0004:0005:0006:0007\";",
"type": "String",
"var_name": "IPV6_SR... | {
"body": "@Test\n\tpublic final void testGetAPIPacketParametersReceivedDataNotNull() {\n\t\t// Set up the resources for the test.\n\t\tRXIPv6Packet packet = new RXIPv6Packet(destAddress, sourceAddress, destPort, sourcePort, protocol, data);\n\n\t\t// Call the method under test.\n\t\tLinkedHashMap<String, String> pac... | {
"fields": [
{
"declarator": "MIN_API_PAYLOAD_LENGTH = 39",
"modifier": "private static final",
"original_string": "private static final int MIN_API_PAYLOAD_LENGTH = 39;",
"type": "int",
"var_name": "MIN_API_PAYLOAD_LENGTH"
},
{
"declarator": "ERROR_PAYLOAD_NULL = \"RX... | {
"body": "@Override\n\tpublic LinkedHashMap<String, String> getAPIPacketParameters() {\n\t\tLinkedHashMap<String, String> parameters = new LinkedHashMap<String, String>();\n\t\tparameters.put(\"Destination address\", HexUtils.prettyHexString(destAddress.getAddress()) + \" (\" + destAddress.getHostAddress() + \")\");... | {
"created": null,
"fork": null,
"fork_count": 54,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 21871478,
"size": 3156,
"stargazer_count": 76,
"stars": null,
"updates": null,
"url": "https://github.com/digidotcom/xbee-java"
} |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.