id stringlengths 7 14 | test_class dict | test_case dict | focal_class dict | focal_method dict | repository dict |
|---|---|---|---|---|---|
21871478_501 | {
"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 testParsePacketOnlyOneByte() throws InvalidPacketException {\n\t\t// Setup the resources for the test.\n\t\tbyte[] byteArray = {0x66};\n\t\texception.expect(InvalidPacketException.class);\n\t\texception.expectMessage(is(equalTo(\"Error parsing packet: Incomplete packet.\")));\n\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": "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_444 | {
"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\tRX64IOPacket packet = new RX6... | {
"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_297 | {
"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 testIsBroadcast() {\n\t\t// Set up the resources for the test.\n\t\tDeviceRequestPacket packet = new DeviceRequestPacket(requestID, target, data);\n\n\t\t// Call the method under test and verify the result.\n\t\tassertThat(\"Packet should not be broadcast\", packet.isBroadcast(),... | {
"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": "@Override\n\tpublic boolean isBroadcast() {\n\t\treturn false;\n\t}",
"class_method_signature": "DeviceRequestPacket.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_88 | {
"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 testGetAPIPacketParametersATCommandParameterString() {\n\t\t// Setup the resources for the test.\n\t\tint frameID = 0x10;\n\t\tString command = \"NI\";\n\t\tString parameter = \"myDevice\";\n\t\tATCommandPacket packet = new ATCommandPacket(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_67 | {
"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\tXBee64BitAddress source64Addr = new XBee64BitAddress(\"0013A2004032D9AB\");\n\t\tXBee16BitAddress source16Addr = new XBee16BitAddress(\"B45C\");\n\t\tint sourceEndpoint = 0xA0;\n\t\tint destEndpoint = 0xA1;\... | {
"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 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": "ExplicitRxIndicatorPacket.getRFData()",
"constructor": false,
"full_signature": "public byte[] getRFData()",
"identifier": "getRFData",
"inv... | {
"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_628 | {
"fields": [],
"file": "library/src/test/java/com/digi/xbee/api/exceptions/ATCommandExceptionTest.java",
"identifier": "ATCommandExceptionTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n\tpublic final void testGetMessageOnlyCommandStatusAndMessageNull() {\n\t\t// Setup the resources for the test.\n\t\tATCommandStatus atCommandStatus = ATCommandStatus.TX_FAILURE;\n\t\tString message = null;\n\t\tATCommandException e = new ATCommandException(message, atCommandStatus);\n\t\t\n\t\t// C... | {
"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": "@Override\n\tpublic String getMessage() {\n\t\tString message = super.getMessage();\n\t\t\n\t\tif (message == null)\n\t\t\tmessage = \"\";\n\t\t\n\t\tif (atCommandStatus != null) {\n\t\t\tif (message.length() > 0)\n\t\t\t\tmessage = message + \" > \";\n\t\t\tmessage = message + atCommandStatus.getDescripti... | {
"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_278 | {
"fields": [
{
"declarator": "frameType = APIFrameType.DEVICE_RESPONSE_STATUS.getValue()",
"modifier": "private",
"original_string": "private int frameType = APIFrameType.DEVICE_RESPONSE_STATUS.getValue();",
"type": "int",
"var_name": "frameType"
},
{
"declarator": "fr... | {
"body": "@Test\n\tpublic final void testSetStatusNull() {\n\t\t// Set up the resources for the test.\n\t\tDeviceResponseStatusPacket packet = new DeviceResponseStatusPacket(frameID, status);\n\n\t\tstatus = null;\n\n\t\texception.expect(NullPointerException.class);\n\t\texception.expectMessage(is(equalTo(\"Status c... | {
"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 = \"Devi... | {
"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": "DeviceResponseStatusPacket.setStatus(DeviceCloudStatus status)",
"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_782 | {
"fields": [
{
"declarator": "INVALID_BYTE_ARRAY = new byte[]{0x01, 0x02, 0x03}",
"modifier": "private final static",
"original_string": "private final static byte[] INVALID_BYTE_ARRAY = new byte[]{0x01, 0x02, 0x03};",
"type": "byte[]",
"var_name": "INVALID_BYTE_ARRAY"
},
{
... | {
"body": "@Test\n\tpublic final void testEqualsIsConsistent() {\n\t\t// Setup the resources for the test.\n\t\tXBee16BitAddress addr1 = new XBee16BitAddress(\"0x1234\");\n\t\tXBee16BitAddress addr2 = new XBee16BitAddress(\"0x1234\");\n\t\tXBee16BitAddress addr3 = new XBee16BitAddress(\"0x5678\");\n\t\t\n\t\t// Verif... | {
"fields": [
{
"declarator": "COORDINATOR_ADDRESS = new XBee16BitAddress(\"0000\")",
"modifier": "public static final",
"original_string": "public static final XBee16BitAddress COORDINATOR_ADDRESS = new XBee16BitAddress(\"0000\");",
"type": "XBee16BitAddress",
"var_name": "COORDINAT... | {
"body": "@Override\n\tpublic boolean equals(Object obj) {\n\t\tif (!(obj instanceof XBee16BitAddress))\n\t\t\treturn false;\n\t\tXBee16BitAddress addr = (XBee16BitAddress)obj;\n\t\treturn Arrays.equals(addr.getValue(), getValue());\n\t}",
"class_method_signature": "XBee16BitAddress.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_556 | {
"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 testReadDataCompleteInputStreamNull() throws IOException {\n\t\t// Setup the resources for the test.\n\t\tTestAbstractSerialPort port = Mockito.spy(new TestAbstractSerialPort(\"COM1\", 9600));\n\t\tmockInputStream = null;\n\t\tbyte[] data = new byte[10];\n\t\tint offset = 0;\n\t\... | {
"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_106 | {
"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(\"Remote AT Command packet payload cannot be null.\")));\n\t\t\n\t\t// Call the method ... | {
"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 static RemoteATCommandPacket createPacket(byte[] payload) {\n\t\tif (payload == null)\n\t\t\tthrow new NullPointerException(\"Remote AT Command 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 (transmit options byte) + 2 (AT... | {
"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_805 | {
"fields": [
{
"declarator": "SSID = \"My Access Point\"",
"modifier": "private static final",
"original_string": "private static final String SSID = \"My Access Point\";",
"type": "String",
"var_name": "SSID"
},
{
"declarator": "ENCRYPTION_TYPE = WiFiEncryptionType.WE... | {
"body": "@Test(expected=IllegalArgumentException.class)\n\tpublic void testSetSignalQualityNegative() {\n\t\tAccessPoint accessPoint = new AccessPoint(SSID, ENCRYPTION_TYPE);\n\t\t\n\t\taccessPoint.setSignalQuality(-10);\n\t}",
"class_method_signature": "AccessPointTest.testSetSignalQualityNegative()",
"constru... | {
"fields": [
{
"declarator": "ERROR_CHANNEL = \"Channel cannot be negative.\"",
"modifier": "private static final",
"original_string": "private static final String ERROR_CHANNEL = \"Channel cannot be negative.\";",
"type": "String",
"var_name": "ERROR_CHANNEL"
},
{
"de... | {
"body": "public void setSignalQuality(int signalQuality) {\n\t\tif (signalQuality < 0 || signalQuality > 100)\n\t\t\tthrow new IllegalArgumentException(ERROR_SIGNAL_QUALITY);\n\t\t\n\t\tthis.signalQuality = signalQuality;\n\t}",
"class_method_signature": "AccessPoint.setSignalQuality(int signalQuality)",
"const... | {
"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_413 | {
"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 testGetAPIPacketParametersReceivedDataNotNull() {\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 = 40;\n\t\tbyte[] receivedData = new byte[]{(byte)0x01, (byte)0xFF, (byte)0xFF, (b... | {
"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 LinkedHashMap<String, String> getAPIPacketParameters() {\n\t\tLinkedHashMap<String, String> parameters = new LinkedHashMap<String, String>();\n\t\tparameters.put(\"16-bit source address\", HexUtils.prettyHexString(sourceAddress16.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_690 | {
"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 testByteArrayToLongNullArray() {\n\t\t// Setup the resources for the test.\n\t\tbyte[] byteArray = null;\n\t\t\n\t\texception.expect(NullPointerException.class);\n\t\texception.expectMessage(is(equalTo(\"Byte array cannot be null.\")));\n\t\t\n\t\t// Call the method under test.\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 long byteArrayToLong(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 < 8) {\n\t\t\tvalues = new byte[8]... | {
"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_385 | {
"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 testGetAPIPacketParametersATCommandParameterNotString() {\n\t\t// Setup the resources for the test.\n\t\tRemoteATCommandWifiPacket packet = new RemoteATCommandWifiPacket(frameID, destAddress, transmitOptions, command, parameter);\n\n\t\t// Call the method under test.\n\t\tLinkedH... | {
"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": "@Override\n\tpublic LinkedHashMap<String, String> getAPIPacketParameters() {\n\t\tLinkedHashMap<String, String> parameters = new LinkedHashMap<String, String>();\n\t\tparameters.put(\"Destination address\", \"00 00 00 00 \" + HexUtils.prettyHexString(HexUtils.byteArrayToHexString(destAddress.getAddress()))... | {
"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_30 | {
"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 testIsBroadcastWith16BitBroadcastAndNon64BitBroadcastDestinationAddress() {\n\t\t// Setup the resources for the test.\n\t\tint frameID = 0x65;\n\t\tXBee64BitAddress dest64Addr = new XBee64BitAddress(\"0013A2004032D9AB\");\n\t\tXBee16BitAddress dest16Addr = new XBee16BitAddress(\"... | {
"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": "@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": "TransmitPacket.isBroadcast()",
"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_813 | {
"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 testEqualsWithNonIMEI() {\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(new Object());\n\t\t\n\t\t// Verify the result.\n\t\tassertThat(\"IMEI addr... | {
"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_110 | {
"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\tXBee64BitAddress dest64Addr = new XBee64BitAddress(\"0013A2004032D9AB\");\n\t\tXBee16BitAddress dest16Addr = new XBee16BitAddress(\"D817\");\n\t\tint optio... | {
"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 LinkedHashMap<String, String> getAPIPacketParameters() {\n\t\tLinkedHashMap<String, String> parameters = new LinkedHashMap<String, String>();\n\t\tparameters.put(\"64-bit dest. address\", HexUtils.prettyHexString(destAddress64.toString()));\n\t\tparameters.put(\"16-bit dest. address\", ... | {
"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_540 | {
"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 testWriteDataCompleteNegativeLength() 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 = 0;\n\t\tint ... | {
"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 void writeData(byte[] data) throws IOException {\n\t\tif (data == null)\n\t\t\tthrow new NullPointerException(\"Data to be sent cannot be null.\");\n\t\t\n\t\tif (getOutputStream() != null) {\n\t\t\t// Writing data in ports without any device connected and configured with \n\t\t\t// har... | {
"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_405 | {
"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\tXBee64BitAddress source64Addr = new XBee64BitAddress(\"0013A2004032D9AB\");\n\t\tint rssi = 75;\n\t\tint options = 0x14; /* bit 2 */\n\t\tbyte[] receivedData = null;\n\t\tRX64Packet packet = new RX64Packet(s... | {
"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 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": "RX64Packet.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_686 | {
"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 testReadStringNotNullTerminated() {\n\t\t// Setup the resources for the test.\n\t\tbyte[] contents = new byte[]{0x01, 0x02, 0x03, 0x04, 0x05};\n\t\tByteArrayInputStream in = new ByteArrayInputStream(contents);\n\t\t\n\t\t// Call the method under test.\n\t\tString result = ByteUti... | {
"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 String readString(ByteArrayInputStream inputStream) {\n\t\tif (inputStream == null)\n\t\t\tthrow new NullPointerException(\"Input stream cannot be null.\");\n\t\t\n\t\tStringBuilder sb = new StringBuilder();\n\t\tbyte readByte;\n\t\twhile (((readByte = (byte)inputStream.read()) != 0x00) && 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_26 | {
"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 testGetAPIPacketParametersReceivedDataNotNull() {\n\t\t// Setup the resources for the test.\n\t\tint frameID = 0x65;\n\t\tXBee64BitAddress dest64Addr = new XBee64BitAddress(\"0013A2004032D9AB\");\n\t\tXBee16BitAddress dest16Addr = new XBee16BitAddress(\"D817\");\n\t\tint broadcas... | {
"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": "@Override\n\tpublic LinkedHashMap<String, String> getAPIPacketParameters() {\n\t\tLinkedHashMap<String, String> parameters = new LinkedHashMap<String, String>();\n\t\tparameters.put(\"64-bit dest. address\", HexUtils.prettyHexString(destAddress64.toString()));\n\t\tparameters.put(\"16-bit dest. address\", ... | {
"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_669 | {
"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 testNotSupportedOperationAddDataListener() 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 sho... | {
"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 addDataListener(IDataReceiveListener listener) {\n\t\t// Not supported in IP modules.\n\t\tthrow new UnsupportedOperationException(OPERATION_EXCEPTION);\n\t}",
"class_method_signature": "IPDevice.addDataListener(IDataReceiveListener listener)",
"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_393 | {
"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 testGetAPIPacketParametersATCommandParameterNull() {\n\t\t// Setup the resources for the test.\n\t\tcommandValue = null;\n\n\t\tRemoteATCommandResponseWifiPacket packet = new RemoteATCommandResponseWifiPacket(frameID, sourceAddress, command, status, commandValue);\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": "@Override\n\tpublic LinkedHashMap<String, String> getAPIPacketParameters() {\n\t\tLinkedHashMap<String, String> parameters = new LinkedHashMap<String, String>();\n\t\tparameters.put(\"Source address\", \"00 00 00 00 \" + HexUtils.prettyHexString(HexUtils.byteArrayToHexString(sourceAddress.getAddress())) + ... | {
"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_239 | {
"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 testGetDataNullData() {\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\tbyte[] result = packet.getData();\n\n\t... | {
"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 byte[] getData() {\n\t\tif (data == null)\n\t\t\treturn null;\n\t\treturn Arrays.copyOf(data, data.length);\n\t}",
"class_method_signature": "RXIPv6Packet.getData()",
"constructor": false,
"full_signature": "public byte[] getData()",
"identifier": "getData",
"invocations": [
"copyOf"
... | {
"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_517 | {
"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 testHashCodeIsConsistent() {\n\t\t// Setup the resources for the test.\n\t\tSerialPortParameters parameters = new SerialPortParameters(9600, 8, 1, 0, 0);\n\t\t\n\t\t// Call the method under test.\n\t\tint initialHashCode = parameters.hashCode();\n\t\t\n\t\t// Verify the result.\n... | {
"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 int hashCode() {\n\t\tint hash = HASH_SEED;\n\t\thash = hash * (hash + baudrate);\n\t\thash = hash * (hash + dataBits);\n\t\thash = hash * (hash + stopBits);\n\t\thash = hash * (hash + parity);\n\t\thash = hash * (hash + flowControl);\n\t\treturn hash;\n\t}",
"class_method_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_147 | {
"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(\"AT Command Response packet payload cannot be null.\")));\n\t\t\n\t\t// Call the metho... | {
"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 static ATCommandResponsePacket createPacket(byte[] payload) {\n\t\tif (payload == null)\n\t\t\tthrow new NullPointerException(\"AT Command Response packet payload cannot be null.\");\n\t\t\n\t\t// 1 (Frame type) + 1 (frame ID) + 2 (AT command) + 1 (status byte)\n\t\tif (payload.length < MIN_API_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_452 | {
"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 testGetRFDataValidData() {\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 = 0x84; /* bit 2 */\n\t\tbyte[] receivedData = new byte[]{0x68, 0x6F, 0x6C, 0x61, (byte)0x98,... | {
"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 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": "RX64IOPacket.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_281 | {
"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 testCreatePacketPayloadShorterThanNeeded() {\n\t\t// Set up the resources for the test.\n\t\tbyte[] payload = new byte[5];\n\t\tpayload[0] = (byte)frameType;\n\t\tpayload[1] = (byte)frameID;\n\t\tpayload[2] = (byte)0x00;\n\t\tpayload[3] = (byte)0x00;\n\t\tpayload[4] = (byte)trans... | {
"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 static SendDataRequestPacket 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) != A... | {
"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_794 | {
"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 testGetFirstIPv6DataPacketFrom() {\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\... | {
"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 getFirstIPv6DataPacketFrom(Inet6Address ipv6Address, int timeout) {\n\t\tif (timeout > 0) {\n\t\t\tXBeePacket xbeePacket = getFirstIPv6DataPacketFrom(ipv6Address, 0);\n\t\t\t// Wait for a timeout or until a IPv6 data packet with the provided IPv6 address is read.\n\t\t\tLong deadLine = Sy... | {
"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_71 | {
"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 AT Command Queue packet.\")));\n\t\t\n\t\t// Call the method u... | {
"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 static ATCommandQueuePacket createPacket(byte[] payload) {\n\t\tif (payload == null)\n\t\t\tthrow new NullPointerException(\"AT Command Queue packet payload cannot be null.\");\n\t\t\n\t\t// 1 (Frame type) + 1 (frame ID) + 2 (AT command)\n\t\tif (payload.length < MIN_API_PAYLOAD_LENGTH)\n\t\t\tthrow... | {
"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_649 | {
"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 testNotSupportedOperationGetAssociationIndicationStatus() throws Exception {\n\t\texception.expect(UnsupportedOperationException.class);\n\t\texception.expectMessage(is(equalTo(\"Operation not supported in Thread protocol.\")));\n\t\t\n\t\t// Call ... | {
"fields": [
{
"declarator": "OPERATION_EXCEPTION = \"Operation not supported in Thread protocol.\"",
"modifier": "private static final",
"original_string": "private static final String OPERATION_EXCEPTION = \"Operation not supported in Thread protocol.\";",
"type": "String",
"var_n... | {
"body": "@Override\n\tprotected AssociationIndicationStatus getAssociationIndicationStatus()\n\t\t\tthrows TimeoutException, XBeeException {\n\t\t// Not supported in Thread.\n\t\tthrow new UnsupportedOperationException(OPERATION_EXCEPTION);\n\t}",
"class_method_signature": "ThreadDevice.getAssociationIndicationSt... | {
"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_219 | {
"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 testSetDestPortBigger() {\n\t\t// Set up the resources for the test.\n\t\tTXIPv6Packet packet = new TXIPv6Packet(frameID, destAddress, destPort, sourcePort, protocol, data);\n\n\t\texception.expect(IllegalArgumentException.class);\n\t\texception.expectMessage(is(equalTo(\"Port mu... | {
"fields": [
{
"declarator": "MIN_API_PAYLOAD_LENGTH = 24",
"modifier": "private static final",
"original_string": "private static final int MIN_API_PAYLOAD_LENGTH = 24;",
"type": "int",
"var_name": "MIN_API_PAYLOAD_LENGTH"
},
{
"declarator": "ERROR_PAYLOAD_NULL = \"TX... | {
"body": "public void setDestPort(int destPort) {\n\t\tif (destPort < 0 || destPort > 65535)\n\t\t\tthrow new IllegalArgumentException(ERROR_PORT_ILLEGAL);\n\n\t\tthis.destPort = destPort;\n\t}",
"class_method_signature": "TXIPv6Packet.setDestPort(int destPort)",
"constructor": false,
"full_signature": "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_425 | {
"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 testGetAPIPacketParametersReceivedDataNotNull() {\n\t\t// Setup the resources for the test.\n\t\tint frameID = 0x65;\n\t\tXBee64BitAddress dest64Addr = new XBee64BitAddress(\"0013A2004032D9AB\");\n\t\tint options = 40;\n\t\tbyte[] data = new byte[]{0x68, 0x6F, 0x6C, 0x61};\n\t\tT... | {
"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": "@Override\n\tpublic LinkedHashMap<String, String> getAPIPacketParameters() {\n\t\tLinkedHashMap<String, String> parameters = new LinkedHashMap<String, String>();\n\t\tparameters.put(\"64-bit dest. address\", HexUtils.prettyHexString(destAddress64.toString()));\n\t\tparameters.put(\"Options\", 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_130 | {
"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 testGetCommandValueAsString() {\n\t\t// Setup the resources for the test.\n\t\tint frameID = 0x10;\n\t\tXBee64BitAddress source64Addr = new XBee64BitAddress(\"0013A2004032D9AB\");\n\t\tXBee16BitAddress source16Addr = new XBee16BitAddress(\"D817\");\n\t\tATCommandStatus status = A... | {
"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 String getCommandValueAsString() {\n\t\tif (commandValue == null)\n\t\t\treturn null;\n\t\treturn new String(commandValue);\n\t}",
"class_method_signature": "RemoteATCommandResponsePacket.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_560 | {
"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 testGetPortParameters() {\n\t\t// Setup the resources for the test.\n\t\tSerialPortParameters expected = new SerialPortParameters(9600, 7, \n\t\t\t\t2, 1, 3);\n\t\tTestAbstractSerialPort port = Mockito.spy(new TestAbstractSerialPort(\"COM1\", expected));\n\t\t\n\t\t// Call the me... | {
"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 SerialPortParameters getPortParameters() {\n\t\tif (parameters != null)\n\t\t\treturn parameters;\n\t\treturn new SerialPortParameters(baudRate, DEFAULT_DATA_BITS, \n\t\t\t\tDEFAULT_STOP_BITS, DEFAULT_PARITY, DEFAULT_FLOW_CONTROL);\n\t}",
"class_method_signature": "AbstractSerialPort.getPortParame... | {
"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_51 | {
"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\tXBee16BitAddress source16Addr = new XBee16BitAddress(\"D817\");\n\t\tint options = 40;\n\t\tbyte[] receiv... | {
"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 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(\"16-bit source address... | {
"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_472 | {
"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 testGenerateByteArrayEmptyData() {\n\t\t// Setup the resources for the test.\n\t\tTestXBeePacket packet = new TestXBeePacket() {\n\t\t\tpublic byte[] getPacketData() {\n\t\t\t\treturn new byte[0];\n\t\t\t}\n\t\t};\n\t\tbyte[] expectedByteArray = new byte[] {(byte)SpecialByte.HEAD... | {
"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 byte[] generateByteArray() {\n\t\tchecksum.reset();\n\t\tbyte[] packetData = getPacketData();\n\t\tByteArrayOutputStream os = new ByteArrayOutputStream();\n\t\tos.write(SpecialByte.HEADER_BYTE.getValue());\n\t\tif (packetData != null) {\n\t\t\tbyte[] length = ByteUtils.shortToByteArray((short)packet... | {
"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_188 | {
"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 testCreatePacketPayloadNotIncludingFrameType() {\n\t\tbyte[] payload = new byte[20 + value.length];\n\t\tpayload[0] = (byte)frameID;\n\t\tSystem.arraycopy(ipv6address.getAddress(), 0, payload, 1, ipv6address.getAddress().length);\n\t\tSystem.arraycopy(command.getBytes(), 0, paylo... | {
"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 static IPv6RemoteATCommandResponsePacket createPacket(byte[] payload) {\n\t\tif (payload == null)\n\t\t\tthrow new NullPointerException(ERROR_PAYLOAD_NULL);\n\n\t\t// 1 (Frame type) + 1 (frame ID) + 16 (IPv6 source address) + 2 (AT command) + 1 (status)\n\t\tif (payload.length < MIN_API_PAYLOAD_LEN... | {
"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_537 | {
"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 testWriteDataByteArrayDataWriteIOException() 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\tMockito.doThrow(ne... | {
"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 void writeData(byte[] data) throws IOException {\n\t\tif (data == null)\n\t\t\tthrow new NullPointerException(\"Data to be sent cannot be null.\");\n\t\t\n\t\tif (getOutputStream() != null) {\n\t\t\t// Writing data in ports without any device connected and configured with \n\t\t\t// har... | {
"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_167 | {
"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 testGetAPIPacketParametersReceivedDataNotNull() throws OperationNotSupportedException {\n\t\t// Setup the resources for the test.\n\t\tbyte[] receivedData = new byte[]{(byte)0xFF, (byte)0xFF, (byte)0xFF, (byte)0xFF, (byte)0xFF, (byte)0xFF, 0x02, 0x0C, 0x00, (byte)0xFA, 0x04, (byt... | {
"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": "@Override\n\tpublic LinkedHashMap<String, String> getAPIPacketParameters() {\n\t\tLinkedHashMap<String, String> parameters = new LinkedHashMap<String, String>();\n\t\tparameters.put(\"IPv6 source address\", HexUtils.prettyHexString(HexUtils.byteArrayToHexString(sourceAddress.getAddress())) +\n\t\t\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_6 | {
"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 testNotSupportedOperationSetPowerLevel() 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 that... | {
"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 setPowerLevel(PowerLevel powerLevel) 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.setPowerLevel(PowerLevel powerLevel)",
"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_47 | {
"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(\"IO Data Sample RX Indicator packet payload cannot be null.\")));\n\t\t\n\t\t// Call 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": "public static IODataSampleRxIndicatorPacket createPacket(byte[] payload) {\n\t\tif (payload == null)\n\t\t\tthrow new NullPointerException(\"IO Data Sample RX Indicator 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 (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_608 | {
"fields": [],
"file": "library/src/test/java/com/digi/xbee/api/exceptions/TransmitExceptionTest.java",
"identifier": "TransmitExceptionTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n\tpublic final void testGetMessageOnlyTransmitStatusAndMessageNull() {\n\t\t// Setup the resources for the test.\n\t\tXBeeTransmitStatus transmitStatus = XBeeTransmitStatus.WIFI_PHYSICAL_ERROR;\n\t\tString message = null;\n\t\tTransmitException e = new TransmitException(message, transmitStatus);\n\t... | {
"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": "@Override\n\tpublic String getMessage() {\n\t\tString message = super.getMessage();\n\t\t\n\t\tif (message == null)\n\t\t\tmessage = \"\";\n\t\t\n\t\tif (transmitStatus != null) {\n\t\t\tif (message.length() > 0)\n\t\t\t\tmessage = message + \" > \";\n\t\t\tmessage = message + transmitStatus.toString();\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_258 | {
"fields": [
{
"declarator": "frameType = APIFrameType.FRAME_ERROR.getValue()",
"modifier": "private",
"original_string": "private int frameType = APIFrameType.FRAME_ERROR.getValue();",
"type": "int",
"var_name": "frameType"
},
{
"declarator": "error = FrameError.INVAL... | {
"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(\"Frame Error packet payload cannot be null.\")));\n\n\t\t// Call the method under tes... | {
"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": "ERROR_PAYLOAD_NULL = \"Fram... | {
"body": "public static FrameErrorPacket 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) != APIFra... | {
"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_464 | {
"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\tXBee16BitAddress source16Addr = new XBee16BitAddress(\"D817\");\n\t\tint rssi = 75;\n\t\tint options = 40;\n\t\tbyte[] receivedData = null;\n\t\tRX16Packet packet = new RX16Packet(source... | {
"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 LinkedHashMap<String, String> getAPIPacketParameters() {\n\t\tLinkedHashMap<String, String> parameters = new LinkedHashMap<String, String>();\n\t\tparameters.put(\"16-bit source address\", HexUtils.prettyHexString(sourceAddress16.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_171 | {
"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 testGetRFDataValidData() {\n\t\t// Setup the resources for the test.\n\t\tbyte[] receivedData = new byte[]{0x68, 0x6F, 0x6C, 0x61, (byte)0x98, 0x11, 0x32};\n\t\tIPv6IODataSampleRxIndicator packet = new IPv6IODataSampleRxIndicator(ipv6address, receivedData);\n\t\t\n\t\t// Call the... | {
"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 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": "IPv6IODataSampleRxIndicator.getRFData()",
"constructor": false,
"full_signature": "public byte[] getRFData()",
"identifier": "getRFData",
"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_521 | {
"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 testGetPort() {\n\t\t// Setup the resources for the test.\n\t\tString name = \"COM1\";\n\t\tTestAbstractSerialPort port = new TestAbstractSerialPort(name, 9600);\n\t\t\n\t\t// Call the method under test.\n\t\tString result = port.getPort();\n\t\t\n\t\t// Verify the result.\n\t\ta... | {
"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 String getPort() {\n\t\treturn port;\n\t}",
"class_method_signature": "AbstractSerialPort.getPort()",
"constructor": false,
"full_signature": "public String getPort()",
"identifier": "getPort",
"invocations": [],
"modifiers": "public",
"parameters": "()",
"return": "String",
"signa... | {
"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_10 | {
"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 testGetPacketDataGetAPIDataNull() {\n\t\t// Setup the resources for the test.\n\t\tAPIFrameType frameType = APIFrameType.GENERIC;\n\t\tTestXBeeAPIPacket packet = new TestXBeeAPIPacket(frameType) {\n\t\t\t@Override\n\t\t\tpublic byte[] getAPIData() {\n\t\t\t\treturn null;\n\t\t\t}... | {
"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\tpublic byte[] getPacketData() {\n\t\tByteArrayOutputStream data = new ByteArrayOutputStream();\n\t\t\n\t\tdata.write(frameTypeValue);\n\t\t\n\t\tbyte[] apiData = getAPIData();\n\t\tif (apiData == null)\n\t\t\tapiData = new byte[0];\n\t\tif (apiData != null && apiData.length > 0) {\n\t\t\ttry {... | {
"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_433 | {
"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 dest16Addr = new XBee16BitAddress(\"EF13\");\n\t\tint options = 0x04;\n\t\tbyte[] data = new byte[]{0x68, 0x6F, 0x6C, 0x61};\n\t\t\n\t\tbyte[]... | {
"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": "public static TX16Packet createPacket(byte[] payload) {\n\t\tif (payload == null)\n\t\t\tthrow new NullPointerException(\"TX16 Request packet payload cannot be null.\");\n\t\t\n\t\t// 1 (Frame type) + 1 (frame ID) + 2 (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_599 | {
"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 testNotSupportedOperationSendDataAsync() 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 shoul... | {
"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 sendDataAsync(RemoteXBeeDevice remoteXBeeDevice, byte[] data)\n\t\t\tthrows XBeeException {\n\t\t// Not supported in IPv6 modules.\n\t\tthrow new UnsupportedOperationException(OPERATION_EXCEPTION);\n\t}",
"class_method_signature": "IPv6Device.sendDataAsync(RemoteXBeeDevice remote... | {
"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_576 | {
"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 testGetDigitalHSBMask() {\n\t\t// Setup the resources for the test.\n\t\tIOSample ioSample = new IOSample(IO_DATA_ONLY_DIGITAL);\n\t\tint expected = IO_DATA_ONLY_DIGITAL[1] & 0x7F;\n\t\t\n\t\t// Call the method under test.\n\t\tint result = ioSample.getDigitalHSBMask();\n\t\t\n\t\t// V... | {
"fields": [
{
"declarator": "ioSamplePayload",
"modifier": "private final",
"original_string": "private final byte[] ioSamplePayload;",
"type": "byte[]",
"var_name": "ioSamplePayload"
},
{
"declarator": "rawMask",
"modifier": "private",
"original_string": ... | {
"body": "public int getDigitalHSBMask() {\n\t\treturn digitalHSBMask;\n\t}",
"class_method_signature": "IOSample.getDigitalHSBMask()",
"constructor": false,
"full_signature": "public int getDigitalHSBMask()",
"identifier": "getDigitalHSBMask",
"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_126 | {
"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\tXBee64BitAddress source64Addr = new XBee64BitAddress(\"0013A2004032D9AB\");\n\t\tXBee16BitAddress source16Addr = new XBee16BitAddress(\"D817\");\n\t\tATCom... | {
"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": "@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(\"16-bit source address... | {
"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_84 | {
"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 AT Command packet.\")));\n\t\t\n\t\t// Call the method under 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 static ATCommandPacket createPacket(byte[] payload) {\n\t\tif (payload == null)\n\t\t\tthrow new NullPointerException(\"AT Command packet payload cannot be null.\");\n\t\t\n\t\t// 1 (Frame type) + 1 (frame ID) + 2 (AT command)\n\t\tif (payload.length < MIN_API_PAYLOAD_LENGTH)\n\t\t\tthrow new Illega... | {
"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_331 | {
"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 testSetTransmitOptionsIllegal() {\n\t\t// Set up the resources for the test.\n\t\tTXIPv4Packet packet = new TXIPv4Packet(frameID, destAddress, destPort, sourcePort, protocol, transmitOptions, data);\n\n\t\texception.expect(IllegalArgumentException.class);\n\t\texception.expectMes... | {
"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 void setTransmitOptions(int transmitOptions) {\n\t\tif (transmitOptions != OPTIONS_CLOSE_SOCKET && transmitOptions != OPTIONS_LEAVE_SOCKET_OPEN)\n\t\t\tthrow new IllegalArgumentException(ERROR_OPTIONS_INVALID);\n\n\t\tthis.transmitOptions = transmitOptions;\n\t}",
"class_method_signature": "TXIPv4... | {
"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_761 | {
"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 testPrettyHexStringEmptyByteArray() {\n\t\t// Setup the resources for the test.\n\t\tbyte[] array = new byte[0];\n\t\tString expectedResult = \"\";\n\t\t\n\t\t// Call the method under test.\n\t\tString result = HexUtils.prettyHexString(array);\n\t\t\n\t\t// Verify the result.\n\t... | {
"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 prettyHexString(String hexString) {\n\t\tif (hexString == null)\n\t\t\tthrow new NullPointerException(\"Hexadecimal string cannot be null.\");\n\t\t\n\t\tString copy = hexString.toUpperCase();\n\t\tfor (final char c : copy.toCharArray()) {\n\t\t\tif (!HEXES.contains(\"\"+c))\n\t\t\t\tt... | {
"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_274 | {
"fields": [
{
"declarator": "frameType = APIFrameType.DEVICE_RESPONSE_STATUS.getValue()",
"modifier": "private",
"original_string": "private int frameType = APIFrameType.DEVICE_RESPONSE_STATUS.getValue();",
"type": "int",
"var_name": "frameType"
},
{
"declarator": "fr... | {
"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 = \"Devi... | {
"body": "public static DeviceResponseStatusPacket 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_624 | {
"fields": [],
"file": "library/src/test/java/com/digi/xbee/api/exceptions/ATCommandExceptionTest.java",
"identifier": "ATCommandExceptionTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n\tpublic final void testGetMessageOnlyCommandStatus() {\n\t\t// Setup the resources for the test.\n\t\tATCommandStatus atCommandStatus = ATCommandStatus.UNKNOWN;\n\t\tATCommandException e = new ATCommandException(atCommandStatus);\n\t\t\n\t\t// Call the method under test.\n\t\tString result = e.getM... | {
"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": "@Override\n\tpublic String getMessage() {\n\t\tString message = super.getMessage();\n\t\t\n\t\tif (message == null)\n\t\t\tmessage = \"\";\n\t\t\n\t\tif (atCommandStatus != null) {\n\t\t\tif (message.length() > 0)\n\t\t\t\tmessage = message + \" > \";\n\t\t\tmessage = message + atCommandStatus.getDescripti... | {
"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_448 | {
"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 testIsBroadcastWithBroadcastOptionBit1Enabled() {\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 = 0x22; /* bit 1 */\n\t\tbyte[] receivedData = new byte[]{(byte)0xFF, ... | {
"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 boolean isBroadcast() {\n\t\treturn ByteUtils.isBitEnabled(getReceiveOptions(), 1)\n\t\t\t\t|| ByteUtils.isBitEnabled(getReceiveOptions(), 2);\n\t}",
"class_method_signature": "RX64IOPacket.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_736 | {
"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 testNewByteArrayFinalSizeLessThanOriginal() {\n\t\t// Setup the resources for the test.\n\t\tbyte[] original = new byte[]{'1', '2', '3', '4'};\n\t\tbyte[] expectedResult = new byte[]{'1'};\n\t\t\n\t\t// Call the method under test.\n\t\tbyte[] result = ByteUtils.newByteArray(origi... | {
"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_366 | {
"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 testGetDataValidData() {\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.\n\t\tString result = packet.getData();\n\n\t\t// Verify the result.\n\t\tassertThat(\"Data must be the same\", r... | {
"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 String getData() {\n\t\treturn this.data;\n\t}",
"class_method_signature": "RXSMSPacket.getData()",
"constructor": false,
"full_signature": "public String getData()",
"identifier": "getData",
"invocations": [],
"modifiers": "public",
"parameters": "()",
"return": "String",
"signatu... | {
"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_673 | {
"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 testNotSupportedOperationReadDataFrom() 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... | {
"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 XBeeMessage readDataFrom(RemoteXBeeDevice remoteXBeeDevice) {\n\t\t// Not supported in IP modules.\n\t\tthrow new UnsupportedOperationException(OPERATION_EXCEPTION);\n\t}",
"class_method_signature": "IPDevice.readDataFrom(RemoteXBeeDevice remoteXBeeDevice)",
"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_389 | {
"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 Response (Wi-Fi) packet.\")));\n\n\t\t// Cal... | {
"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 RemoteATCommandResponseWifiPacket 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] ... | {
"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_223 | {
"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 testGetDataNullData() {\n\t\t// Set up the resources for the test.\n\t\tdata = null;\n\n\t\tTXIPv6Packet packet = new TXIPv6Packet(frameID, destAddress, destPort, sourcePort, protocol, data);\n\n\t\t// Call the method under test.\n\t\tbyte[] result = packet.getData();\n\n\t\t// V... | {
"fields": [
{
"declarator": "MIN_API_PAYLOAD_LENGTH = 24",
"modifier": "private static final",
"original_string": "private static final int MIN_API_PAYLOAD_LENGTH = 24;",
"type": "int",
"var_name": "MIN_API_PAYLOAD_LENGTH"
},
{
"declarator": "ERROR_PAYLOAD_NULL = \"TX... | {
"body": "public byte[] getData() {\n\t\tif (data == null)\n\t\t\treturn null;\n\t\treturn Arrays.copyOf(data, data.length);\n\t}",
"class_method_signature": "TXIPv6Packet.getData()",
"constructor": false,
"full_signature": "public byte[] getData()",
"identifier": "getData",
"invocations": [
"copyOf"
... | {
"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_809 | {
"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 void testCreateWithValidString() {\n\t\t// Test with valid string.\n\t\tXBeeIMEIAddress imei = null;\n\t\ttry {\n\t\t\timei = new XBeeIMEIAddress(VALID_STRING);\n\t\t} catch (Exception e) {\n\t\t\tfail(\"This exception should have not been thrown.\");\n\t\t}\n\t\t\n\t\tassertEquals(EXPECTED... | {
"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": "public String getValue() {\n\t\treturn HexUtils.byteArrayToHexString(address).substring(1);\n\t}",
"class_method_signature": "XBeeIMEIAddress.getValue()",
"constructor": false,
"full_signature": "public String getValue()",
"identifier": "getValue",
"invocations": [
"substring",
"byteArray... | {
"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_370 | {
"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 testCreatePacketPayloadShorterThanNeeded() {\n\t\t// Set up the resources for the test.\n\t\tbyte[] payload = new byte[10];\n\t\tpayload[0] = (byte)frameType;\n\t\tSystem.arraycopy(new byte[]{0x00, 0x00, 0x00, 0x00}, 0, payload, 1, 4);\n\t\tSystem.arraycopy(sourceAddress.getAddre... | {
"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 static IODataSampleRxIndicatorWifiPacket 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] ... | {
"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_720 | {
"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 testReadIntegerFromByteNegativeLength() {\n\t\t// Setup the resources for the test.\n\t\texception.expect(IllegalArgumentException.class);\n\t\texception.expectMessage(is(equalTo(\"Length must be between 0 and 8.\")));\n\t\t\n\t\t// Call the method under test.\n\t\tByteUtils.read... | {
"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 readIntegerFromByte(byte containerByte, int bitOffset, int bitLength) {\n\t\tif (bitOffset < 0 || bitOffset > 7)\n\t\t\tthrow new IllegalArgumentException(\"Offset must be between 0 and 7.\");\n\t\tif (bitLength < 0 || bitLength > 7)\n\t\t\tthrow new IllegalArgumentException(\"Length must... | {
"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_235 | {
"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\tRXIPv6Packet packet = new RXIPv6Packet(destAddress, sourceAddress, destPort, sourcePort, protocol, data);\n\n\t\texception.expect(IllegalArgumentException.class);\n\t\texception.expectMessage(is(equalTo(\"D... | {
"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 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": "RXIPv6Packet.setDestPort(int destPort)",
"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_665 | {
"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 testNotSupportedOperationGetDestinationAddress() 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": "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 XBee64BitAddress getDestinationAddress() throws TimeoutException,\n\t\t\tXBeeException {\n\t\t// Not supported in IP modules.\n\t\tthrow new UnsupportedOperationException(OPERATION_EXCEPTION);\n\t}",
"class_method_signature": "IPDevice.getDestinationAddress()",
"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_409 | {
"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.RX_IO_16.getValue();\n\t\tXBee16BitAddress source16Addr = new XBee16BitAddress(\"A1B2\");\n\t\tint rssi = 40;\n\t\t\n\t\tbyte[] payload = new byte[4];\n\t\tpay... | {
"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 RX16IOPacket createPacket(byte[] payload) {\n\t\tif (payload == null)\n\t\t\tthrow new NullPointerException(\"RX16 Address IO packet payload cannot be null.\");\n\t\t\n\t\t// 1 (Frame type) + 2 (16-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_777 | {
"fields": [
{
"declarator": "INVALID_BYTE_ARRAY = new byte[]{0x01, 0x02, 0x03}",
"modifier": "private final static",
"original_string": "private final static byte[] INVALID_BYTE_ARRAY = new byte[]{0x01, 0x02, 0x03};",
"type": "byte[]",
"var_name": "INVALID_BYTE_ARRAY"
},
{
... | {
"body": "@Test\n\tpublic final void testEqualsWithNonXBeePacket() {\n\t\t// Setup the resources for the test.\n\t\tXBee16BitAddress addr = new XBee16BitAddress(\"0x1234\");\n\t\t\n\t\t// Call the method under test.\n\t\tboolean areEqual = addr.equals(new Object());\n\t\t\n\t\t// Verify the result.\n\t\tassertThat(\... | {
"fields": [
{
"declarator": "COORDINATOR_ADDRESS = new XBee16BitAddress(\"0000\")",
"modifier": "public static final",
"original_string": "public static final XBee16BitAddress COORDINATOR_ADDRESS = new XBee16BitAddress(\"0000\");",
"type": "XBee16BitAddress",
"var_name": "COORDINAT... | {
"body": "@Override\n\tpublic boolean equals(Object obj) {\n\t\tif (!(obj instanceof XBee16BitAddress))\n\t\t\treturn false;\n\t\tXBee16BitAddress addr = (XBee16BitAddress)obj;\n\t\treturn Arrays.equals(addr.getValue(), getValue());\n\t}",
"class_method_signature": "XBee16BitAddress.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_327 | {
"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 testSetDestPortBigger() {\n\t\t// Set up the resources for the test.\n\t\tTXIPv4Packet packet = new TXIPv4Packet(frameID, destAddress, destPort, sourcePort, protocol, transmitOptions, data);\n\n\t\texception.expect(IllegalArgumentException.class);\n\t\texception.expectMessage(is(... | {
"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 void setDestPort(int destPort) {\n\t\tif (destPort < 0 || destPort > 65535)\n\t\t\tthrow new IllegalArgumentException(ERROR_PORT_ILLEGAL);\n\n\t\tthis.destPort = destPort;\n\t}",
"class_method_signature": "TXIPv4Packet.setDestPort(int destPort)",
"constructor": false,
"full_signature": "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_92 | {
"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\tATCommandPacket packet = new ATCommandPacket(frameID, command, parameterToSet);\n\t\t\n\t\t// Call the m... | {
"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": "ATCommandPacket.getParameterAsString()",
"constructor": false,
"full_signature": "public String getParameterAsString()",
"identifier": "getPara... | {
"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_632 | {
"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 testSetIPAddressingModeNull() throws Exception {\n\t\t// Set up the resources for the test.\n\t\texception.expect(NullPointerException.class);\n\t\texception.expectMessage(is(equalTo(\"IP addressing mode cannot be null.\")));\n\n\t\t// Call the method under test that should throw a Nul... | {
"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 setIPAddressingMode(IPAddressingMode mode) throws TimeoutException, XBeeException {\n\t\tif (mode == null)\n\t\t\tthrow new NullPointerException(\"IP addressing mode cannot be null.\");\n\t\t\n\t\tsetParameter(\"MA\", ByteUtils.intToByteArray(mode.getID()));\n\t}",
"class_method_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_262 | {
"fields": [
{
"declarator": "frameType = APIFrameType.FRAME_ERROR.getValue()",
"modifier": "private",
"original_string": "private int frameType = APIFrameType.FRAME_ERROR.getValue();",
"type": "int",
"var_name": "frameType"
},
{
"declarator": "error = FrameError.INVAL... | {
"body": "@Test\n\tpublic final void testGetAPIPacketParameters() {\n\t\t// Set up the resources for the test.\n\t\tFrameErrorPacket packet = new FrameErrorPacket(error);\n\n\t\t// Call the method under test.\n\t\tLinkedHashMap<String, String> packetParams = packet.getAPIPacketParameters();\n\n\t\t// Verify the resu... | {
"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": "ERROR_PAYLOAD_NULL = \"Fram... | {
"body": "@Override\n\tpublic LinkedHashMap<String, String> getAPIPacketParameters() {\n\t\tLinkedHashMap<String, String> parameters = new LinkedHashMap<String, String>();\n\t\tparameters.put(\"Error\", HexUtils.prettyHexString(HexUtils.integerToHexString(error.getID(), 1)) + \" (\" + error.getName() + \")\");\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_798 | {
"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 testEqualsWithNonXBeePacket() {\n\t\t// Setup the resources for the test.\n\t\tXBee64BitAddress addr = new XBee64BitAddress(\"0x0013A20040123456\");\n\t\t\n\t\t// Call the method under test.\n\t\tboolean areEqual = addr.equals(new Object());\n\t\t\n\t\t// Verify the result.\n\t\t... | {
"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_133 | {
"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 testGetCommandValueNullValue() {\n\t\t// Setup the resources for the test.\n\t\tint frameID = 0x10;\n\t\tXBee64BitAddress source64Addr = new XBee64BitAddress(\"0013A2004032D9AB\");\n\t\tXBee16BitAddress source16Addr = new XBee16BitAddress(\"D817\");\n\t\tATCommandStatus status = ... | {
"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 byte[] getCommandValue() {\n\t\treturn commandValue;\n\t}",
"class_method_signature": "RemoteATCommandResponsePacket.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_563 | {
"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 testToStringParityOdd() {\n\t\t// Setup the resources for the test.\n\t\tSerialPortParameters params = new SerialPortParameters(115200, 7, 2, 1, 3);\n\t\tTestAbstractSerialPort port = Mockito.spy(new TestAbstractSerialPort(\"COM1\", params));\n\t\tString expected = \"[COM1 - 115200/7/O... | {
"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_426 | {
"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\tXBee64BitAddress dest64Addr = new XBee64BitAddress(\"0013A2004032D9AB\");\n\t\tint options = 40;\n\t\tbyte[] data = new byte[]{0x68, 0x6F, 0x6C, 0x61};\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": "transmitOptions",
"... | {
"body": "@Override\n\tpublic boolean isBroadcast() {\n\t\treturn get64bitDestinationAddress().equals(XBee64BitAddress.BROADCAST_ADDRESS);\n\t}",
"class_method_signature": "TX64Packet.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_308 | {
"fields": [
{
"declarator": "frameType = APIFrameType.DEVICE_RESPONSE.getValue()",
"modifier": "private",
"original_string": "private int frameType = APIFrameType.DEVICE_RESPONSE.getValue();",
"type": "int",
"var_name": "frameType"
},
{
"declarator": "frameID = 0x01",... | {
"body": "@Test\n\tpublic final void testGetAPIPacketParametersDataNotNull() {\n\t\t// Set up the resources for the test.\n\t\tDeviceResponsePacket packet = new DeviceResponsePacket(frameID, requestID, data);\n\n\t\t// Call the method under test.\n\t\tLinkedHashMap<String, String> packetParams = packet.getAPIPacketP... | {
"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": "ERROR_PAYLOAD_NULL = \"Devi... | {
"body": "@Override\n\tpublic LinkedHashMap<String, String> getAPIPacketParameters() {\n\t\tLinkedHashMap<String, String> parameters = new LinkedHashMap<String, String>();\n\t\tparameters.put(\"Device Request ID\", HexUtils.prettyHexString(HexUtils.integerToHexString(requestID, 1)) + \" (\" + requestID + \")\");\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_758 | {
"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 testPrettyHexStringEmptyString() {\n\t\t// Setup the resources for the test.\n\t\tString s = \"\";\n\t\tString expectedResult = \"\";\n\t\t\n\t\t// Call the method under test.\n\t\tString result = HexUtils.prettyHexString(s);\n\t\t\n\t\t// Verify the result.\n\t\tassertThat(\"Ret... | {
"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 prettyHexString(String hexString) {\n\t\tif (hexString == null)\n\t\t\tthrow new NullPointerException(\"Hexadecimal string cannot be null.\");\n\t\t\n\t\tString copy = hexString.toUpperCase();\n\t\tfor (final char c : copy.toCharArray()) {\n\t\t\tif (!HEXES.contains(\"\"+c))\n\t\t\t\tt... | {
"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_52 | {
"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 testGetAPIPacketParametersInvalidReceivedData() {\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 = 40;\n\t\tbyte[] rec... | {
"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 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(\"16-bit source address... | {
"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_5 | {
"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 testNotSupportedOperationGetPowerLevel() 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 that... | {
"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 PowerLevel getPowerLevel() throws TimeoutException, XBeeException {\n\t\t// Not supported in Cellular.\n\t\tthrow new UnsupportedOperationException(OPERATION_EXCEPTION);\n\t}",
"class_method_signature": "CellularDevice.getPowerLevel()",
"constructor": false,
"full_signature": "@Ov... | {
"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_534 | {
"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 testFlushExceptionWhenFlushing() throws IOException {\n\t\t// Setup the resources for the test.\n\t\tTestAbstractSerialPort port = Mockito.spy(new TestAbstractSerialPort(\"COM1\", 9600));\n\t\tMockito.doThrow(new IOException(\"IO exception\")).when(mockOutputStream).flush();\n\t\... | {
"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 flush() {\n\t\tif (getOutputStream() != null) {\n\t\t\ttry {\n\t\t\t\tgetOutputStream().flush();\n\t\t\t} catch (IOException e) {\n\t\t\t\tlogger.error(e.getMessage(), e);\n\t\t\t}\n\t\t}\n\t}",
"class_method_signature": "AbstractSerialPort.flush()",
"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_164 | {
"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 testCreatePacketPayloadNotIncludingFrameType() {\n\t\t// Setup the resources for the test.\n\t\tbyte[] data = new byte[]{(byte)0xFF, (byte)0xFF, (byte)0xFF, (byte)0xFF, (byte)0xFF};\n\t\t\n\t\tbyte[] payload = new byte[ipv6address.getAddress().length + data.length];\n\t\tSystem.a... | {
"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_471 | {
"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 testGenerateByteArrayNullData() {\n\t\t// Setup the resources for the test.\n\t\tTestXBeePacket packet = new TestXBeePacket();\n\t\tbyte[] expectedByteArray = new byte[] {(byte)SpecialByte.HEADER_BYTE.getValue(), 0x00, 0x00,(byte)0xFF};\n\n\t\t// Call the method under test.\n\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": "public byte[] generateByteArray() {\n\t\tchecksum.reset();\n\t\tbyte[] packetData = getPacketData();\n\t\tByteArrayOutputStream os = new ByteArrayOutputStream();\n\t\tos.write(SpecialByte.HEADER_BYTE.getValue());\n\t\tif (packetData != null) {\n\t\t\tbyte[] length = ByteUtils.shortToByteArray((short)packet... | {
"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_44 | {
"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 testGetAPIDataUnknownDiscoveryStatus() {\n\t\t// Setup the resources for the test.\n\t\tint frameType = APIFrameType.TRANSMIT_STATUS.getValue();\n\t\tint frameID = 0xE7;\n\t\tXBee16BitAddress address = new XBee16BitAddress(\"B45C\");\n\t\tint retryCount = 3;\n\t\tint deliveryStat... | {
"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_172 | {
"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 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(\"CoAP Tx Request packet payload cannot be null.\")));\n\n\t\t// Call the method under... | {
"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_488 | {
"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 testParsePacketATOperatingMode() throws InvalidPacketException {\n\t\t// Setup the resources for the test.\n\t\texception.expect(IllegalArgumentException.class);\n\t\texception.expectMessage(is(equalTo(\"Operating mode must be API or API Escaped.\")));\n\t\t\n\t\t// Call the meth... | {
"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_522 | {
"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 testIsHardwareFlowControlNoHwFlowControl() {\n\t\t// Setup the resources for the test.\n\t\tSerialPortParameters params = new SerialPortParameters(9600, 8, 1, 0, 0); // 0 - No Hardware flow control\n\t\tTestAbstractSerialPort port = new TestAbstractSerialPort(\"COM1\", params);\n... | {
"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 boolean isHardwareFlowControl() {\n\t\treturn parameters.flowControl == FLOW_CONTROL_HW;\n\t}",
"class_method_signature": "AbstractSerialPort.isHardwareFlowControl()",
"constructor": false,
"full_signature": "public boolean isHardwareFlowControl()",
"identifier": "isHardwareFlowControl",
"... | {
"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_467 | {
"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 testIsBroadcastWithBroadcastOptionBit1Enabled() {\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 = 0x52; /* bit 1 */\n\t\tbyte[] receivedData = new byte[]{0x68, 0x6F, 0x6C, 0x61};... | {
"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": "RX16Packet.isBroadcast()",
"constructor": false,
"full_signature": "@Override public boolean 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_349 | {
"fields": [
{
"declarator": "frameType = APIFrameType.TX_SMS.getValue()",
"modifier": "private",
"original_string": "private int frameType = APIFrameType.TX_SMS.getValue();",
"type": "int",
"var_name": "frameType"
},
{
"declarator": "frameID = 0x01",
"modifier":... | {
"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 = new byte[22];\n\t\tpayload[0] = (byte)frameType;\n\t\tpayload[1] = (byte)frameID;\n\t\tSystem.... | {
"fields": [
{
"declarator": "PHONE_NUMBER_LENGTH = 20",
"modifier": "static final",
"original_string": "static final int PHONE_NUMBER_LENGTH = 20;",
"type": "int",
"var_name": "PHONE_NUMBER_LENGTH"
},
{
"declarator": "PHONE_NUMBER_PATTERN = \"^\\\\+?\\\\d+$\"",
... | {
"body": "public static TXSMSPacket 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_719 | {
"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 testReadIntegerFromByteOffsetGreaterThanLen() {\n\t\t// Setup the resources for the test.\n\t\texception.expect(IllegalArgumentException.class);\n\t\texception.expectMessage(is(equalTo(\"Offset must be between 0 and 7.\")));\n\t\t\n\t\t// Call the method under test.\n\t\tByteUtil... | {
"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 readIntegerFromByte(byte containerByte, int bitOffset, int bitLength) {\n\t\tif (bitOffset < 0 || bitOffset > 7)\n\t\t\tthrow new IllegalArgumentException(\"Offset must be between 0 and 7.\");\n\t\tif (bitLength < 0 || bitLength > 7)\n\t\t\tthrow new IllegalArgumentException(\"Length must... | {
"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_13 | {
"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 testGetPacketDataWithDataNoFrameID() {\n\t\t// Setup the resources for the test.\n\t\tAPIFrameType frameType = APIFrameType.GENERIC;\n\t\tfinal byte[] packetData = new byte[] {0x00, 0x01, 0x02};\n\t\tTestXBeeAPIPacket packet = new TestXBeeAPIPacket(frameType) {\n\t\t\t@Override\n... | {
"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\tpublic byte[] getPacketData() {\n\t\tByteArrayOutputStream data = new ByteArrayOutputStream();\n\t\t\n\t\tdata.write(frameTypeValue);\n\t\t\n\t\tbyte[] apiData = getAPIData();\n\t\tif (apiData == null)\n\t\t\tapiData = new byte[0];\n\t\tif (apiData != null && apiData.length > 0) {\n\t\t\ttry {... | {
"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_575 | {
"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 testGetAnalogValuesModify() {\n\t\t// Setup the resources for the test.\n\t\tIOSample ioSample = new IOSample(IO_DATA_MIXED);\n\t\t\n\t\t// Call the method under test.\n\t\tHashMap<IOLine, Integer> values = ioSample.getAnalogValues();\n\t\tHashMap<IOLine, Integer> backup = new IOSample... | {
"fields": [
{
"declarator": "ioSamplePayload",
"modifier": "private final",
"original_string": "private final byte[] ioSamplePayload;",
"type": "byte[]",
"var_name": "ioSamplePayload"
},
{
"declarator": "rawMask",
"modifier": "private",
"original_string": ... | {
"body": "public HashMap<IOLine, Integer> getAnalogValues() {\n\t\treturn (HashMap<IOLine, Integer>) analogValuesMap.clone();\n\t}",
"class_method_signature": "IOSample.getAnalogValues()",
"constructor": false,
"full_signature": "public HashMap<IOLine, Integer> getAnalogValues()",
"identifier": "getAnalogVal... | {
"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_125 | {
"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\tXBee64BitAddress source64Addr = new XBee64BitAddress(\"0013A2004032D9AB\");\n\t\tXBee16BitAddress source16Addr = new XBee16BitAddress(\"B45C\");\n\t\tbyte[] at... | {
"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_430 | {
"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(\"TX16 Request packet payload cannot be null.\")));\n\t\t\n\t\t// Call the method under... | {
"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": "public static TX16Packet createPacket(byte[] payload) {\n\t\tif (payload == null)\n\t\t\tthrow new NullPointerException(\"TX16 Request packet payload cannot be null.\");\n\t\t\n\t\t// 1 (Frame type) + 1 (frame ID) + 2 (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_68 | {
"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 testGetRFDataInvalidData() {\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\tint destEndpoint = 0xA... | {
"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 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": "ExplicitRxIndicatorPacket.getRFData()",
"constructor": false,
"full_signature": "public byte[] getRFData()",
"identifier": "getRFData",
"inv... | {
"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_277 | {
"fields": [
{
"declarator": "frameType = APIFrameType.DEVICE_RESPONSE_STATUS.getValue()",
"modifier": "private",
"original_string": "private int frameType = APIFrameType.DEVICE_RESPONSE_STATUS.getValue();",
"type": "int",
"var_name": "frameType"
},
{
"declarator": "fr... | {
"body": "@Test\n\tpublic final void testIsBroadcast() {\n\t\t// Set up the resources for the test.\n\t\tDeviceResponseStatusPacket packet = new DeviceResponseStatusPacket(frameID, status);\n\n\t\t// Call the method under test and verify the result.\n\t\tassertThat(\"Packet should not be broadcast\", packet.isBroadc... | {
"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 = \"Devi... | {
"body": "@Override\n\tpublic boolean isBroadcast() {\n\t\treturn false;\n\t}",
"class_method_signature": "DeviceResponseStatusPacket.isBroadcast()",
"constructor": false,
"full_signature": "@Override public boolean isBroadcast()",
"identifier": "isBroadcast",
"invocations": [],
"modifiers": "@Override 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_627 | {
"fields": [],
"file": "library/src/test/java/com/digi/xbee/api/exceptions/ATCommandExceptionTest.java",
"identifier": "ATCommandExceptionTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n\tpublic final void testGetMessageOnlyCommandStatusNullAndMessage() {\n\t\t// Setup the resources for the test.\n\t\tATCommandStatus atCommandStatus = null;\n\t\tString message = \"This is the message\";\n\t\tATCommandException e = new ATCommandException(message, atCommandStatus);\n\t\t\n\t\t// Call... | {
"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": "@Override\n\tpublic String getMessage() {\n\t\tString message = super.getMessage();\n\t\t\n\t\tif (message == null)\n\t\t\tmessage = \"\";\n\t\t\n\t\tif (atCommandStatus != null) {\n\t\t\tif (message.length() > 0)\n\t\t\t\tmessage = message + \" > \";\n\t\t\tmessage = message + atCommandStatus.getDescripti... | {
"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_332 | {
"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 testGetDataNullData() {\n\t\t// Set up the resources for the test.\n\t\tdata = null;\n\n\t\tTXIPv4Packet packet = new TXIPv4Packet(frameID, destAddress, destPort, sourcePort, protocol, transmitOptions, data);\n\n\t\t// Call the method under test.\n\t\tbyte[] result = packet.getDa... | {
"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 byte[] getData() {\n\t\tif (data == null)\n\t\t\treturn null;\n\t\treturn Arrays.copyOf(data, data.length);\n\t}",
"class_method_signature": "TXIPv4Packet.getData()",
"constructor": false,
"full_signature": "public byte[] getData()",
"identifier": "getData",
"invocations": [
"copyOf"
... | {
"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.