id
stringlengths
7
14
test_class
dict
test_case
dict
focal_class
dict
focal_method
dict
repository
dict
21871478_290
{ "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 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(\"Device Request packet payload cannot be null.\")));\n\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": "ERROR_PAYLOAD_NULL = \"Devi...
{ "body": "public static DeviceRequestPacket createPacket(byte[] payload) {\n\t\tif (payload == null)\n\t\t\tthrow new NullPointerException(ERROR_PAYLOAD_NULL);\n\n\t\tif (payload.length < MIN_API_PAYLOAD_LENGTH)\n\t\t\tthrow new IllegalArgumentException(ERROR_INCOMPLETE_PACKET);\n\n\t\tif ((payload[0] & 0xFF) != API...
{ "created": null, "fork": null, "fork_count": 54, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 21871478, "size": 3156, "stargazer_count": 76, "stars": null, "updates": null, "url": "https://github.com/digidotcom/xbee-java" }
21871478_785
{ "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 testGetFirstPacketFrom() {\n\t\t// Create a mocked remote XBee device.\n\t\tRemoteXBeeDevice mockedRemoteDevice = Mockito.mock(RemoteXBeeDevice.class);\n\t\tMockito.when(mockedRemoteDevice.get64BitAddress()).thenReturn(xbee64BitAddress1);\n\t\t// Create an XBeePacketsQueue of 5 slots.\...
{ "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 getFirstPacketFrom(RemoteXBeeDevice remoteXBeeDevice, int timeout) {\n\t\tif (timeout > 0) {\n\t\t\tXBeePacket xbeePacket = getFirstPacketFrom(remoteXBeeDevice, 0);\n\t\t\t// Wait for a timeout or until an XBee packet from remoteXBeeDevice is read.\n\t\t\tLong deadLine = System.currentTim...
{ "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_60
{ "fields": [ { "declarator": "exception = ExpectedException.none()", "modifier": "@Rule\n\tpublic", "original_string": "@Rule\n\tpublic ExpectedException exception = ExpectedException.none();", "type": "ExpectedException", "var_name": "exception" } ], "file": "library/src/te...
{ "body": "@Test\n\tpublic final void testCreatePacketEmptyPayload() {\n\t\t// Setup the resources for the test.\n\t\tbyte[] payload = new byte[0];\n\t\texception.expect(IllegalArgumentException.class);\n\t\texception.expectMessage(is(equalTo(\"Incomplete Explicit Rx Indicator packet.\")));\n\t\t\n\t\t// Call the met...
{ "fields": [ { "declarator": "MIN_API_PAYLOAD_LENGTH = 18", "modifier": "private static final", "original_string": "private static final int MIN_API_PAYLOAD_LENGTH = 18;", "type": "int", "var_name": "MIN_API_PAYLOAD_LENGTH" }, { "declarator": "DATA_ENDPOINT = 0xE8", ...
{ "body": "public static ExplicitRxIndicatorPacket createPacket(byte[] payload) {\n\t\tif (payload == null)\n\t\t\tthrow new NullPointerException(\"Explicit Rx Indicator packet payload cannot be null.\");\n\t\t\n\t\t// 1 (Frame type) + 8 (64-bit address) + 2 (16-bit address) + 1 (source endpoint) + 1 (destination end...
{ "created": null, "fork": null, "fork_count": 54, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 21871478, "size": 3156, "stargazer_count": 76, "stars": null, "updates": null, "url": "https://github.com/digidotcom/xbee-java" }
21871478_156
{ "fields": [ { "declarator": "exception = ExpectedException.none()", "modifier": "@Rule\n\tpublic", "original_string": "@Rule\n\tpublic ExpectedException exception = ExpectedException.none();", "type": "ExpectedException", "var_name": "exception" } ], "file": "library/src/te...
{ "body": "@Test\n\tpublic final void testIsBroadcast() {\n\t\t// Setup the resources for the test.\n\t\tint frameID = 0x10;\n\t\tString command = \"DL\";\n\t\tATCommandStatus status = ATCommandStatus.UNKNOWN;\n\t\tbyte[] parameter = new byte[]{0x6D, 0x79, 0x44, 0x65, 0x76, 0x69, 0x63, 0x65};\n\t\tATCommandResponsePa...
{ "fields": [ { "declarator": "MIN_API_PAYLOAD_LENGTH = 5", "modifier": "private static final", "original_string": "private static final int MIN_API_PAYLOAD_LENGTH = 5;", "type": "int", "var_name": "MIN_API_PAYLOAD_LENGTH" }, { "declarator": "status", "modifier": ...
{ "body": "@Override\n\tpublic boolean isBroadcast() {\n\t\treturn false;\n\t}", "class_method_signature": "ATCommandResponsePacket.isBroadcast()", "constructor": false, "full_signature": "@Override public boolean isBroadcast()", "identifier": "isBroadcast", "invocations": [], "modifiers": "@Override publ...
{ "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_506
{ "fields": [ { "declarator": "exception = ExpectedException.none()", "modifier": "@Rule\n\tpublic", "original_string": "@Rule\n\tpublic ExpectedException exception = ExpectedException.none();", "type": "ExpectedException", "var_name": "exception" } ], "file": "library/src/te...
{ "body": "@Test\n\tpublic final void testEqualsWithNull() {\n\t\t// Setup the resources for the test.\n\t\tSerialPortParameters parameters = new SerialPortParameters(9600, 8, 1, 0, 0);\n\t\t\n\t\t// Call the method under test.\n\t\tboolean areEqual = parameters.equals(null);\n\t\t\n\t\t// Verify the result.\n\t\tass...
{ "fields": [ { "declarator": "HASH_SEED = 23", "modifier": "private static final", "original_string": "private static final int HASH_SEED = 23;", "type": "int", "var_name": "HASH_SEED" }, { "declarator": "baudrate", "modifier": "public final", "original_str...
{ "body": "@Override\n\tpublic boolean equals(Object obj) {\n\t\tif (obj instanceof SerialPortParameters)\n\t\t\treturn ((SerialPortParameters)obj).baudrate == baudrate \n\t\t\t\t&& ((SerialPortParameters)obj).dataBits == dataBits \n\t\t\t\t&& ((SerialPortParameters)obj).stopBits == stopBits\n\t\t\t\t&& ((SerialPortP...
{ "created": null, "fork": null, "fork_count": 54, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 21871478, "size": 3156, "stargazer_count": 76, "stars": null, "updates": null, "url": "https://github.com/digidotcom/xbee-java" }
21871478_443
{ "fields": [ { "declarator": "exception = ExpectedException.none()", "modifier": "@Rule\n\tpublic", "original_string": "@Rule\n\tpublic ExpectedException exception = ExpectedException.none();", "type": "ExpectedException", "var_name": "exception" } ], "file": "library/src/te...
{ "body": "@Test\n\tpublic final void testCreatePacketPayloadNotIncludingFrameType() {\n\t\t// Setup the resources for the test.\n\t\tXBee64BitAddress source64Addr = new XBee64BitAddress(\"0013A2004032D9AB\");\n\t\tint rssi = 40;\n\t\tint options = 0x01;\n\t\tbyte[] data = new byte[]{(byte)0xFF, (byte)0xFF, (byte)0xF...
{ "fields": [ { "declarator": "MIN_API_PAYLOAD_LENGTH = 11", "modifier": "private static final", "original_string": "private static final int MIN_API_PAYLOAD_LENGTH = 11;", "type": "int", "var_name": "MIN_API_PAYLOAD_LENGTH" }, { "declarator": "sourceAddress64", "...
{ "body": "public static RX64IOPacket createPacket(byte[] payload) {\n\t\tif (payload == null)\n\t\t\tthrow new NullPointerException(\"RX64 Address IO packet payload cannot be null.\");\n\t\t\n\t\t// 1 (Frame type) + 8 (64-bit address) + 1 (RSSI) + 1 (receive options)\n\t\tif (payload.length < MIN_API_PAYLOAD_LENGTH)...
{ "created": null, "fork": null, "fork_count": 54, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 21871478, "size": 3156, "stargazer_count": 76, "stars": null, "updates": null, "url": "https://github.com/digidotcom/xbee-java" }
21871478_654
{ "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": "@Test\n\tpublic void testSendIPDataAsyncProtocolIllegalTCPSSL() throws Exception {\n\t\t// Set up the resources for the test.\n\t\tInet6Address address = (Inet6Address) Inet6Address.getByName(\"FDB3:0001:0002:0000:0004:0005:0006:0007\");\n\t\tbyte[] data = \"Hello XBee\".getBytes();\n\t\tint destPort = 123...
{ "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\tpublic void sendIPDataAsync(Inet6Address ipv6Address, int destPort,\n\t\t\tIPProtocol protocol, byte[] data) throws XBeeException {\n\t\tif (protocol != IPProtocol.UDP && protocol != IPProtocol.COAP)\n\t\t\tthrow new IllegalArgumentException(ERROR_PROTOCOL_ILLEGAL);\n\t\tsuper.sendIPDataAsync(...
{ "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_204
{ "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 testGetAPIPacketParametersATCommandParameterByteArray() {\n\t\tIPv6RemoteATCommandRequestPacket packet = new IPv6RemoteATCommandRequestPacket(frameID, ipv6address, transmitOptions, command, parameter);\n\t\t\n\t\tString expectedDestAddr = HexUtils.prettyHexString(ipv6address.getA...
{ "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": "@Override\n\tpublic LinkedHashMap<String, String> getAPIPacketParameters() {\n\t\tLinkedHashMap<String, String> parameters = new LinkedHashMap<String, String>();\n\t\tparameters.put(\"Destination address\", HexUtils.prettyHexString(HexUtils.byteArrayToHexString(destAddress.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_711
{ "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 testByteArrayToStringEmptyArray() {\n\t\t// Setup the resources for the test.\n\t\tbyte[] byteArray = new byte[0];\n\t\tString expectedResult = \"\";\n\t\t\n\t\t// Call the method under test.\n\t\tString result = ByteUtils.byteArrayToString(byteArray);\n\t\t\n\t\t// Verify the re...
{ "fields": [], "file": "library/src/main/java/com/digi/xbee/api/utils/ByteUtils.java", "identifier": "ByteUtils", "interfaces": "", "methods": [ { "class_method_signature": "ByteUtils.readBytes(int numBytes, ByteArrayInputStream inputStream)", "constructor": false, "full_signature": "pu...
{ "body": "public static String byteArrayToString(byte[] value) {\n\t\tif (value == null)\n\t\t\tthrow new NullPointerException(\"Byte array cannot be null.\");\n\t\t\n\t\treturn new String(value);\n\t}", "class_method_signature": "ByteUtils.byteArrayToString(byte[] value)", "constructor": false, "full_signatur...
{ "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_341
{ "fields": [ { "declarator": "IP_ADDRESS = \"10.10.11.12\"", "modifier": "private static final", "original_string": "private static final String IP_ADDRESS = \"10.10.11.12\";", "type": "String", "var_name": "IP_ADDRESS" }, { "declarator": "frameType = APIFrameType.RX_I...
{ "body": "@Test\n\tpublic final void testSetDestPortBigger() {\n\t\t// Set up the resources for the test.\n\t\tRXIPv4Packet packet = new RXIPv4Packet(sourceAddress, destPort, sourcePort, protocol, data);\n\n\t\texception.expect(IllegalArgumentException.class);\n\t\texception.expectMessage(is(equalTo(\"Port must be b...
{ "fields": [ { "declarator": "MIN_API_PAYLOAD_LENGTH = 11", "modifier": "private static final", "original_string": "private static final int MIN_API_PAYLOAD_LENGTH = 11;", "type": "int", "var_name": "MIN_API_PAYLOAD_LENGTH" }, { "declarator": "ERROR_PAYLOAD_NULL = \"RX...
{ "body": "public void 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": "RXIPv4Packet.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_592
{ "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 testNotSupportedOperationRemoveDataListener() 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 ...
{ "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 removeDataListener(IDataReceiveListener listener) {\n\t\t// Not supported in IPv6 modules.\n\t\tthrow new UnsupportedOperationException(OPERATION_EXCEPTION);\n\t}", "class_method_signature": "IPv6Device.removeDataListener(IDataReceiveListener listener)", "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_438
{ "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\tint frameID = 0x65;\n\t\tXBee16BitAddress dest16Addr = new XBee16BitAddress(\"D817\");\n\t\tint options = 0x14; /* bit 2 */\n\t\tbyte[] data = null;\n\t\tTX16Packet packet = new TX16Packet(frameID, dest16Add...
{ "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 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": "TX16Packet.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_253
{ "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 testSetSourcePortBigger() {\n\t\t// Set up the resources for the test.\n\t\tCoAPRxResponsePacket packet = new CoAPRxResponsePacket(frameID, destAddress, sourceAddress, destPort, sourcePort, protocol, restFulStatus, data);\n\n\t\texception.expect(IllegalArgumentException.class);\n...
{ "fields": [ { "declarator": "MIN_API_PAYLOAD_LENGTH = 41", "modifier": "private static final", "original_string": "private static final int MIN_API_PAYLOAD_LENGTH = 41;", "type": "int", "var_name": "MIN_API_PAYLOAD_LENGTH" }, { "declarator": "ERROR_PAYLOAD_NULL = \"Co...
{ "body": "public void setSourcePort(int sourcePort) {\n\t\tif (sourcePort < 0 || sourcePort > 65535)\n\t\t\tthrow new IllegalArgumentException(ERROR_SOURCE_PORT_ILLEGAL);\n\n\t\tthis.sourcePort = sourcePort;\n\t}", "class_method_signature": "CoAPRxResponsePacket.setSourcePort(int sourcePort)", "constructor": fal...
{ "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_603
{ "fields": [], "file": "library/src/test/java/com/digi/xbee/api/exceptions/TransmitExceptionTest.java", "identifier": "TransmitExceptionTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n\tpublic final void testGetTransmitStatusMessageNull() {\n\t\t// Setup the resources for the test.\n\t\tXBeeTransmitStatus transmitStatus = null;\n\t\tTransmitException e = new TransmitException(transmitStatus);\n\t\t\n\t\t// Call the method under test.\n\t\tString result = e.getTransmitStatusMessag...
{ "fields": [ { "declarator": "serialVersionUID = 1L", "modifier": "private static final", "original_string": "private static final long serialVersionUID = 1L;", "type": "long", "var_name": "serialVersionUID" }, { "declarator": "DEFAULT_MESSAGE = \"There was a problem t...
{ "body": "public String getTransmitStatusMessage() {\n\t\tif (transmitStatus != null)\n\t\t\treturn transmitStatus.getDescription();\n\t\treturn null;\n\t}", "class_method_signature": "TransmitException.getTransmitStatusMessage()", "constructor": false, "full_signature": "public String getTransmitStatusMessage...
{ "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_316
{ "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 testGetAPIPacketParametersNotNullData() {\n\t\t// Setup the resources for the test.\n\t\tbyte[] data = new byte[]{0x68, 0x6F, 0x6C, 0x61};;\n\t\tGenericXBeePacket packet = new GenericXBeePacket(data);\n\t\t\n\t\tString expectedData = HexUtils.prettyHexString(data);\n\t\t\n\t\t// ...
{ "fields": [ { "declarator": "MIN_API_PAYLOAD_LENGTH = 1", "modifier": "private static final", "original_string": "private static final int MIN_API_PAYLOAD_LENGTH = 1;", "type": "int", "var_name": "MIN_API_PAYLOAD_LENGTH" }, { "declarator": "rfData", "modifier": ...
{ "body": "@Override\n\tprotected LinkedHashMap<String, String> getAPIPacketParameters() {\n\t\tLinkedHashMap<String, String> parameters = new LinkedHashMap<String, String>();\n\t\tif (rfData != null)\n\t\t\tparameters.put(\"RF Data\", HexUtils.prettyHexString(HexUtils.byteArrayToHexString(rfData)));\n\t\treturn para...
{ "created": null, "fork": null, "fork_count": 54, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 21871478, "size": 3156, "stargazer_count": 76, "stars": null, "updates": null, "url": "https://github.com/digidotcom/xbee-java" }
21871478_746
{ "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 testHexStringToByteArrayEmptyStrng() {\n\t\t// Setup the resources for the test.\n\t\tString s = \"\";\n\t\tbyte[] expectedResult = new byte[0];\n\t\t\n\t\t// Call the method under test.\n\t\tbyte[] result = HexUtils.hexStringToByteArray(s);\n\t\t\n\t\t// Verify the result.\n\t\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 byte[] hexStringToByteArray(String value) {\n\t\tif (value == null)\n\t\t\tthrow new NullPointerException(\"Value to convert cannot be null.\");\n\t\t\n\t\tvalue = value.trim();\n\t\tif (value.startsWith(HEX_HEADER))\n\t\t\tvalue = value.substring((HEX_HEADER).length());\n\t\tint len = value....
{ "created": null, "fork": null, "fork_count": 54, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 21871478, "size": 3156, "stargazer_count": 76, "stars": null, "updates": null, "url": "https://github.com/digidotcom/xbee-java" }
21871478_195
{ "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 testGetCommandValueAsStringNullValue() {\n\t\tIPv6RemoteATCommandResponsePacket packet = new IPv6RemoteATCommandResponsePacket(frameID, ipv6address, command, \n\t\t\t\tstatus, (String)null);\n\t\t\n\t\t// Call the method under test.\n\t\tString commandValue = packet.getCommandVal...
{ "fields": [ { "declarator": "MIN_API_PAYLOAD_LENGTH = 21", "modifier": "private static final", "original_string": "private static final int MIN_API_PAYLOAD_LENGTH = 21;", "type": "int", "var_name": "MIN_API_PAYLOAD_LENGTH" }, { "declarator": "ERROR_PAYLOAD_NULL = \"IP...
{ "body": "public String getCommandValueAsString() {\n\t\tif (commandValue == null)\n\t\t\treturn null;\n\t\treturn new String(commandValue);\n\t}", "class_method_signature": "IPv6RemoteATCommandResponsePacket.getCommandValueAsString()", "constructor": false, "full_signature": "public String getCommandValueAsSt...
{ "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_480
{ "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 testGetChecksumNullData() {\n\t\t// Setup the resources for the test.\n\t\tTestXBeePacket packet = new TestXBeePacket();\n\t\tint expectedChecksum = (byte)0xFF & 0xFF;\n\t\t\n\t\t// Call the method under test.\n\t\tint checksum = packet.getChecksum();\n\t\t\n\t\t// Verify the res...
{ "fields": [ { "declarator": "HASH_SEED = 23", "modifier": "private static final", "original_string": "private static final int HASH_SEED = 23;", "type": "int", "var_name": "HASH_SEED" }, { "declarator": "checksum", "modifier": "private", "original_string":...
{ "body": "public int getChecksum() {\n\t\tchecksum.reset();\n\t\tbyte[] packetData = getPacketData();\n\t\tif (packetData != null)\n\t\t\tchecksum.add(packetData);\n\t\treturn (byte)checksum.generate() & 0xFF;\n\t}", "class_method_signature": "XBeePacket.getChecksum()", "constructor": false, "full_signature": ...
{ "created": null, "fork": null, "fork_count": 54, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 21871478, "size": 3156, "stargazer_count": 76, "stars": null, "updates": null, "url": "https://github.com/digidotcom/xbee-java" }
21871478_615
{ "fields": [], "file": "library/src/test/java/com/digi/xbee/api/exceptions/XBeeExceptionTest.java", "identifier": "XBeeExceptionTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n\tpublic final void testCreateXBeeExceptionMessageAndCause() {\n\t\t// Setup the resources for the test.\n\t\tString message = \"This is the message\";\n\t\tThrowable cause = new Exception();\n\t\t\n\t\t// Call the method under test.\n\t\tXBeeException e = new XBeeException(message, cause);\n\t\t\n\...
{ "fields": [ { "declarator": "serialVersionUID = 1L", "modifier": "private static final", "original_string": "private static final long serialVersionUID = 1L;", "type": "long", "var_name": "serialVersionUID" } ], "file": "library/src/main/java/com/digi/xbee/api/exceptions/XB...
{ "body": "@Override\n\tpublic Throwable getCause() {\n\t\treturn super.getCause();\n\t}", "class_method_signature": "XBeeException.getCause()", "constructor": false, "full_signature": "@Override public Throwable getCause()", "identifier": "getCause", "invocations": [ "getCause" ], "modifiers": "@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_245
{ "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 testCreatePacketPayloadInvalidIP() throws Exception {\n\t\t// Set up the resources for the test.\n\t\tbyte[] payload = new byte[41];\n\t\tpayload[0] = (byte)frameType;\n\t\tpayload[1] = (byte)frameID;\n\t\tSystem.arraycopy(destAddress.getAddress(), 0, payload, 2, destAddress.getA...
{ "fields": [ { "declarator": "MIN_API_PAYLOAD_LENGTH = 41", "modifier": "private static final", "original_string": "private static final int MIN_API_PAYLOAD_LENGTH = 41;", "type": "int", "var_name": "MIN_API_PAYLOAD_LENGTH" }, { "declarator": "ERROR_PAYLOAD_NULL = \"Co...
{ "body": "public static CoAPRxResponsePacket 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) != AP...
{ "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_750
{ "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 testContainsLettersTrue() {\n\t\t// Setup the resources for the test.\n\t\tString s = \"0123456789abc\";\n\t\tboolean expectedResult = true;\n\t\t\n\t\t// Call the method under test.\n\t\tboolean result = HexUtils.containsLetters(s);\n\t\t\n\t\t// Verify the result.\n\t\tassertTh...
{ "fields": [ { "declarator": "HEXES = \"0123456789ABCDEF\"", "modifier": "private static final", "original_string": "private static final String HEXES = \"0123456789ABCDEF\";", "type": "String", "var_name": "HEXES" }, { "declarator": "HEX_HEADER = \"0x\"", "modif...
{ "body": "public static boolean containsLetters(String parameter) {\n\t\tif (parameter == null)\n\t\t\tthrow new NullPointerException(\"Parameter cannot be null.\");\n\t\t\n\t\tbyte[] byteArray = parameter.getBytes();\n\t\tfor (int i = 0; i < byteArray.length; i++){\n\t\t\tif (!((byteArray[i] >= '0') && (byteArray[i...
{ "created": null, "fork": null, "fork_count": 54, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 21871478, "size": 3156, "stargazer_count": 76, "stars": null, "updates": null, "url": "https://github.com/digidotcom/xbee-java" }
21871478_300
{ "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 testGetTransport() {\n\t\t// Set up the resources for the test.\n\t\tDeviceRequestPacket packet = new DeviceRequestPacket(requestID, target, data);\n\n\t\t// Verify the result.\n\t\tassertThat(\"Returned transport is not the expected\", packet.getTransport(), is(equalTo(0)));\n\t...
{ "fields": [ { "declarator": "MIN_API_PAYLOAD_LENGTH = 5", "modifier": "private static final", "original_string": "private static final int MIN_API_PAYLOAD_LENGTH = 5;", "type": "int", "var_name": "MIN_API_PAYLOAD_LENGTH" }, { "declarator": "ERROR_PAYLOAD_NULL = \"Devi...
{ "body": "public int getTransport() {\n\t\treturn transport;\n\t}", "class_method_signature": "DeviceRequestPacket.getTransport()", "constructor": false, "full_signature": "public int getTransport()", "identifier": "getTransport", "invocations": [], "modifiers": "public", "parameters": "()", "return"...
{ "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_479
{ "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 testGetPacketLength() {\n\t\t// Setup the resources for the test.\n\t\tfinal byte[] dataArray = new byte[]{0x17, 0x01, 0x00, 0x13, (byte)0xA2, 0x00, 0x40, (byte)0xAD, 0x14, 0x2E, (byte)0xFF, (byte)0xFE, 0x02, 0x4E, 0x49};\n\t\tTestXBeePacket packet = new TestXBeePacket() {\n\t\t\...
{ "fields": [ { "declarator": "HASH_SEED = 23", "modifier": "private static final", "original_string": "private static final int HASH_SEED = 23;", "type": "int", "var_name": "HASH_SEED" }, { "declarator": "checksum", "modifier": "private", "original_string":...
{ "body": "public int getPacketLength() {\n\t\tbyte[] packetData = getPacketData();\n\t\tif (packetData == null)\n\t\t\treturn 0;\n\t\treturn packetData.length;\n\t}", "class_method_signature": "XBeePacket.getPacketLength()", "constructor": false, "full_signature": "public int getPacketLength()", "identifier"...
{ "created": null, "fork": null, "fork_count": 54, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 21871478, "size": 3156, "stargazer_count": 76, "stars": null, "updates": null, "url": "https://github.com/digidotcom/xbee-java" }
21871478_183
{ "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\tbyte[] data = null;\n\n\t\tCoAPTxRequestPacket packet = new CoAPTxRequestPacket(frameID, options, method, destAddress, uriData, data);\n\n\t\t// Call the method under test.\n\t\tbyte[] result = packet.getPayl...
{ "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 byte[] getPayload() {\n\t\tif (payload == null)\n\t\t\treturn null;\n\t\treturn Arrays.copyOf(payload, payload.length);\n\t}", "class_method_signature": "CoAPTxRequestPacket.getPayload()", "constructor": false, "full_signature": "public byte[] getPayload()", "identifier": "getPayload", "in...
{ "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_496
{ "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 testParsePacketStringAPIEscapedInvalidLengthShorter() throws InvalidPacketException {\n\t\t// Setup the resources for the test.\n\t\tString dataString = \"7E00031701007D33A20040AD142EFFFE024E496D\";\n\t\texception.expect(InvalidPacketException.class);\n\t\texception.expectMessage...
{ "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_212
{ "fields": [ { "declarator": "IPV6_ADDRESS = \"FDB3:0001:0002:0000:0004:0005:0006:0007\"", "modifier": "private static final", "original_string": "private static final String IPV6_ADDRESS = \"FDB3:0001:0002:0000:0004:0005:0006:0007\";", "type": "String", "var_name": "IPV6_ADDRESS" ...
{ "body": "@Test\n\tpublic final void testCreatePacketPayloadShorterThanNeeded() {\n\t\t// Set up the resources for the test.\n\t\tbyte[] payload = new byte[23];\n\t\tpayload[0] = (byte)frameType;\n\t\tpayload[1] = (byte)frameID;\n\t\tSystem.arraycopy(destAddress.getAddress(), 0, payload, 2, destAddress.getAddress()....
{ "fields": [ { "declarator": "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 static TXIPv6Packet createPacket(byte[] payload) {\n\t\tif (payload == null)\n\t\t\tthrow new NullPointerException(ERROR_PAYLOAD_NULL);\n\n\t\tif (payload.length < MIN_API_PAYLOAD_LENGTH)\n\t\t\tthrow new IllegalArgumentException(ERROR_INCOMPLETE_PACKET);\n\n\t\tif ((payload[0] & 0xFF) != APIFrameTy...
{ "created": null, "fork": null, "fork_count": 54, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 21871478, "size": 3156, "stargazer_count": 76, "stars": null, "updates": null, "url": "https://github.com/digidotcom/xbee-java" }
21871478_642
{ "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 testSetGatewayIPAddress() throws Exception {\n\t\t// Do nothing when trying to set the GW parameter.\n\t\tMockito.doNothing().when(wifiDevice).setParameter(Mockito.eq(PARAMETER_GW), Mockito.any(byte[].class));\n\n\t\t// Set the IP address.\n\t\twifiDevice.setGatewayIPAddress((Inet4Addr...
{ "fields": [ { "declarator": "DEFAULT_ACCESS_POINT_TIMETOUT = 15000", "modifier": "private final static", "original_string": "private final static int DEFAULT_ACCESS_POINT_TIMETOUT = 15000;", "type": "int", "var_name": "DEFAULT_ACCESS_POINT_TIMETOUT" }, { "declarator":...
{ "body": "public void setGatewayIPAddress(Inet4Address address) throws TimeoutException, XBeeException {\n\t\tif (address == null)\n\t\t\tthrow new NullPointerException(\"Gateway address cannot be null.\");\n\t\t\n\t\tsetParameter(\"GW\", address.getAddress());\n\t}", "class_method_signature": "WiFiDevice.setGatew...
{ "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_357
{ "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 testCreatePacketNullPayload() {\n\t\t// Set up the resources for the test.\n\t\tbyte[] payload = null;\n\t\texception.expect(NullPointerException.class);\n\t\texception.expectMessage(is(equalTo(\"RX SMS packet payload cannot be null.\")));\n\n\t\t// Call the method under test tha...
{ "fields": [ { "declarator": "MIN_API_PAYLOAD_LENGTH = 1 /* (Frame type) */ + TXSMSPacket.PHONE_NUMBER_LENGTH", "modifier": "private static final", "original_string": "private static final int MIN_API_PAYLOAD_LENGTH = 1 /* (Frame type) */ + TXSMSPacket.PHONE_NUMBER_LENGTH;", "type": "int"...
{ "body": "public static RXSMSPacket createPacket(byte[] payload) {\n\t\tif (payload == null)\n\t\t\tthrow new NullPointerException(ERROR_PAYLOAD_NULL);\n\n\t\tif (payload.length < MIN_API_PAYLOAD_LENGTH)\n\t\t\tthrow new IllegalArgumentException(ERROR_INCOMPLETE_PACKET);\n\n\t\tif ((payload[0] & 0xFF) != APIFrameTyp...
{ "created": null, "fork": null, "fork_count": 54, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 21871478, "size": 3156, "stargazer_count": 76, "stars": null, "updates": null, "url": "https://github.com/digidotcom/xbee-java" }
21871478_707
{ "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 testStringToByteArrayNullString() {\n\t\t// Setup the resources for the test.\n\t\tString s = null;\n\t\t\n\t\texception.expect(NullPointerException.class);\n\t\texception.expectMessage(is(equalTo(\"Value cannot be null.\")));\n\t\t\n\t\t// Call the method under test.\n\t\tByteUt...
{ "fields": [], "file": "library/src/main/java/com/digi/xbee/api/utils/ByteUtils.java", "identifier": "ByteUtils", "interfaces": "", "methods": [ { "class_method_signature": "ByteUtils.readBytes(int numBytes, ByteArrayInputStream inputStream)", "constructor": false, "full_signature": "pu...
{ "body": "public static byte[] stringToByteArray(String value) {\n\t\tif (value == null)\n\t\t\tthrow new NullPointerException(\"Value cannot be null.\");\n\t\t\n\t\treturn value.getBytes();\n\t}", "class_method_signature": "ByteUtils.stringToByteArray(String value)", "constructor": false, "full_signature": "p...
{ "created": null, "fork": null, "fork_count": 54, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 21871478, "size": 3156, "stargazer_count": 76, "stars": null, "updates": null, "url": "https://github.com/digidotcom/xbee-java" }
21871478_584
{ "fields": [ { "declarator": "PARAMETER_MY = \"MY\"", "modifier": "private static final", "original_string": "private static final String PARAMETER_MY = \"MY\";", "type": "String", "var_name": "PARAMETER_MY" }, { "declarator": "PARAMETER_C0 = \"C0\"", "modifier":...
{ "body": "@Test\n\tpublic void testStartListeningSuccess() throws TimeoutException, XBeeException {\n\t\tint newSourcePort = 123;\n\t\t// Do nothing when setting any parameter.\n\t\tMockito.doNothing().when(ipv6Device).setParameter(Mockito.anyString(), Mockito.any(byte[].class));\n\t\t\n\t\tipv6Device.startListening...
{ "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": "public void startListening(int sourcePort) throws TimeoutException, XBeeException {\n\t\tif (sourcePort < 0 || sourcePort > 65535)\n\t\t\tthrow new IllegalArgumentException(\"Source port must be between 0 and 65535.\");\n\t\t\n\t\tsetParameter(\"C0\", ByteUtils.shortToByteArray((short)sourcePort));\n\t\tth...
{ "created": null, "fork": null, "fork_count": 54, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 21871478, "size": 3156, "stargazer_count": 76, "stars": null, "updates": null, "url": "https://github.com/digidotcom/xbee-java" }
21871478_459
{ "fields": [ { "declarator": "exception = ExpectedException.none()", "modifier": "@Rule\n\tpublic", "original_string": "@Rule\n\tpublic ExpectedException exception = ExpectedException.none();", "type": "ExpectedException", "var_name": "exception" } ], "file": "library/src/te...
{ "body": "@Test\n\tpublic final void testIsBroadcast() {\n\t\t// Setup the resources for the test.\n\t\tint frameID = 0x65;\n\t\tXBeeTransmitStatus transmitStatus = XBeeTransmitStatus.SUCCESS;\n\t\tTXStatusPacket packet = new TXStatusPacket(frameID, transmitStatus);\n\t\t\n\t\t// Call the method under test and verif...
{ "fields": [ { "declarator": "MIN_API_PAYLOAD_LENGTH = 3", "modifier": "private static final", "original_string": "private static final int MIN_API_PAYLOAD_LENGTH = 3;", "type": "int", "var_name": "MIN_API_PAYLOAD_LENGTH" }, { "declarator": "transmitStatus", "mod...
{ "body": "@Override\n\tpublic boolean isBroadcast() {\n\t\treturn false;\n\t}", "class_method_signature": "TXStatusPacket.isBroadcast()", "constructor": false, "full_signature": "@Override public boolean isBroadcast()", "identifier": "isBroadcast", "invocations": [], "modifiers": "@Override public", "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_95
{ "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 testGetParameterNullValue() {\n\t\t// Setup the resources for the test.\n\t\tint frameID = 0x10;\n\t\tString command = \"NI\";\n\t\tATCommandPacket packet = new ATCommandPacket(frameID, command, (byte[])null);\n\t\t\n\t\t// Call the method under test.\n\t\tbyte[] value = packet.g...
{ "fields": [ { "declarator": "MIN_API_PAYLOAD_LENGTH = 4", "modifier": "private static final", "original_string": "private static final int MIN_API_PAYLOAD_LENGTH = 4;", "type": "int", "var_name": "MIN_API_PAYLOAD_LENGTH" }, { "declarator": "command", "modifier":...
{ "body": "public byte[] getParameter() {\n\t\treturn parameter;\n\t}", "class_method_signature": "ATCommandPacket.getParameter()", "constructor": false, "full_signature": "public byte[] getParameter()", "identifier": "getParameter", "invocations": [], "modifiers": "public", "parameters": "()", "retur...
{ "created": null, "fork": null, "fork_count": 54, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 21871478, "size": 3156, "stargazer_count": 76, "stars": null, "updates": null, "url": "https://github.com/digidotcom/xbee-java" }
21871478_770
{ "fields": [ { "declarator": "exception = ExpectedException.none()", "modifier": "@Rule\n\tpublic", "original_string": "@Rule\n\tpublic ExpectedException exception = ExpectedException.none();", "type": "ExpectedException", "var_name": "exception" }, { "declarator": "lp...
{ "body": "@Test\n\tpublic void testSendIPDataNotUDP() throws Exception {\n\t\texception.expect(IllegalArgumentException.class);\n\t\texception.expectMessage(is(equalTo(\"This protocol only supports UDP transmissions.\")));\n\t\t\n\t\tInet4Address destAddr = (Inet4Address)Inet4Address.getByName(\"192.168.1.55\");\n\t...
{ "fields": [ { "declarator": "OPERATION_EXCEPTION = \"Operation not supported in this module.\"", "modifier": "private static final", "original_string": "private static final String OPERATION_EXCEPTION = \"Operation not supported in this module.\";", "type": "String", "var_name": "O...
{ "body": "@Override\n\tpublic void sendIPData(Inet4Address ipAddress, int destPort, IPProtocol protocol, \n\t\t\tbyte[] data) throws TimeoutException, XBeeException {\n\t\tif (protocol != IPProtocol.UDP)\n\t\t\tthrow new IllegalArgumentException(ONLY_UDP_TRANSMISSIONS);\n\t\tsuper.sendIPData(ipAddress, destPort, pro...
{ "created": null, "fork": null, "fork_count": 54, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 21871478, "size": 3156, "stargazer_count": 76, "stars": null, "updates": null, "url": "https://github.com/digidotcom/xbee-java" }
21871478_320
{ "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 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(\"TX IPv4 packet payload cannot be null.\")));\n\n\t\t// Call the method under test th...
{ "fields": [ { "declarator": "OPTIONS_CLOSE_SOCKET = 2", "modifier": "public static final", "original_string": "public static final int OPTIONS_CLOSE_SOCKET = 2;", "type": "int", "var_name": "OPTIONS_CLOSE_SOCKET" }, { "declarator": "OPTIONS_LEAVE_SOCKET_OPEN = 0", ...
{ "body": "public static TXIPv4Packet createPacket(byte[] payload) {\n\t\tif (payload == null)\n\t\t\tthrow new NullPointerException(ERROR_PAYLOAD_NULL);\n\n\t\tif (payload.length < MIN_API_PAYLOAD_LENGTH)\n\t\t\tthrow new IllegalArgumentException(ERROR_INCOMPLETE_PACKET);\n\n\t\tif ((payload[0] & 0xFF) != APIFrameTy...
{ "created": null, "fork": null, "fork_count": 54, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 21871478, "size": 3156, "stargazer_count": 76, "stars": null, "updates": null, "url": "https://github.com/digidotcom/xbee-java" }
21871478_635
{ "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 testSetIPAddressNull() 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 address cannot be null.\")));\n\n\t\t// Call the method under test that should throw a NullPointerExcepti...
{ "fields": [ { "declarator": "DEFAULT_ACCESS_POINT_TIMETOUT = 15000", "modifier": "private final static", "original_string": "private final static int DEFAULT_ACCESS_POINT_TIMETOUT = 15000;", "type": "int", "var_name": "DEFAULT_ACCESS_POINT_TIMETOUT" }, { "declarator":...
{ "body": "public void setIPAddress(Inet4Address address) throws TimeoutException, XBeeException {\n\t\tif (address == null)\n\t\t\tthrow new NullPointerException(\"IP address cannot be null.\");\n\t\t\n\t\tsetParameter(\"MY\", address.getAddress());\n\t}", "class_method_signature": "WiFiDevice.setIPAddress(Inet4Ad...
{ "created": null, "fork": null, "fork_count": 54, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 21871478, "size": 3156, "stargazer_count": 76, "stars": null, "updates": null, "url": "https://github.com/digidotcom/xbee-java" }
21871478_265
{ "fields": [ { "declarator": "frameType = APIFrameType.SEND_DATA_RESPONSE.getValue()", "modifier": "private", "original_string": "private int frameType = APIFrameType.SEND_DATA_RESPONSE.getValue();", "type": "int", "var_name": "frameType" }, { "declarator": "frameID = ...
{ "body": "@Test\n\tpublic final void 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(\"Send Data Response packet payload cannot be null.\")));\n\n\t\t// Call the method un...
{ "fields": [ { "declarator": "MIN_API_PAYLOAD_LENGTH = 3", "modifier": "private static final", "original_string": "private static final int MIN_API_PAYLOAD_LENGTH = 3;", "type": "int", "var_name": "MIN_API_PAYLOAD_LENGTH" }, { "declarator": "ERROR_PAYLOAD_NULL = \"Send...
{ "body": "public static SendDataResponsePacket createPacket(byte[] payload) {\n\t\tif (payload == null)\n\t\t\tthrow new NullPointerException(ERROR_PAYLOAD_NULL);\n\n\t\tif (payload.length < MIN_API_PAYLOAD_LENGTH)\n\t\t\tthrow new IllegalArgumentException(ERROR_INCOMPLETE_PACKET);\n\n\t\tif ((payload[0] & 0xFF) != ...
{ "created": null, "fork": null, "fork_count": 54, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 21871478, "size": 3156, "stargazer_count": 76, "stars": null, "updates": null, "url": "https://github.com/digidotcom/xbee-java" }
21871478_818
{ "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 testEqualsIsConsistent() {\n\t\t// Setup the resources for the test.\n\t\tXBeeIMEIAddress imei1 = new XBeeIMEIAddress(\"1234\");\n\t\tXBeeIMEIAddress imei2 = new XBeeIMEIAddress(\"1234\");\n\t\tXBeeIMEIAddress imei3 = new XBeeIMEIAddress(\"5678\");\n\t\t\n\t\t// Verify the result...
{ "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_377
{ "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 testSetOptionsBiggerThan255() {\n\t\t// Set up the resources for the test.\n\t\tIODataSampleRxIndicatorWifiPacket packet = new IODataSampleRxIndicatorWifiPacket(sourceAddress, rssi, receiveOptions, data);\n\n\t\treceiveOptions = 256;\n\n\t\texception.expect(IllegalArgumentExcepti...
{ "fields": [ { "declarator": "MIN_API_PAYLOAD_LENGTH = 11", "modifier": "private static final", "original_string": "private static final int MIN_API_PAYLOAD_LENGTH = 11;", "type": "int", "var_name": "MIN_API_PAYLOAD_LENGTH" }, { "declarator": "ERROR_PAYLOAD_NULL = \"IO...
{ "body": "public void setReceiveOptions(int receiveOptions) {\n\t\tif (receiveOptions < 0 || receiveOptions > 255)\n\t\t\tthrow new IllegalArgumentException(ERROR_OPTIONS_ILLEGAL);\n\n\t\tthis.receiveOptions = receiveOptions;\n\t}", "class_method_signature": "IODataSampleRxIndicatorWifiPacket.setReceiveOptions(int...
{ "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_727
{ "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 testReadBooleanFromByteFalse() {\n\t\t// Setup the resources for the test.\n\t\tbyte n = (byte)0xEF;\n\t\tboolean expectedResult = false;\n\t\t\n\t\t// Call the method under test.\n\t\tboolean result = ByteUtils.readBooleanFromByte(n, 4);\n\t\t\n\t\t// Verify the result.\n\t\tass...
{ "fields": [], "file": "library/src/main/java/com/digi/xbee/api/utils/ByteUtils.java", "identifier": "ByteUtils", "interfaces": "", "methods": [ { "class_method_signature": "ByteUtils.readBytes(int numBytes, ByteArrayInputStream inputStream)", "constructor": false, "full_signature": "pu...
{ "body": "public static boolean readBooleanFromByte(byte containerByte, int bitOffset) {\n\t\tif (bitOffset < 0 || bitOffset > 31)\n\t\t\tthrow new IllegalArgumentException(\"Bit offset must be between 0 and 7.\");\n\t\t\n\t\treturn isBitEnabled(containerByte, bitOffset);\n\t}", "class_method_signature": "ByteUtil...
{ "created": null, "fork": null, "fork_count": 54, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 21871478, "size": 3156, "stargazer_count": 76, "stars": null, "updates": null, "url": "https://github.com/digidotcom/xbee-java" }
21871478_232
{ "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 testSetSourceAddressNull() {\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(NullPointerException.class);\n\t\texception.expectMessage(is(equalTo(\"So...
{ "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 setSourceAddress(Inet6Address sourceAddress) {\n\t\tif (sourceAddress == null)\n\t\t\tthrow new NullPointerException(ERROR_SOURCE_ADDR_NULL);\n\n\t\tthis.sourceAddress = sourceAddress;\n\t}", "class_method_signature": "RXIPv6Packet.setSourceAddress(Inet6Address sourceAddress)", "constructor...
{ "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_662
{ "fields": [ { "declarator": "PARAMETER_MY = \"MY\"", "modifier": "private static final", "original_string": "private static final String PARAMETER_MY = \"MY\";", "type": "String", "var_name": "PARAMETER_MY" }, { "declarator": "PARAMETER_C0 = \"C0\"", "modifier":...
{ "body": "@Test(expected=InvalidOperatingModeException.class)\n\tpublic void testStopListeningInvalidOperatingMode() throws TimeoutException, XBeeException {\n\t\t// Throw an Invalid operating mode exception when setting any parameter.\n\t\tMockito.doThrow(new InvalidOperatingModeException()).when(ipDevice).setParam...
{ "fields": [ { "declarator": "BROADCAST_IP = \"255.255.255.255\"", "modifier": "public static final", "original_string": "public static final String BROADCAST_IP = \"255.255.255.255\";", "type": "String", "var_name": "BROADCAST_IP" }, { "declarator": "OPERATION_EXCEPTI...
{ "body": "public void stopListening() throws TimeoutException, XBeeException {\n\t\tsetParameter(\"C0\", ByteUtils.shortToByteArray((short)0));\n\t\tsourcePort = 0;\n\t}", "class_method_signature": "IPDevice.stopListening()", "constructor": false, "full_signature": "public void stopListening()", "identifier"...
{ "created": null, "fork": null, "fork_count": 54, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 21871478, "size": 3156, "stargazer_count": 76, "stars": null, "updates": null, "url": "https://github.com/digidotcom/xbee-java" }
21871478_398
{ "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_64.getValue();\n\t\tXBee64BitAddress source64Addr = new XBee64BitAddress(\"0013A2004032D9AB\");\n\t\tint rssi = 40;\n\t\t\n\t\tbyte[] payload = new byte[10]...
{ "fields": [ { "declarator": "MIN_API_PAYLOAD_LENGTH = 11", "modifier": "private static final", "original_string": "private static final int MIN_API_PAYLOAD_LENGTH = 11;", "type": "int", "var_name": "MIN_API_PAYLOAD_LENGTH" }, { "declarator": "sourceAddress64", "...
{ "body": "public static RX64Packet createPacket(byte[] payload) {\n\t\tif (payload == null)\n\t\t\tthrow new NullPointerException(\"RX64 packet payload cannot be null.\");\n\t\t\n\t\t// 1 (Frame type) + 8 (64-bit address) + 1 (signal strength) + 1 (receive options)\n\t\tif (payload.length < MIN_API_PAYLOAD_LENGTH)\n...
{ "created": null, "fork": null, "fork_count": 54, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 21871478, "size": 3156, "stargazer_count": 76, "stars": null, "updates": null, "url": "https://github.com/digidotcom/xbee-java" }
21871478_418
{ "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\tXBee16BitAddress source16Addr = new XBee16BitAddress(\"D817\");\n\t\tint rssi = 75;\n\t\tint options = 0x84; /* bit 2 */\n\t\tbyte[] receivedData = new byte[]{0x68, 0x6F, 0x6C, 0x61};\n\t\tRX16IOPacket pa...
{ "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 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": "RX16IOPacket.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_731
{ "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 testReadUntilCR() {\n\t\t// Setup the resources for the test.\n\t\tbyte[] contents = new byte[]{0x01, 0x02, 0x03, 0x04, 0x05, 0x00, 0x06, 0x07, 0x08, 0x0D, (byte)0x89, 0x25, 0x01};\n\t\tbyte[] expectedResult = new byte[]{0x01, 0x02, 0x03, 0x04, 0x05, 0x00, 0x06, 0x07, 0x08};\n\t\...
{ "fields": [], "file": "library/src/main/java/com/digi/xbee/api/utils/ByteUtils.java", "identifier": "ByteUtils", "interfaces": "", "methods": [ { "class_method_signature": "ByteUtils.readBytes(int numBytes, ByteArrayInputStream inputStream)", "constructor": false, "full_signature": "pu...
{ "body": "public static byte[] readUntilCR(ByteArrayInputStream inputStream) {\n\t\tif (inputStream == null)\n\t\t\tthrow new NullPointerException(\"Input stream cannot be null.\");\n\t\t\n\t\tByteArrayOutputStream outputStream = new ByteArrayOutputStream();\n\t\tbyte readByte;\n\t\twhile (((readByte = (byte)inputSt...
{ "created": null, "fork": null, "fork_count": 54, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 21871478, "size": 3156, "stargazer_count": 76, "stars": null, "updates": null, "url": "https://github.com/digidotcom/xbee-java" }
21871478_361
{ "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 testGetAPIPacketParametersReceivedDataNull() {\n\t\t// Set up the resources for the test.\n\t\tdata = null;\n\n\t\tRXSMSPacket packet = new RXSMSPacket(phoneNumber, data);\n\n\t\t// Call the method under test.\n\t\tLinkedHashMap<String, String> packetParams = packet.getAPIPacketP...
{ "fields": [ { "declarator": "MIN_API_PAYLOAD_LENGTH = 1 /* (Frame type) */ + TXSMSPacket.PHONE_NUMBER_LENGTH", "modifier": "private static final", "original_string": "private static final int MIN_API_PAYLOAD_LENGTH = 1 /* (Frame type) */ + TXSMSPacket.PHONE_NUMBER_LENGTH;", "type": "int"...
{ "body": "@Override\n\tpublic LinkedHashMap<String, String> getAPIPacketParameters() {\n\t\tLinkedHashMap<String, String> parameters = new LinkedHashMap<String, String>();\n\t\tparameters.put(\"Phone number\", HexUtils.prettyHexString(HexUtils.byteArrayToHexString(phoneNumber)) + \" (\" + new String(phoneNumber).rep...
{ "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_674
{ "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 testNotSupportedOperationReadDataFromTimeout() 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...
{ "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_224
{ "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 testGetDataValidData() {\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\t// Call the method under test.\n\t\tbyte[] result = packet.getData();\n\n\t\t// Verify the result.\n...
{ "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_336
{ "fields": [ { "declarator": "IP_ADDRESS = \"10.10.11.12\"", "modifier": "private static final", "original_string": "private static final String IP_ADDRESS = \"10.10.11.12\";", "type": "String", "var_name": "IP_ADDRESS" }, { "declarator": "frameType = APIFrameType.RX_I...
{ "body": "@Test\n\tpublic final void 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(sourceAddress.getAddress(), 0, payload, 1, sourceAddress.getAddress().length);\n\t\tpayload[5] = (b...
{ "fields": [ { "declarator": "MIN_API_PAYLOAD_LENGTH = 11", "modifier": "private static final", "original_string": "private static final int MIN_API_PAYLOAD_LENGTH = 11;", "type": "int", "var_name": "MIN_API_PAYLOAD_LENGTH" }, { "declarator": "ERROR_PAYLOAD_NULL = \"RX...
{ "body": "public static RXIPv4Packet createPacket(byte[] payload) {\n\t\tif (payload == null)\n\t\t\tthrow new NullPointerException(ERROR_PAYLOAD_NULL);\n\n\t\tif (payload.length < MIN_API_PAYLOAD_LENGTH)\n\t\t\tthrow new IllegalArgumentException(ERROR_INCOMPLETE_PACKET);\n\n\t\tif ((payload[0] & 0xFF) != APIFrameTy...
{ "created": null, "fork": null, "fork_count": 54, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 21871478, "size": 3156, "stargazer_count": 76, "stars": null, "updates": null, "url": "https://github.com/digidotcom/xbee-java" }
21871478_766
{ "fields": [ { "declarator": "exception = ExpectedException.none()", "modifier": "@Rule\n\tpublic", "original_string": "@Rule\n\tpublic ExpectedException exception = ExpectedException.none();", "type": "ExpectedException", "var_name": "exception" }, { "declarator": "lp...
{ "body": "@SuppressWarnings(\"deprecation\")\n\t@Test\n\tpublic void testNotSupportedOperationAddSMSListener() 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 shou...
{ "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 addSMSListener(ISMSReceiveListener listener) {\n\t\t// Not supported in Cellular.\n\t\tthrow new UnsupportedOperationException(OPERATION_EXCEPTION);\n\t}", "class_method_signature": "LPWANDevice.addSMSListener(ISMSReceiveListener listener)", "constructor": false, "full_signat...
{ "created": null, "fork": null, "fork_count": 54, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 21871478, "size": 3156, "stargazer_count": 76, "stars": null, "updates": null, "url": "https://github.com/digidotcom/xbee-java" }
21871478_83
{ "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 packet payload cannot be null.\")));\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_273
{ "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 testCreatePacketEmptyPayload() {\n\t\t// Set up the resources for the test.\n\t\tbyte[] payload = new byte[0];\n\t\texception.expect(IllegalArgumentException.class);\n\t\texception.expectMessage(is(equalTo(\"Incomplete Device Response Status packet.\")));\n\n\t\t// Call the metho...
{ "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_789
{ "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 testGetFirstExplicitDataPacketFrom() {\n\t\t// Create a mocked remote XBee device.\n\t\tRemoteXBeeDevice mockedRemoteDevice = Mockito.mock(RemoteXBeeDevice.class);\n\t\tMockito.when(mockedRemoteDevice.get64BitAddress()).thenReturn(xbee64BitAddress1);\n\t\t// Create an XBeePacketsQueue ...
{ "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 getFirstExplicitDataPacketFrom(RemoteXBeeDevice remoteXBeeDevice, int timeout) {\n\t\tif (timeout > 0) {\n\t\t\tXBeePacket xbeePacket = getFirstExplicitDataPacketFrom(remoteXBeeDevice, 0);\n\t\t\t// Wait for a timeout or until an XBee explicit data packet from remoteXBeeDevice is read.\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_623
{ "fields": [], "file": "library/src/test/java/com/digi/xbee/api/exceptions/ATCommandExceptionTest.java", "identifier": "ATCommandExceptionTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n\tpublic final void testGetCommandStatusMessageNull() {\n\t\t// Setup the resources for the test.\n\t\tATCommandStatus atCommandStatus = null;\n\t\tATCommandException e = new ATCommandException(atCommandStatus);\n\t\t\n\t\t// Call the method under test.\n\t\tString result = e.getCommandStatusMessage...
{ "fields": [ { "declarator": "serialVersionUID = 1L", "modifier": "private static final", "original_string": "private static final long serialVersionUID = 1L;", "type": "long", "var_name": "serialVersionUID" }, { "declarator": "DEFAULT_MESSAGE = \"There was a problem s...
{ "body": "public String getCommandStatusMessage() {\n\t\tif (atCommandStatus != null)\n\t\t\treturn atCommandStatus.getDescription();\n\t\treturn null;\n\t}", "class_method_signature": "ATCommandException.getCommandStatusMessage()", "constructor": false, "full_signature": "public String getCommandStatusMessage...
{ "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_434
{ "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 testGetAPIPacketParametersdataNull() {\n\t\t// Setup the resources for the test.\n\t\tint frameID = 0x65;\n\t\tXBee16BitAddress dest16Addr = new XBee16BitAddress(\"D817\");\n\t\tint options = 40;\n\t\tbyte[] data = null;\n\t\tTX16Packet packet = new TX16Packet(frameID, dest16Addr...
{ "fields": [ { "declarator": "MIN_API_PAYLOAD_LENGTH = 5", "modifier": "private static final", "original_string": "private static final int MIN_API_PAYLOAD_LENGTH = 5;", "type": "int", "var_name": "MIN_API_PAYLOAD_LENGTH" }, { "declarator": "transmitOptions", "mo...
{ "body": "@Override\n\tpublic LinkedHashMap<String, String> getAPIPacketParameters() {\n\t\tLinkedHashMap<String, String> parameters = new LinkedHashMap<String, String>();\n\t\tparameters.put(\"16-bit dest. address\", HexUtils.prettyHexString(destAddress16.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_571
{ "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 testGetPortName() {\n\t\t// Setup the resources for the test.\n\t\tString name = \"/dev/ttyS0\";\n\t\tString description = \"This is another description\";\n\t\tSerialPortInfo info = new SerialPortInfo(name, description);\n\t\t\n\t\t// Call the method under test.\n\t\tString resu...
{ "fields": [ { "declarator": "portName", "modifier": "private", "original_string": "private String portName;", "type": "String", "var_name": "portName" }, { "declarator": "portDescription", "modifier": "private", "original_string": "private String portDescr...
{ "body": "public String getPortName() {\n\t\treturn portName;\n\t}", "class_method_signature": "SerialPortInfo.getPortName()", "constructor": false, "full_signature": "public String getPortName()", "identifier": "getPortName", "invocations": [], "modifiers": "public", "parameters": "()", "return": "S...
{ "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_121
{ "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 testGetParameterNullValue() {\n\t\t// Setup the resources for the test.\n\t\tint frameID = 0x10;\n\t\tXBee64BitAddress dest64Addr = new XBee64BitAddress(\"0013A2004032D9AB\");\n\t\tXBee16BitAddress dest16Addr = new XBee16BitAddress(\"FFFF\");\n\t\tint options = 23;\n\t\tString co...
{ "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 byte[] getParameter() {\n\t\treturn parameter;\n\t}", "class_method_signature": "RemoteATCommandPacket.getParameter()", "constructor": false, "full_signature": "public byte[] getParameter()", "identifier": "getParameter", "invocations": [], "modifiers": "public", "parameters": "()", ...
{ "created": null, "fork": null, "fork_count": 54, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 21871478, "size": 3156, "stargazer_count": 76, "stars": null, "updates": null, "url": "https://github.com/digidotcom/xbee-java" }
21871478_17
{ "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 testGetPacketParametersFrameTypeNull() {\n\t\t// Setup the resources for the test.\n\t\tint frameType = 153; //0x99;\n\t\tTestXBeeAPIPacket packet = new TestXBeeAPIPacket(frameType){\n\t\t\t@Override\n\t\t\tpublic APIFrameType getFrameType() {\n\t\t\t\treturn null;\n\t\t\t}\n\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\tprotected LinkedHashMap<String, String> getPacketParameters() {\n\t\tLinkedHashMap<String, String> parameters = new LinkedHashMap<String, String>();\n\t\tif (getFrameType() != null)\n\t\t\tparameters.put(\"Frame type\", HexUtils.prettyHexString(HexUtils.integerToHexString(frameTypeValue, 1)) +...
{ "created": null, "fork": null, "fork_count": 54, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 21871478, "size": 3156, "stargazer_count": 76, "stars": null, "updates": null, "url": "https://github.com/digidotcom/xbee-java" }
21871478_208
{ "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 testGetParameter() {\n\t\tIPv6RemoteATCommandRequestPacket packet = new IPv6RemoteATCommandRequestPacket(frameID, ipv6address, transmitOptions, command, parameter);\n\t\t\n\t\t// Call the method under test.\n\t\tbyte[] value = packet.getParameter();\n\t\t\n\t\t// Verify the resul...
{ "fields": [ { "declarator": "MIN_API_PAYLOAD_LENGTH = 21", "modifier": "private static final", "original_string": "private static final int MIN_API_PAYLOAD_LENGTH = 21;", "type": "int", "var_name": "MIN_API_PAYLOAD_LENGTH" }, { "declarator": "ERROR_PAYLOAD_NULL = \"IP...
{ "body": "public byte[] getParameter() {\n\t\treturn parameter;\n\t}", "class_method_signature": "IPv6RemoteATCommandRequestPacket.getParameter()", "constructor": false, "full_signature": "public byte[] getParameter()", "identifier": "getParameter", "invocations": [], "modifiers": "public", "parameters...
{ "created": null, "fork": null, "fork_count": 54, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 21871478, "size": 3156, "stargazer_count": 76, "stars": null, "updates": null, "url": "https://github.com/digidotcom/xbee-java" }
21871478_658
{ "fields": [ { "declarator": "PARAMETER_MY = \"MY\"", "modifier": "private static final", "original_string": "private static final String PARAMETER_MY = \"MY\";", "type": "String", "var_name": "PARAMETER_MY" }, { "declarator": "PARAMETER_C0 = \"C0\"", "modifier":...
{ "body": "@Test(expected=InvalidOperatingModeException.class)\n\tpublic void testStartListeningInvalidOperatingMode() throws TimeoutException, XBeeException {\n\t\t// Throw an Invalid operating mode exception when setting any parameter.\n\t\tMockito.doThrow(new InvalidOperatingModeException()).when(ipDevice).setPara...
{ "fields": [ { "declarator": "BROADCAST_IP = \"255.255.255.255\"", "modifier": "public static final", "original_string": "public static final String BROADCAST_IP = \"255.255.255.255\";", "type": "String", "var_name": "BROADCAST_IP" }, { "declarator": "OPERATION_EXCEPTI...
{ "body": "public void startListening(int sourcePort) throws TimeoutException, XBeeException {\n\t\tif (sourcePort < 0 || sourcePort > 65535)\n\t\t\tthrow new IllegalArgumentException(\"Source port must be between 0 and 65535.\");\n\t\t\n\t\tsetParameter(\"C0\", ByteUtils.shortToByteArray((short)sourcePort));\n\t\tth...
{ "created": null, "fork": null, "fork_count": 54, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 21871478, "size": 3156, "stargazer_count": 76, "stars": null, "updates": null, "url": "https://github.com/digidotcom/xbee-java" }
21871478_463
{ "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\tXBee16BitAddress source16Addr = new XBee16BitAddress(\"A1B2\");\n\t\tint rssi = 40;\n\t\tint options = 0x01;\n\t\tbyte[] data = new byte[]{0x68, 0x6F, 0x6C, 0x61};\n\t\t\n\t\tbyte[] pa...
{ "fields": [ { "declarator": "MIN_API_PAYLOAD_LENGTH = 5", "modifier": "private static final", "original_string": "private static final int MIN_API_PAYLOAD_LENGTH = 5;", "type": "int", "var_name": "MIN_API_PAYLOAD_LENGTH" }, { "declarator": "sourceAddress16", "mo...
{ "body": "public static RX16Packet createPacket(byte[] payload) {\n\t\tif (payload == null)\n\t\t\tthrow new NullPointerException(\"RX16 packet payload cannot be null.\");\n\t\t\n\t\t// 1 (Frame type) + 2 (16-bit address) + 1 (signal strength) + 1 (receive options)\n\t\tif (payload.length < MIN_API_PAYLOAD_LENGTH)\n...
{ "created": null, "fork": null, "fork_count": 54, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 21871478, "size": 3156, "stargazer_count": 76, "stars": null, "updates": null, "url": "https://github.com/digidotcom/xbee-java" }
21871478_199
{ "fields": [ { "declarator": "IPV6_ADDR = \"FDB3:0001:0002:0000:0004:0005:0006:0007\"", "modifier": "private static final", "original_string": "private static final String IPV6_ADDR = \"FDB3:0001:0002:0000:0004:0005:0006:0007\";", "type": "String", "var_name": "IPV6_ADDR" }, ...
{ "body": "@Test\n\tpublic final void testCreatePacketEmptyPayload() {\n\t\t// Setup the resources for the test.\n\t\tbyte[] payload = new byte[0];\n\t\texception.expect(IllegalArgumentException.class);\n\t\texception.expectMessage(is(equalTo(\"Incomplete IPv6 Remote AT command packet.\")));\n\t\t\n\t\t// Call the me...
{ "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 IPv6RemoteATCommandRequestPacket 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 destination address) + 1 (transmit options byte) + 2 (AT command)\n\t\tif (payload.length < M...
{ "created": null, "fork": null, "fork_count": 54, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 21871478, "size": 3156, "stargazer_count": 76, "stars": null, "updates": null, "url": "https://github.com/digidotcom/xbee-java" }
21871478_176
{ "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 testCreatePacketPayloadInvalidIP() throws Exception {\n\t\t// Set up the resources for the test.\n\t\tbyte[] payload = new byte[26];\n\t\tpayload[0] = (byte)frameType;\n\t\tpayload[1] = (byte)frameID;\n\t\tpayload[2] = (byte)options;\n\t\tpayload[3] = (byte)method.getValue();\n\t...
{ "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_526
{ "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 testSetPortParametersNegativeStopBits() throws InvalidConfigurationException, ConnectionException {\n\t\t// Setup the resources for the test.\n\t\tint baudrate = 115200;\n\t\tint dataBits = 7;\n\t\tint stopBits = -2;\n\t\tint parity = 1;\n\t\tint flowControl = 3;\n\t\tTestAbstrac...
{ "fields": [ { "declarator": "DEFAULT_PORT_TIMEOUT = 10", "modifier": "public static final", "original_string": "public static final int DEFAULT_PORT_TIMEOUT = 10;", "type": "int", "var_name": "DEFAULT_PORT_TIMEOUT" }, { "declarator": "DEFAULT_DATA_BITS = 8", "mo...
{ "body": "public void setPortParameters(int baudRate, int dataBits, int stopBits, int parity, int flowControl) throws InvalidConfigurationException, ConnectionException {\n\t\tSerialPortParameters parameters = new SerialPortParameters(baudRate, dataBits, stopBits, parity, flowControl);\n\t\tsetPortParameters(paramet...
{ "created": null, "fork": null, "fork_count": 54, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 21871478, "size": 3156, "stargazer_count": 76, "stars": null, "updates": null, "url": "https://github.com/digidotcom/xbee-java" }
21871478_40
{ "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 Transmit Status packet.\")));\n\t\t\n\t\t// Call the method un...
{ "fields": [ { "declarator": "MIN_API_PAYLOAD_LENGTH = 7", "modifier": "private static final", "original_string": "private static final int MIN_API_PAYLOAD_LENGTH = 7;", "type": "int", "var_name": "MIN_API_PAYLOAD_LENGTH" }, { "declarator": "destAddress16", "modi...
{ "body": "public static TransmitStatusPacket createPacket(byte[] payload) {\n\t\tif (payload == null)\n\t\t\tthrow new NullPointerException(\"Transmit Status packet payload cannot be null.\");\n\t\t\n\t\t// 1 (Frame type) + 1 (frame ID) + 2 (16-bit address) + 1 (retry count) + 1 (delivery status) + 1 (discovery stat...
{ "created": null, "fork": null, "fork_count": 54, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 21871478, "size": 3156, "stargazer_count": 76, "stars": null, "updates": null, "url": "https://github.com/digidotcom/xbee-java" }
21871478_475
{ "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 testGenerateByteArrayEscapedEmptyData() {\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)SpecialBy...
{ "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[] generateByteArrayEscaped() {\n\t\tbyte[] unescapedArray = generateByteArray();\n\t\tByteArrayOutputStream os = new ByteArrayOutputStream();\n\t\t// Write header byte and do not escape it.\n\t\tos.write(SpecialByte.HEADER_BYTE.getValue());\n\t\tfor (int i = 1; i < unescapedArray.length; 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_1
{ "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 testNotSupportedOperationSetDIOChangeDetection() 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 met...
{ "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 setDIOChangeDetection(Set<IOLine> lines)\n\t\t\tthrows TimeoutException, XBeeException {\n\t\t// Not supported in Cellular.\n\t\tthrow new UnsupportedOperationException(OPERATION_EXCEPTION);\n\t}", "class_method_signature": "CellularDevice.setDIOChangeDetection(Set<IOLine> lines)...
{ "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_530
{ "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 testPurgeExceptionWhenAvailable() 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(mockInputStream).available();\...
{ "fields": [ { "declarator": "DEFAULT_PORT_TIMEOUT = 10", "modifier": "public static final", "original_string": "public static final int DEFAULT_PORT_TIMEOUT = 10;", "type": "int", "var_name": "DEFAULT_PORT_TIMEOUT" }, { "declarator": "DEFAULT_DATA_BITS = 8", "mo...
{ "body": "public void purge() {\n\t\tif (getInputStream() != null) {\n\t\t\ttry {\n\t\t\t\tbyte[] availableBytes = new byte[getInputStream().available()];\n\t\t\t\tif (getInputStream().available() > 0)\n\t\t\t\t\tgetInputStream().read(availableBytes, 0, getInputStream().available());\n\t\t\t} catch (IOException e) {...
{ "created": null, "fork": null, "fork_count": 54, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 21871478, "size": 3156, "stargazer_count": 76, "stars": null, "updates": null, "url": "https://github.com/digidotcom/xbee-java" }
21871478_160
{ "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\tString command = \"NI\";\n\t\tATCommandStatus status = ATCommandStatus.UNKNOWN;\n\t\tATCommandResponsePacket packet = new ATCommandResponsePacket(frameID, status, command, nul...
{ "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 byte[] getCommandValue() {\n\t\treturn commandValue;\n\t}", "class_method_signature": "ATCommandResponsePacket.getCommandValue()", "constructor": false, "full_signature": "public byte[] getCommandValue()", "identifier": "getCommandValue", "invocations": [], "modifiers": "public", "para...
{ "created": null, "fork": null, "fork_count": 54, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 21871478, "size": 3156, "stargazer_count": 76, "stars": null, "updates": null, "url": "https://github.com/digidotcom/xbee-java" }
21871478_56
{ "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(\"D817\");\n\t\tint options = 0x46; /* bit 1 */\n\t\tbyte[] receivedData ...
{ "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 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": "IODataSampleRxIndicatorPacket.getRFData()", "constructor": false, "full_signature": "public byte[] getRFData()", "identifier": "getRFData", ...
{ "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_249
{ "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 testSetDestAddressNull() {\n\t\t// Set up the resources for the test.\n\t\tCoAPRxResponsePacket packet = new CoAPRxResponsePacket(frameID, destAddress, sourceAddress, destPort, sourcePort, protocol, restFulStatus, data);\n\n\t\texception.expect(NullPointerException.class);\n\t\te...
{ "fields": [ { "declarator": "MIN_API_PAYLOAD_LENGTH = 41", "modifier": "private static final", "original_string": "private static final int MIN_API_PAYLOAD_LENGTH = 41;", "type": "int", "var_name": "MIN_API_PAYLOAD_LENGTH" }, { "declarator": "ERROR_PAYLOAD_NULL = \"Co...
{ "body": "public void setDestAddress(Inet6Address destAddress) {\n\t\tif (destAddress == null)\n\t\t\tthrow new NullPointerException(ERROR_DEST_ADDR_NULL);\n\n\t\tthis.destAddress = destAddress;\n\t}", "class_method_signature": "CoAPRxResponsePacket.setDestAddress(Inet6Address destAddress)", "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_619
{ "fields": [], "file": "library/src/test/java/com/digi/xbee/api/exceptions/XBeeExceptionTest.java", "identifier": "XBeeExceptionTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n\tpublic final void testGetCause() {\n\t\t// Setup the resources for the test.\n\t\tThrowable cause = new Exception();\n\t\tXBeeException e = new XBeeException();\n\t\te.initCause(cause);\n\t\t\n\t\t// Call the method under test.\n\t\tThrowable result = e.getCause();\n\t\t\n\t\t// Verify the result....
{ "fields": [ { "declarator": "serialVersionUID = 1L", "modifier": "private static final", "original_string": "private static final long serialVersionUID = 1L;", "type": "long", "var_name": "serialVersionUID" } ], "file": "library/src/main/java/com/digi/xbee/api/exceptions/XB...
{ "body": "@Override\n\tpublic Throwable getCause() {\n\t\treturn super.getCause();\n\t}", "class_method_signature": "XBeeException.getCause()", "constructor": false, "full_signature": "@Override public Throwable getCause()", "identifier": "getCause", "invocations": [ "getCause" ], "modifiers": "@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_588
{ "fields": [ { "declarator": "PARAMETER_MY = \"MY\"", "modifier": "private static final", "original_string": "private static final String PARAMETER_MY = \"MY\";", "type": "String", "var_name": "PARAMETER_MY" }, { "declarator": "PARAMETER_C0 = \"C0\"", "modifier":...
{ "body": "@Test\n\tpublic void testStopListeningSuccess() throws TimeoutException, XBeeException {\n\t\t// Do nothing when setting any parameter.\n\t\tMockito.doNothing().when(ipv6Device).setParameter(Mockito.anyString(), Mockito.any(byte[].class));\n\t\t\n\t\tipv6Device.stopListening();\n\t\t\n\t\t// Verify that so...
{ "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": "public void stopListening() throws TimeoutException, XBeeException {\n\t\tsetParameter(\"C0\", ByteUtils.shortToByteArray((short)0));\n\t\tsourcePort = 0;\n\t}", "class_method_signature": "IPv6Device.stopListening()", "constructor": false, "full_signature": "public void stopListening()", "identifie...
{ "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_422
{ "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.TX_64.getValue();\n\t\tint frameID = 0xE7;\n\t\tXBee64BitAddress dest64Addr = new XBee64BitAddress(\"0013A2004032D9AB\");\n\t\t\n\t\tbyte[] payload = new byte[...
{ "fields": [ { "declarator": "MIN_API_PAYLOAD_LENGTH = 11", "modifier": "private static final", "original_string": "private static final int MIN_API_PAYLOAD_LENGTH = 11;", "type": "int", "var_name": "MIN_API_PAYLOAD_LENGTH" }, { "declarator": "transmitOptions", "...
{ "body": "public static TX64Packet createPacket(byte[] payload) {\n\t\tif (payload == null)\n\t\t\tthrow new NullPointerException(\"TX64 Request packet payload cannot be null.\");\n\t\t\n\t\t// 1 (Frame type) + 1 (frame ID) + 8 (address) + 1 (transmit options)\n\t\tif (payload.length < MIN_API_PAYLOAD_LENGTH)\n\t\t\...
{ "created": null, "fork": null, "fork_count": 54, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 21871478, "size": 3156, "stargazer_count": 76, "stars": null, "updates": null, "url": "https://github.com/digidotcom/xbee-java" }
21871478_137
{ "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 = 0x01;\n\t\tXBee64BitAddress dest64Addr = new XBee64BitAddress(\"0013A2004032D9AB\");\n\t\tXBee16BitAddress dest16Addr = new XBee16BitAddress(\"B45C\");\n\t\tint sourceEnd...
{ "fields": [ { "declarator": "MIN_API_PAYLOAD_LENGTH = 20", "modifier": "private static final", "original_string": "private static final int MIN_API_PAYLOAD_LENGTH = 20;", "type": "int", "var_name": "MIN_API_PAYLOAD_LENGTH" }, { "declarator": "destAddress64", "mo...
{ "body": "public static ExplicitAddressingPacket createPacket(byte[] payload) {\n\t\tif (payload == null)\n\t\t\tthrow new NullPointerException(\"Explicit Addressing packet payload cannot be null.\");\n\t\t\n\t\t// 1 (Frame type) + 1 (frame ID) + 8 (64-bit address) + 2 (16-bit address) + 1 (source endpoint) + 1 (des...
{ "created": null, "fork": null, "fork_count": 54, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 21871478, "size": 3156, "stargazer_count": 76, "stars": null, "updates": null, "url": "https://github.com/digidotcom/xbee-java" }
21871478_567
{ "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 testToStringSoftwareFlowControl() {\n\t\t// Setup the resources for the test.\n\t\tSerialPortParameters params = new SerialPortParameters(115200, 7, 2, 4, 4);\n\t\tTestAbstractSerialPort port = Mockito.spy(new TestAbstractSerialPort(\"COM1\", params));\n\t\tString expected = \"[COM1 - ...
{ "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_589
{ "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": "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 XBee64BitAddress getDestinationAddress() throws TimeoutException,\n\t\t\tXBeeException {\n\t\t// Not supported in IPv6 modules.\n\t\tthrow new UnsupportedOperationException(OPERATION_EXCEPTION);\n\t}", "class_method_signature": "IPv6Device.getDestinationAddress()", "constructor": fa...
{ "created": null, "fork": null, "fork_count": 54, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 21871478, "size": 3156, "stargazer_count": 76, "stars": null, "updates": null, "url": "https://github.com/digidotcom/xbee-java" }
21871478_423
{ "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 dest64Addr = new XBee64BitAddress(\"0013A2004032D9AB\");\n\t\tint options = 0x04;\n\t\tbyte[] data = new byte[]{0x68, 0x6F, 0x6C, 0x61};\n\t\t...
{ "fields": [ { "declarator": "MIN_API_PAYLOAD_LENGTH = 11", "modifier": "private static final", "original_string": "private static final int MIN_API_PAYLOAD_LENGTH = 11;", "type": "int", "var_name": "MIN_API_PAYLOAD_LENGTH" }, { "declarator": "transmitOptions", "...
{ "body": "public static TX64Packet createPacket(byte[] payload) {\n\t\tif (payload == null)\n\t\t\tthrow new NullPointerException(\"TX64 Request packet payload cannot be null.\");\n\t\t\n\t\t// 1 (Frame type) + 1 (frame ID) + 8 (address) + 1 (transmit options)\n\t\tif (payload.length < MIN_API_PAYLOAD_LENGTH)\n\t\t\...
{ "created": null, "fork": null, "fork_count": 54, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 21871478, "size": 3156, "stargazer_count": 76, "stars": null, "updates": null, "url": "https://github.com/digidotcom/xbee-java" }
21871478_136
{ "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.EXPLICIT_ADDRESSING_COMMAND_FRAME.getValue();\n\t\tint frameID = 0x01;\n\t\tXBee64BitAddress dest64Addr = new XBee64BitAddress(\"0013A2004032D9AB\");\n\t\tXBee...
{ "fields": [ { "declarator": "MIN_API_PAYLOAD_LENGTH = 20", "modifier": "private static final", "original_string": "private static final int MIN_API_PAYLOAD_LENGTH = 20;", "type": "int", "var_name": "MIN_API_PAYLOAD_LENGTH" }, { "declarator": "destAddress64", "mo...
{ "body": "public static ExplicitAddressingPacket createPacket(byte[] payload) {\n\t\tif (payload == null)\n\t\t\tthrow new NullPointerException(\"Explicit Addressing packet payload cannot be null.\");\n\t\t\n\t\t// 1 (Frame type) + 1 (frame ID) + 8 (64-bit address) + 2 (16-bit address) + 1 (source endpoint) + 1 (des...
{ "created": null, "fork": null, "fork_count": 54, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 21871478, "size": 3156, "stargazer_count": 76, "stars": null, "updates": null, "url": "https://github.com/digidotcom/xbee-java" }
21871478_566
{ "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 testToStringParitySpace() {\n\t\t// Setup the resources for the test.\n\t\tSerialPortParameters params = new SerialPortParameters(115200, 7, 2, 4, 3);\n\t\tTestAbstractSerialPort port = Mockito.spy(new TestAbstractSerialPort(\"COM1\", params));\n\t\tString expected = \"[COM1 - 115200/7...
{ "fields": [ { "declarator": "DEFAULT_PORT_TIMEOUT = 10", "modifier": "public static final", "original_string": "public static final int DEFAULT_PORT_TIMEOUT = 10;", "type": "int", "var_name": "DEFAULT_PORT_TIMEOUT" }, { "declarator": "DEFAULT_DATA_BITS = 8", "mo...
{ "body": "@Override\n\tpublic String toString() {\n\t\tif (parameters != null) {\n\t\t\tString parity = \"N\";\n\t\t\tString flowControl = \"N\";\n\t\t\tif (parameters.parity == 1)\n\t\t\t\tparity = \"O\";\n\t\t\telse if (parameters.parity == 2)\n\t\t\t\tparity = \"E\";\n\t\t\telse if (parameters.parity == 3)\n\t\t\...
{ "created": null, "fork": null, "fork_count": 54, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 21871478, "size": 3156, "stargazer_count": 76, "stars": null, "updates": null, "url": "https://github.com/digidotcom/xbee-java" }
21871478_57
{ "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(\"D817\");\n\t\tint options = 0x46; /* bit 1 */\n\t\tbyte[] receivedDa...
{ "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 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": "IODataSampleRxIndicatorPacket.getRFData()", "constructor": false, "full_signature": "public byte[] getRFData()", "identifier": "getRFData", ...
{ "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_248
{ "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 testSetSourceAddressNull() {\n\t\t// Set up the resources for the test.\n\t\tCoAPRxResponsePacket packet = new CoAPRxResponsePacket(frameID, destAddress, sourceAddress, destPort, sourcePort, protocol, restFulStatus, data);\n\n\t\texception.expect(NullPointerException.class);\n\t\...
{ "fields": [ { "declarator": "MIN_API_PAYLOAD_LENGTH = 41", "modifier": "private static final", "original_string": "private static final int MIN_API_PAYLOAD_LENGTH = 41;", "type": "int", "var_name": "MIN_API_PAYLOAD_LENGTH" }, { "declarator": "ERROR_PAYLOAD_NULL = \"Co...
{ "body": "public void setSourceAddress(Inet6Address sourceAddress) {\n\t\tif (sourceAddress == null)\n\t\t\tthrow new NullPointerException(ERROR_SOURCE_ADDR_NULL);\n\n\t\tthis.sourceAddress = sourceAddress;\n\t}", "class_method_signature": "CoAPRxResponsePacket.setSourceAddress(Inet6Address sourceAddress)", "con...
{ "created": null, "fork": null, "fork_count": 54, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 21871478, "size": 3156, "stargazer_count": 76, "stars": null, "updates": null, "url": "https://github.com/digidotcom/xbee-java" }
21871478_618
{ "fields": [], "file": "library/src/test/java/com/digi/xbee/api/exceptions/XBeeExceptionTest.java", "identifier": "XBeeExceptionTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n\tpublic final void testCreateXBeeExceptionMessageAndCauseBothNull() {\n\t\t// Setup the resources for the test.\n\t\tString message = null;\n\t\tThrowable cause = null;\n\t\t\n\t\t// Call the method under test.\n\t\tXBeeException e = new XBeeException(message, cause);\n\t\t\n\t\t// Verify the resul...
{ "fields": [ { "declarator": "serialVersionUID = 1L", "modifier": "private static final", "original_string": "private static final long serialVersionUID = 1L;", "type": "long", "var_name": "serialVersionUID" } ], "file": "library/src/main/java/com/digi/xbee/api/exceptions/XB...
{ "body": "@Override\n\tpublic Throwable getCause() {\n\t\treturn super.getCause();\n\t}", "class_method_signature": "XBeeException.getCause()", "constructor": false, "full_signature": "@Override public Throwable getCause()", "identifier": "getCause", "invocations": [ "getCause" ], "modifiers": "@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_474
{ "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 testGenerateByteArrayEscapedNullData() {\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...
{ "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[] generateByteArrayEscaped() {\n\t\tbyte[] unescapedArray = generateByteArray();\n\t\tByteArrayOutputStream os = new ByteArrayOutputStream();\n\t\t// Write header byte and do not escape it.\n\t\tos.write(SpecialByte.HEADER_BYTE.getValue());\n\t\tfor (int i = 1; i < unescapedArray.length; 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_0
{ "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 testNotSupportedOperationGetDIOChangeDetection() 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 met...
{ "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 Set<IOLine> getDIOChangeDetection() 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.getDIOChangeDetection()", "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_531
{ "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 testPurgeExceptionAvailableBytesToRead() throws IOException {\n\t\t// Setup the resources for the test.\n\t\tTestAbstractSerialPort port = Mockito.spy(new TestAbstractSerialPort(\"COM1\", 9600));\n\t\t\n\t\tMockito.when(mockInputStream.available()).thenReturn(10);\n\t\tMockito.wh...
{ "fields": [ { "declarator": "DEFAULT_PORT_TIMEOUT = 10", "modifier": "public static final", "original_string": "public static final int DEFAULT_PORT_TIMEOUT = 10;", "type": "int", "var_name": "DEFAULT_PORT_TIMEOUT" }, { "declarator": "DEFAULT_DATA_BITS = 8", "mo...
{ "body": "public void purge() {\n\t\tif (getInputStream() != null) {\n\t\t\ttry {\n\t\t\t\tbyte[] availableBytes = new byte[getInputStream().available()];\n\t\t\t\tif (getInputStream().available() > 0)\n\t\t\t\t\tgetInputStream().read(availableBytes, 0, getInputStream().available());\n\t\t\t} catch (IOException e) {...
{ "created": null, "fork": null, "fork_count": 54, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 21871478, "size": 3156, "stargazer_count": 76, "stars": null, "updates": null, "url": "https://github.com/digidotcom/xbee-java" }
21871478_161
{ "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 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(\"IPv6 IO Data Sample RX Indicator packet payload cannot be null.\")));\n\t\t\n\t\t// C...
{ "fields": [ { "declarator": "MIN_API_PAYLOAD_LENGTH = 17", "modifier": "private static final", "original_string": "private static final int MIN_API_PAYLOAD_LENGTH = 17;", "type": "int", "var_name": "MIN_API_PAYLOAD_LENGTH" }, { "declarator": "ERROR_PAYLOAD_NULL = \"IP...
{ "body": "public static IPv6IODataSampleRxIndicator createPacket(byte[] payload) {\n\t\tif (payload == null)\n\t\t\tthrow new NullPointerException(ERROR_PAYLOAD_NULL);\n\n\t\t// 1 (Frame type) + 8 (32-bit address) + 2 (16-bit address) + 1 (receive options)\n\t\tif (payload.length < MIN_API_PAYLOAD_LENGTH)\n\t\t\tthr...
{ "created": null, "fork": null, "fork_count": 54, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 21871478, "size": 3156, "stargazer_count": 76, "stars": null, "updates": null, "url": "https://github.com/digidotcom/xbee-java" }
21871478_41
{ "fields": [ { "declarator": "exception = ExpectedException.none()", "modifier": "@Rule\n\tpublic", "original_string": "@Rule\n\tpublic ExpectedException exception = ExpectedException.none();", "type": "ExpectedException", "var_name": "exception" } ], "file": "library/src/te...
{ "body": "@Test\n\tpublic final void testCreatePacketPayloadShorterThanNeeded() {\n\t\t// Setup the resources for the test.\n\t\tint frameType = APIFrameType.TRANSMIT_STATUS.getValue();\n\t\tint frameID = 0xE7;\n\t\tXBee16BitAddress address = new XBee16BitAddress(\"B45C\");\n\t\tint retryCount = 3;\n\t\tint delivery...
{ "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_462
{ "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_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\tpayloa...
{ "fields": [ { "declarator": "MIN_API_PAYLOAD_LENGTH = 5", "modifier": "private static final", "original_string": "private static final int MIN_API_PAYLOAD_LENGTH = 5;", "type": "int", "var_name": "MIN_API_PAYLOAD_LENGTH" }, { "declarator": "sourceAddress16", "mo...
{ "body": "public static RX16Packet createPacket(byte[] payload) {\n\t\tif (payload == null)\n\t\t\tthrow new NullPointerException(\"RX16 packet payload cannot be null.\");\n\t\t\n\t\t// 1 (Frame type) + 2 (16-bit address) + 1 (signal strength) + 1 (receive options)\n\t\tif (payload.length < MIN_API_PAYLOAD_LENGTH)\n...
{ "created": null, "fork": null, "fork_count": 54, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 21871478, "size": 3156, "stargazer_count": 76, "stars": null, "updates": null, "url": "https://github.com/digidotcom/xbee-java" }
21871478_198
{ "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 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(\"IPv6 Remote AT command packet payload cannot be null.\")));\n\t\t\n\t\t// Call the me...
{ "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 IPv6RemoteATCommandRequestPacket 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 destination address) + 1 (transmit options byte) + 2 (AT command)\n\t\tif (payload.length < M...
{ "created": null, "fork": null, "fork_count": 54, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 21871478, "size": 3156, "stargazer_count": 76, "stars": null, "updates": null, "url": "https://github.com/digidotcom/xbee-java" }
21871478_177
{ "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 testGetAPIPacketParametersReceivedDataNull() {\n\t\t// Set up the resources for the test.\n\t\tbyte[] data = null;\n\n\t\tCoAPTxRequestPacket packet = new CoAPTxRequestPacket(frameID, options, method, destAddress, uriData, data);\n\n\t\t// Call the method under test.\n\t\tLinkedH...
{ "fields": [ { "declarator": "MIN_API_PAYLOAD_LENGTH = 26", "modifier": "private static final", "original_string": "private static final int MIN_API_PAYLOAD_LENGTH = 26;", "type": "int", "var_name": "MIN_API_PAYLOAD_LENGTH" }, { "declarator": "ERROR_PAYLOAD_NULL = \"Co...
{ "body": "@Override\n\tpublic LinkedHashMap<String, String> getAPIPacketParameters() {\n\t\tLinkedHashMap<String, String> parameters = new LinkedHashMap<String, String>();\n\t\tparameters.put(\"Frame ID\", HexUtils.prettyHexString(HexUtils.integerToHexString(frameID, 1)) + \" (\" + frameID + \")\");\n\t\tparameters....
{ "created": null, "fork": null, "fork_count": 54, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 21871478, "size": 3156, "stargazer_count": 76, "stars": null, "updates": null, "url": "https://github.com/digidotcom/xbee-java" }
21871478_527
{ "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 testSetPortParametersNegativeParity() throws InvalidConfigurationException, ConnectionException {\n\t\t// Setup the resources for the test.\n\t\tint baudrate = 115200;\n\t\tint dataBits = 7;\n\t\tint stopBits = 2;\n\t\tint parity = -1;\n\t\tint flowControl = 3;\n\t\tTestAbstractS...
{ "fields": [ { "declarator": "DEFAULT_PORT_TIMEOUT = 10", "modifier": "public static final", "original_string": "public static final int DEFAULT_PORT_TIMEOUT = 10;", "type": "int", "var_name": "DEFAULT_PORT_TIMEOUT" }, { "declarator": "DEFAULT_DATA_BITS = 8", "mo...
{ "body": "public void setPortParameters(int baudRate, int dataBits, int stopBits, int parity, int flowControl) throws InvalidConfigurationException, ConnectionException {\n\t\tSerialPortParameters parameters = new SerialPortParameters(baudRate, dataBits, stopBits, parity, flowControl);\n\t\tsetPortParameters(paramet...
{ "created": null, "fork": null, "fork_count": 54, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 21871478, "size": 3156, "stargazer_count": 76, "stars": null, "updates": null, "url": "https://github.com/digidotcom/xbee-java" }
21871478_16
{ "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 testGetPacketParametersFrameTypeNotSupported() {\n\t\t// Setup the resources for the test.\n\t\tint frameType = 153; //0x99;\n\t\tTestXBeeAPIPacket packet = new TestXBeeAPIPacket(frameType);\n\t\t\n\t\tString expectedFrameType = HexUtils.integerToHexString(frameType, 1) + \" (\" ...
{ "fields": [ { "declarator": "NO_FRAME_ID = 9999", "modifier": "public final static", "original_string": "public final static int NO_FRAME_ID = 9999;", "type": "int", "var_name": "NO_FRAME_ID" }, { "declarator": "frameID = NO_FRAME_ID", "modifier": "protected", ...
{ "body": "@Override\n\tprotected LinkedHashMap<String, String> getPacketParameters() {\n\t\tLinkedHashMap<String, String> parameters = new LinkedHashMap<String, String>();\n\t\tif (getFrameType() != null)\n\t\t\tparameters.put(\"Frame type\", HexUtils.prettyHexString(HexUtils.integerToHexString(frameTypeValue, 1)) +...
{ "created": null, "fork": null, "fork_count": 54, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 21871478, "size": 3156, "stargazer_count": 76, "stars": null, "updates": null, "url": "https://github.com/digidotcom/xbee-java" }
21871478_209
{ "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 testGetParameterNullValue() {\n\t\tIPv6RemoteATCommandRequestPacket packet = new IPv6RemoteATCommandRequestPacket(frameID, ipv6address, transmitOptions, command, (byte[])null);\n\t\t\n\t\t// Call the method under test.\n\t\tbyte[] value = packet.getParameter();\n\t\t\n\t\t// Veri...
{ "fields": [ { "declarator": "MIN_API_PAYLOAD_LENGTH = 21", "modifier": "private static final", "original_string": "private static final int MIN_API_PAYLOAD_LENGTH = 21;", "type": "int", "var_name": "MIN_API_PAYLOAD_LENGTH" }, { "declarator": "ERROR_PAYLOAD_NULL = \"IP...
{ "body": "public byte[] getParameter() {\n\t\treturn parameter;\n\t}", "class_method_signature": "IPv6RemoteATCommandRequestPacket.getParameter()", "constructor": false, "full_signature": "public byte[] getParameter()", "identifier": "getParameter", "invocations": [], "modifiers": "public", "parameters...
{ "created": null, "fork": null, "fork_count": 54, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 21871478, "size": 3156, "stargazer_count": 76, "stars": null, "updates": null, "url": "https://github.com/digidotcom/xbee-java" }
21871478_659
{ "fields": [ { "declarator": "PARAMETER_MY = \"MY\"", "modifier": "private static final", "original_string": "private static final String PARAMETER_MY = \"MY\";", "type": "String", "var_name": "PARAMETER_MY" }, { "declarator": "PARAMETER_C0 = \"C0\"", "modifier":...
{ "body": "@Test(expected=TimeoutException.class)\n\tpublic void testStartListeningTimeout() throws TimeoutException, XBeeException {\n\t\t// Throw an timeout exception when setting any parameter.\n\t\tMockito.doThrow(new TimeoutException()).when(ipDevice).setParameter(Mockito.anyString(), Mockito.any(byte[].class));...
{ "fields": [ { "declarator": "BROADCAST_IP = \"255.255.255.255\"", "modifier": "public static final", "original_string": "public static final String BROADCAST_IP = \"255.255.255.255\";", "type": "String", "var_name": "BROADCAST_IP" }, { "declarator": "OPERATION_EXCEPTI...
{ "body": "public void startListening(int sourcePort) throws TimeoutException, XBeeException {\n\t\tif (sourcePort < 0 || sourcePort > 65535)\n\t\t\tthrow new IllegalArgumentException(\"Source port must be between 0 and 65535.\");\n\t\t\n\t\tsetParameter(\"C0\", ByteUtils.shortToByteArray((short)sourcePort));\n\t\tth...
{ "created": null, "fork": null, "fork_count": 54, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 21871478, "size": 3156, "stargazer_count": 76, "stars": null, "updates": null, "url": "https://github.com/digidotcom/xbee-java" }
21871478_435
{ "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 testGetAPIPacketParametersdataNotNull() {\n\t\t// Setup the resources for the test.\n\t\tint frameID = 0x65;\n\t\tXBee16BitAddress dest16Addr = new XBee16BitAddress(\"D817\");\n\t\tint options = 40;\n\t\tbyte[] data = new byte[]{0x68, 0x6F, 0x6C, 0x61};\n\t\tTX16Packet packet = n...
{ "fields": [ { "declarator": "MIN_API_PAYLOAD_LENGTH = 5", "modifier": "private static final", "original_string": "private static final int MIN_API_PAYLOAD_LENGTH = 5;", "type": "int", "var_name": "MIN_API_PAYLOAD_LENGTH" }, { "declarator": "transmitOptions", "mo...
{ "body": "@Override\n\tpublic LinkedHashMap<String, String> getAPIPacketParameters() {\n\t\tLinkedHashMap<String, String> parameters = new LinkedHashMap<String, String>();\n\t\tparameters.put(\"16-bit dest. address\", HexUtils.prettyHexString(destAddress16.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_570
{ "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 testCreateSerialPortInfoValidName() {\n\t\t// Setup the resources for the test.\n\t\tString name = \"/dev/ttyS0\";\n\t\t\n\t\t// Call the method under test.\n\t\tSerialPortInfo info = new SerialPortInfo(name);\n\t\t\n\t\t// Verify the result.\n\t\tassertThat(info.getPortName(), i...
{ "fields": [ { "declarator": "portName", "modifier": "private", "original_string": "private String portName;", "type": "String", "var_name": "portName" }, { "declarator": "portDescription", "modifier": "private", "original_string": "private String portDescr...
{ "body": "public String getPortName() {\n\t\treturn portName;\n\t}", "class_method_signature": "SerialPortInfo.getPortName()", "constructor": false, "full_signature": "public String getPortName()", "identifier": "getPortName", "invocations": [], "modifiers": "public", "parameters": "()", "return": "S...
{ "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_120
{ "fields": [ { "declarator": "exception = ExpectedException.none()", "modifier": "@Rule\n\tpublic", "original_string": "@Rule\n\tpublic ExpectedException exception = ExpectedException.none();", "type": "ExpectedException", "var_name": "exception" } ], "file": "library/src/te...
{ "body": "@Test\n\tpublic final void testGetParameter() {\n\t\t// Setup the resources for the test.\n\t\tint frameID = 0x10;\n\t\tXBee64BitAddress dest64Addr = new XBee64BitAddress(\"0013A2004032D9AB\");\n\t\tXBee16BitAddress dest16Addr = new XBee16BitAddress(\"FFFF\");\n\t\tint options = 23;\n\t\tString command = \...
{ "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 byte[] getParameter() {\n\t\treturn parameter;\n\t}", "class_method_signature": "RemoteATCommandPacket.getParameter()", "constructor": false, "full_signature": "public byte[] getParameter()", "identifier": "getParameter", "invocations": [], "modifiers": "public", "parameters": "()", ...
{ "created": null, "fork": null, "fork_count": 54, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 21871478, "size": 3156, "stargazer_count": 76, "stars": null, "updates": null, "url": "https://github.com/digidotcom/xbee-java" }
21871478_337
{ "fields": [ { "declarator": "IP_ADDRESS = \"10.10.11.12\"", "modifier": "private static final", "original_string": "private static final String IP_ADDRESS = \"10.10.11.12\";", "type": "String", "var_name": "IP_ADDRESS" }, { "declarator": "frameType = APIFrameType.RX_I...
{ "body": "@Test\n\tpublic final void testCreatePacketPayloadNotIncludingFrameType() {\n\t\t// Set up the resources for the test.\n\t\tbyte[] payload = new byte[9 + data.length];\n\t\tSystem.arraycopy(sourceAddress.getAddress(), 0, payload, 0, sourceAddress.getAddress().length);\n\t\tpayload[4] = (byte)(destPort >> 8...
{ "fields": [ { "declarator": "MIN_API_PAYLOAD_LENGTH = 11", "modifier": "private static final", "original_string": "private static final int MIN_API_PAYLOAD_LENGTH = 11;", "type": "int", "var_name": "MIN_API_PAYLOAD_LENGTH" }, { "declarator": "ERROR_PAYLOAD_NULL = \"RX...
{ "body": "public static RXIPv4Packet createPacket(byte[] payload) {\n\t\tif (payload == null)\n\t\t\tthrow new NullPointerException(ERROR_PAYLOAD_NULL);\n\n\t\tif (payload.length < MIN_API_PAYLOAD_LENGTH)\n\t\t\tthrow new IllegalArgumentException(ERROR_INCOMPLETE_PACKET);\n\n\t\tif ((payload[0] & 0xFF) != APIFrameTy...
{ "created": null, "fork": null, "fork_count": 54, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 21871478, "size": 3156, "stargazer_count": 76, "stars": null, "updates": null, "url": "https://github.com/digidotcom/xbee-java" }
21871478_767
{ "fields": [ { "declarator": "exception = ExpectedException.none()", "modifier": "@Rule\n\tpublic", "original_string": "@Rule\n\tpublic ExpectedException exception = ExpectedException.none();", "type": "ExpectedException", "var_name": "exception" }, { "declarator": "lp...
{ "body": "@SuppressWarnings(\"deprecation\")\n\t@Test\n\tpublic void testNotSupportedOperationRemoveSMSListener() 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 s...
{ "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 removeSMSListener(ISMSReceiveListener listener) {\n\t\t// Not supported in Cellular.\n\t\tthrow new UnsupportedOperationException(OPERATION_EXCEPTION);\n\t}", "class_method_signature": "LPWANDevice.removeSMSListener(ISMSReceiveListener listener)", "constructor": false, "full_...
{ "created": null, "fork": null, "fork_count": 54, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 21871478, "size": 3156, "stargazer_count": 76, "stars": null, "updates": null, "url": "https://github.com/digidotcom/xbee-java" }
21871478_82
{ "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 testGetParameterNullValue() {\n\t\t// Setup the resources for the test.\n\t\tint frameID = 0x10;\n\t\tString command = \"NI\";\n\t\tATCommandQueuePacket packet = new ATCommandQueuePacket(frameID, command, (byte[])null);\n\t\t\n\t\t// Call the method under test.\n\t\tbyte[] value ...
{ "fields": [ { "declarator": "MIN_API_PAYLOAD_LENGTH = 4", "modifier": "private static final", "original_string": "private static final int MIN_API_PAYLOAD_LENGTH = 4;", "type": "int", "var_name": "MIN_API_PAYLOAD_LENGTH" }, { "declarator": "command", "modifier":...
{ "body": "public byte[] getParameter() {\n\t\treturn parameter;\n\t}", "class_method_signature": "ATCommandQueuePacket.getParameter()", "constructor": false, "full_signature": "public byte[] getParameter()", "identifier": "getParameter", "invocations": [], "modifiers": "public", "parameters": "()", "...
{ "created": null, "fork": null, "fork_count": 54, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 21871478, "size": 3156, "stargazer_count": 76, "stars": null, "updates": null, "url": "https://github.com/digidotcom/xbee-java" }