test_class.file: core/src/test/java/dk/alexandra/fresco/framework/util/TestByteAndBitConverter.java
test_class.identifier: TestByteAndBitConverter
test_case.body: @Test
    public void testToHex() {
      Assert.assertThat(ByteAndBitConverter.toHex(
          new boolean[]{false, false, false, false, false, false, false, false}), Is.is("00"));
      Assert.assertThat(
          ByteAndBitConverter.toHex(new boolean[]{true, true, true, true, true, true, true, true}),
          Is.is("ff"));
      Assert.assertThat(
          ByteAndBitConverter.toHex(new boolean[]{true, true, true, true, true, true, true}),
          Is.is("7f"));
      Assert.assertThat(
          ByteAndBitConverter.toHex(new boolean[]{true, true, true, true, true, true}),
          Is.is("3f"));
      Assert.assertThat(ByteAndBitConverter.toHex(new boolean[]{true, true, true, true, true}),
          Is.is("1f"));
      Assert.assertThat(ByteAndBitConverter.toHex(new boolean[]{true, true, true, true}),
          Is.is("0f"));
      Assert.assertThat(
          ByteAndBitConverter
              .toHex(new boolean[]{false, true, true, true, true, true, true, true, true}),
          Is.is("00ff"));
      Assert.assertThat(ByteAndBitConverter.toHex(
          new boolean[]{true, true, true, true, true, true, true, true, true}), Is.is("01ff"));
      Assert.assertThat(
          ByteAndBitConverter.toHex(Arrays
              .asList((new Boolean[]{true, true, true, true, true, true, true, true, true}))),
          Is.is("01ff"));
    }
test_case.class_method_signature: TestByteAndBitConverter.testToHex()
test_case.full_signature: @Test public void testToHex()
test_case.identifier: testToHex
test_case.invocations: assertThat toHex is assertThat toHex is assertThat toHex is assertThat toHex is assertThat toHex is assertThat toHex is assertThat toHex is assertThat toHex is assertThat toHex asList is
test_case.modifiers: @Test public
test_case.parameters: ()
test_case.return: void
test_case.signature: void testToHex()
focal_class.file: core/src/main/java/dk/alexandra/fresco/framework/util/ByteAndBitConverter.java
focal_class.identifier: ByteAndBitConverter
focal_class.class_method_signature: ByteAndBitConverter.ByteAndBitConverter()
focal_class.full_signature: private  ByteAndBitConverter()
focal_class.identifier: ByteAndBitConverter
focal_class.modifiers: private
focal_class.parameters: ()
focal_class.signature:  ByteAndBitConverter()
focal_class.class_method_signature: ByteAndBitConverter.toByteArray(long value)
focal_class.full_signature: public static byte[] toByteArray(long value)
focal_class.identifier: toByteArray
focal_class.modifiers: public static
focal_class.parameters: (long value)
focal_class.return: byte[]
focal_class.signature: byte[] toByteArray(long value)
focal_class.class_method_signature: ByteAndBitConverter.toByteArray(int value)
focal_class.full_signature: public static byte[] toByteArray(int value)
focal_class.identifier: toByteArray
focal_class.modifiers: public static
focal_class.parameters: (int value)
focal_class.return: byte[]
focal_class.signature: byte[] toByteArray(int value)
focal_class.class_method_signature: ByteAndBitConverter.intToBitSet(int i)
focal_class.full_signature: public static BitSet intToBitSet(int i)
focal_class.identifier: intToBitSet
focal_class.modifiers: public static
focal_class.parameters: (int i)
focal_class.return: BitSet
focal_class.signature: BitSet intToBitSet(int i)
focal_class.class_method_signature: ByteAndBitConverter.toBoolean(String hex)
focal_class.full_signature: public static Boolean[] toBoolean(String hex)
focal_class.identifier: toBoolean
focal_class.modifiers: public static
focal_class.parameters: (String hex)
focal_class.return: Boolean[]
focal_class.signature: Boolean[] toBoolean(String hex)
focal_class.class_method_signature: ByteAndBitConverter.toHex(boolean[] bits)
focal_class.full_signature: public static String toHex(boolean[] bits)
focal_class.identifier: toHex
focal_class.modifiers: public static
focal_class.parameters: (boolean[] bits)
focal_class.return: String
focal_class.signature: String toHex(boolean[] bits)
focal_class.class_method_signature: ByteAndBitConverter.toHex(List<Boolean> bits)
focal_class.full_signature: public static String toHex(List<Boolean> bits)
focal_class.identifier: toHex
focal_class.modifiers: public static
focal_class.parameters: (List<Boolean> bits)
focal_class.return: String
focal_class.signature: String toHex(List<Boolean> bits)
focal_class.class_method_signature: ByteAndBitConverter.convertArray(Boolean[] in)
focal_class.full_signature: private static boolean[] convertArray(Boolean[] in)
focal_class.identifier: convertArray
focal_class.modifiers: private static
focal_class.parameters: (Boolean[] in)
focal_class.return: boolean[]
focal_class.signature: boolean[] convertArray(Boolean[] in)
focal_method.body: public static String toHex(boolean[] bits) {
      StringBuilder hex = new StringBuilder();
      boolean[] niceBits = null;
      if (bits.length % 4 == 0) {
        niceBits = bits;
      } else {
        niceBits = new boolean[4 * ((bits.length / 4) + 1)];
        int offset = 4 - (bits.length % 4);
        System.arraycopy(bits, 0, niceBits, offset, bits.length);
      }
  
      StringBuilder binb = new StringBuilder();
      for (boolean niceBit : niceBits) {
        binb.append(niceBit ? "1" : "0");
      }
      String bin = binb.toString();
      for (int i = 0; i < bin.length() / 4; i++) {
        String digit = bin.substring(i * 4, i * 4 + 4);
        Integer dec = Integer.parseInt(digit, 2);
        String hexStr = Integer.toHexString(dec);
        hex.append(hexStr);
      }
      if (hex.length() % 2 != 0) {
        hex.insert(0, "0");
      }
      return hex.toString();
    }
focal_method.class_method_signature: ByteAndBitConverter.toHex(boolean[] bits)
focal_method.full_signature: public static String toHex(boolean[] bits)
focal_method.identifier: toHex
focal_method.invocations: arraycopy append toString length substring parseInt toHexString append length insert toString
focal_method.modifiers: public static
focal_method.parameters: (boolean[] bits)
focal_method.return: String
focal_method.signature: String toHex(boolean[] bits)