test_class.file: sdk/src/test/java/com/punchthrough/bean/sdk/internal/serial/GattSerialMessageTest.java
test_class.identifier: GattSerialMessageTest
test_case.body: @Test
      public void testParseMessage2() {
          byte[] payload = new byte[]{0x0, 0x0, 0x61};
          byte[] serial = new byte[]{3, 0, 0, 0, 97, 89, -125};
          byte[] result = GattSerialMessage.parse(serial);
          assertThat(Arrays.equals(payload, result)).isTrue();
      }
test_case.class_method_signature: GattSerialMessageTest.testParseMessage2()
test_case.full_signature: @Test public void testParseMessage2()
test_case.identifier: testParseMessage2
test_case.invocations: parse isTrue assertThat equals
test_case.modifiers: @Test public
test_case.parameters: ()
test_case.return: void
test_case.signature: void testParseMessage2()
focal_class.declarator: TAG = "GattSerialMessage"
focal_class.modifier: private static final
focal_class.original_string: private static final String TAG = "GattSerialMessage";
focal_class.type: String
focal_class.var_name: TAG
focal_class.declarator: mBuffer
focal_class.modifier: private final
focal_class.original_string: private final Buffer mBuffer;
focal_class.type: Buffer
focal_class.var_name: mBuffer
focal_class.file: sdk/src/main/java/com/punchthrough/bean/sdk/internal/serial/GattSerialMessage.java
focal_class.identifier: GattSerialMessage
focal_class.class_method_signature: GattSerialMessage.GattSerialMessage(Buffer buffer)
focal_class.full_signature: private  GattSerialMessage(Buffer buffer)
focal_class.identifier: GattSerialMessage
focal_class.modifiers: private
focal_class.parameters: (Buffer buffer)
focal_class.signature:  GattSerialMessage(Buffer buffer)
focal_class.class_method_signature: GattSerialMessage.fromPayload(byte[] payload)
focal_class.full_signature: public static GattSerialMessage fromPayload(byte[] payload)
focal_class.identifier: fromPayload
focal_class.modifiers: public static
focal_class.parameters: (byte[] payload)
focal_class.return: GattSerialMessage
focal_class.signature: GattSerialMessage fromPayload(byte[] payload)
focal_class.class_method_signature: GattSerialMessage.parse(byte[] payload)
focal_class.full_signature: public static byte[] parse(byte[] payload)
focal_class.identifier: parse
focal_class.modifiers: public static
focal_class.parameters: (byte[] payload)
focal_class.return: byte[]
focal_class.signature: byte[] parse(byte[] payload)
focal_class.class_method_signature: GattSerialMessage.computeCRC16(byte[] data, int offset, int length)
focal_class.full_signature: static int computeCRC16(byte[] data, int offset, int length)
focal_class.identifier: computeCRC16
focal_class.modifiers: static
focal_class.parameters: (byte[] data, int offset, int length)
focal_class.return: int
focal_class.signature: int computeCRC16(byte[] data, int offset, int length)
focal_class.class_method_signature: GattSerialMessage.computeCRC16(int startingCrc, byte[] data, int offset, int length)
focal_class.full_signature: static int computeCRC16(int startingCrc, byte[] data, int offset, int length)
focal_class.identifier: computeCRC16
focal_class.modifiers: static
focal_class.parameters: (int startingCrc, byte[] data, int offset, int length)
focal_class.return: int
focal_class.signature: int computeCRC16(int startingCrc, byte[] data, int offset, int length)
focal_class.class_method_signature: GattSerialMessage.getBuffer()
focal_class.full_signature: public Buffer getBuffer()
focal_class.identifier: getBuffer
focal_class.modifiers: public
focal_class.parameters: ()
focal_class.return: Buffer
focal_class.signature: Buffer getBuffer()
focal_method.body: public static byte[] parse(byte[] payload) {
          int length = (payload[0] & 0xff);
          Buffer buffer = new Buffer();
          buffer.write(payload, 2, length);
          int crc = computeCRC16(payload, 0, payload.length - 2);
          int checkCrc = (((payload[payload.length - 1] & 0xff) << 8)) + (payload[payload.length - 2] & 0xff);
          if (crc != checkCrc) {
              Log.w(TAG, "Checksum failed");
              throw new IllegalStateException("Checksum mismatch");
          }
          return buffer.readByteArray();
      }
focal_method.class_method_signature: GattSerialMessage.parse(byte[] payload)
focal_method.full_signature: public static byte[] parse(byte[] payload)
focal_method.identifier: parse
focal_method.invocations: write computeCRC16 w readByteArray
focal_method.modifiers: public static
focal_method.parameters: (byte[] payload)
focal_method.return: byte[]
focal_method.signature: byte[] parse(byte[] payload)