test_class.file: feya/libraries/archive_diff/diff.generator/src/test/java/com/google/archivepatcher/generator/bsdiff/BsUtilTest.java
test_class.identifier: BsUtilTest
test_case.body: @Test
    public void readFormattedLongTest() throws IOException {
      byte[] data = {
        (byte) 0x78,
        (byte) 0x56,
        (byte) 0x34,
        (byte) 0x12,
        (byte) 0,
        (byte) 0,
        (byte) 0,
        (byte) 0,
        (byte) 0xef,
        (byte) 0xbe,
        (byte) 0xad,
        (byte) 0x0e,
        (byte) 0,
        (byte) 0,
        (byte) 0,
        (byte) 0
      };
      ByteArrayInputStream inputStream = new ByteArrayInputStream(data);
  
      Assert.assertEquals(0x12345678, BsUtil.readFormattedLong(inputStream));
      Assert.assertEquals(0x0eadbeef, BsUtil.readFormattedLong(inputStream));
    }
test_case.class_method_signature: BsUtilTest.readFormattedLongTest()
test_case.full_signature: @Test public void readFormattedLongTest()
test_case.identifier: readFormattedLongTest
test_case.invocations: assertEquals readFormattedLong assertEquals readFormattedLong
test_case.modifiers: @Test public
test_case.parameters: ()
test_case.return: void
test_case.signature: void readFormattedLongTest()
focal_class.declarator: NEGATIVE_MASK = 1L << 63
focal_class.modifier: private static final
focal_class.original_string: private static final long NEGATIVE_MASK = 1L << 63;
focal_class.type: long
focal_class.var_name: NEGATIVE_MASK
focal_class.file: feya/libraries/archive_diff/diff.generator/src/main/java/com/google/archivepatcher/generator/bsdiff/BsUtil.java
focal_class.identifier: BsUtil
focal_class.class_method_signature: BsUtil.writeFormattedLong(final long value, OutputStream outputStream)
focal_class.full_signature: static void writeFormattedLong(final long value, OutputStream outputStream)
focal_class.identifier: writeFormattedLong
focal_class.modifiers: static
focal_class.parameters: (final long value, OutputStream outputStream)
focal_class.return: void
focal_class.signature: void writeFormattedLong(final long value, OutputStream outputStream)
focal_class.class_method_signature: BsUtil.readFormattedLong(InputStream inputStream)
focal_class.full_signature: static long readFormattedLong(InputStream inputStream)
focal_class.identifier: readFormattedLong
focal_class.modifiers: static
focal_class.parameters: (InputStream inputStream)
focal_class.return: long
focal_class.signature: long readFormattedLong(InputStream inputStream)
focal_class.class_method_signature: BsUtil.lexicographicalCompare(
        final RandomAccessObject data1,
        final int start1,
        final int length1,
        final RandomAccessObject data2,
        final int start2,
        final int length2)
focal_class.full_signature: static int lexicographicalCompare(
        final RandomAccessObject data1,
        final int start1,
        final int length1,
        final RandomAccessObject data2,
        final int start2,
        final int length2)
focal_class.identifier: lexicographicalCompare
focal_class.modifiers: static
focal_class.parameters: (
        final RandomAccessObject data1,
        final int start1,
        final int length1,
        final RandomAccessObject data2,
        final int start2,
        final int length2)
focal_class.return: int
focal_class.signature: int lexicographicalCompare(
        final RandomAccessObject data1,
        final int start1,
        final int length1,
        final RandomAccessObject data2,
        final int start2,
        final int length2)
focal_method.body: static long readFormattedLong(InputStream inputStream) throws IOException {
          long result = 0;
          for (int bitshift = 0; bitshift < 64; bitshift += 8) {
              result |= ((long) inputStream.read()) << bitshift;
          }
  
          if ((result - NEGATIVE_MASK) > 0) {
              result = (result & ~NEGATIVE_MASK) * -1;
          }
          return result;
      }
focal_method.class_method_signature: BsUtil.readFormattedLong(InputStream inputStream)
focal_method.full_signature: static long readFormattedLong(InputStream inputStream)
focal_method.identifier: readFormattedLong
focal_method.invocations: read
focal_method.modifiers: static
focal_method.parameters: (InputStream inputStream)
focal_method.return: long
focal_method.signature: long readFormattedLong(InputStream inputStream)