test_class.file: core/src/test/java/dk/alexandra/fresco/framework/util/TestByteArrayHelper.java
test_class.identifier: TestByteArrayHelper
test_case.body: @Test(expected = IllegalAccessError.class)
    public void testSetBitIllegal() {
      ByteArrayHelper.setBit(new byte[]{}, -1, true);
    }
test_case.class_method_signature: TestByteArrayHelper.testSetBitIllegal()
test_case.full_signature: @Test(expected = IllegalAccessError.class) public void testSetBitIllegal()
test_case.identifier: testSetBitIllegal
test_case.invocations: setBit
test_case.modifiers: @Test(expected = IllegalAccessError.class) public
test_case.parameters: ()
test_case.return: void
test_case.signature: void testSetBitIllegal()
focal_class.file: core/src/main/java/dk/alexandra/fresco/framework/util/ByteArrayHelper.java
focal_class.identifier: ByteArrayHelper
focal_class.class_method_signature: ByteArrayHelper.ByteArrayHelper()
focal_class.full_signature: private  ByteArrayHelper()
focal_class.identifier: ByteArrayHelper
focal_class.modifiers: private
focal_class.parameters: ()
focal_class.signature:  ByteArrayHelper()
focal_class.class_method_signature: ByteArrayHelper.getBit(byte[] input, int index)
focal_class.full_signature: public static boolean getBit(byte[] input, int index)
focal_class.identifier: getBit
focal_class.modifiers: public static
focal_class.parameters: (byte[] input, int index)
focal_class.return: boolean
focal_class.signature: boolean getBit(byte[] input, int index)
focal_class.class_method_signature: ByteArrayHelper.setBit(byte[] input, int index, boolean choice)
focal_class.full_signature: public static void setBit(byte[] input, int index, boolean choice)
focal_class.identifier: setBit
focal_class.modifiers: public static
focal_class.parameters: (byte[] input, int index, boolean choice)
focal_class.return: void
focal_class.signature: void setBit(byte[] input, int index, boolean choice)
focal_class.class_method_signature: ByteArrayHelper.xor(List<byte[]> vector1, List<byte[]> vector2)
focal_class.full_signature: public static void xor(List<byte[]> vector1, List<byte[]> vector2)
focal_class.identifier: xor
focal_class.modifiers: public static
focal_class.parameters: (List<byte[]> vector1, List<byte[]> vector2)
focal_class.return: void
focal_class.signature: void xor(List<byte[]> vector1, List<byte[]> vector2)
focal_class.class_method_signature: ByteArrayHelper.xor(byte[] arr1, byte[] arr2)
focal_class.full_signature: public static void xor(byte[] arr1, byte[] arr2)
focal_class.identifier: xor
focal_class.modifiers: public static
focal_class.parameters: (byte[] arr1, byte[] arr2)
focal_class.return: void
focal_class.signature: void xor(byte[] arr1, byte[] arr2)
focal_class.class_method_signature: ByteArrayHelper.shiftArray(byte[] input, byte[] output, int positions)
focal_class.full_signature: public static void shiftArray(byte[] input, byte[] output, int positions)
focal_class.identifier: shiftArray
focal_class.modifiers: public static
focal_class.parameters: (byte[] input, byte[] output, int positions)
focal_class.return: void
focal_class.signature: void shiftArray(byte[] input, byte[] output, int positions)
focal_method.body: public static void setBit(byte[] input, int index, boolean choice) {
      if (index < 0) {
        throw new IllegalAccessError("Bit index must not be negative.");
      }
      if (choice) {
        // We read bits from left to right, hence the 7 - x.
        // Put a 1 in the correct position of a
        // zero-byte and OR it into the correct byte to ensure that the position
        // becomes 1 no matter whether it is currently set or not.
        input[index / 8] |= ((byte) 0x01) << (7 - (index % 8));
      } else {
        // Construct an all 1-byte, then construct a byte like above, where only
        // the correct position is set to 1. We XOR these bytes to get a byte
        // which is all 1's except in the correct position. We AND this into the
        // correct byte to ensure that only the correct positions gets set to 0.
        input[index / 8] &= 0xFF ^ ((byte) 0x01) << (7 - (index % 8));
      }
    }
focal_method.class_method_signature: ByteArrayHelper.setBit(byte[] input, int index, boolean choice)
focal_method.full_signature: public static void setBit(byte[] input, int index, boolean choice)
focal_method.identifier: setBit
focal_method.modifiers: public static
focal_method.parameters: (byte[] input, int index, boolean choice)
focal_method.return: void
focal_method.signature: void setBit(byte[] input, int index, boolean choice)