test_class.file: tajo-common/src/test/java/org/apache/tajo/util/TestBitArrayTest.java
test_class.identifier: TestBitArrayTest
test_case.body: @Test
    public void testFromByteBuffer() {
      int numBit = 80;
      BitArray bitArray = new BitArray(numBit);
      assertEquals(numBit, bitArray.bitsLength());
  
      for (int i = 0; i < numBit; i++) {
        if((i % 2) == 0){
          bitArray.set(i);
        }
      }
  
      ByteBuffer buffer = ByteBuffer.allocate(bitArray.bytesLength());
      buffer.put(bitArray.toArray());
      for (int i = 0; i < numBit; i++) {
        if((i % 2) == 0){
          assertTrue(bitArray.get(i));
        } else {
          assertFalse(bitArray.get(i));
        }
      }
  
      buffer.rewind();
      bitArray.fromByteBuffer(buffer);
      for (int i = 0; i < numBit; i++) {
        if((i % 2) == 0){
          assertTrue(bitArray.get(i));
        } else {
          assertFalse(bitArray.get(i));
        }
      }
    }
test_case.class_method_signature: TestBitArrayTest.testFromByteBuffer()
test_case.full_signature: @Test public void testFromByteBuffer()
test_case.identifier: testFromByteBuffer
test_case.invocations: assertEquals bitsLength set allocate bytesLength put toArray assertTrue get assertFalse get rewind fromByteBuffer assertTrue get assertFalse get
test_case.modifiers: @Test public
test_case.parameters: ()
test_case.return: void
test_case.signature: void testFromByteBuffer()
focal_class.declarator: data
focal_class.modifier: private
focal_class.original_string: private byte [] data;
focal_class.type: byte []
focal_class.var_name: data
focal_class.declarator: length
focal_class.modifier: private
focal_class.original_string: private int length;
focal_class.type: int
focal_class.var_name: length
focal_class.file: tajo-common/src/main/java/org/apache/tajo/util/BitArray.java
focal_class.identifier: BitArray
focal_class.class_method_signature: BitArray.BitArray(int numBits)
focal_class.full_signature: public  BitArray(int numBits)
focal_class.identifier: BitArray
focal_class.modifiers: public
focal_class.parameters: (int numBits)
focal_class.signature:  BitArray(int numBits)
focal_class.class_method_signature: BitArray.BitArray(byte [] bytes)
focal_class.full_signature: public  BitArray(byte [] bytes)
focal_class.identifier: BitArray
focal_class.modifiers: public
focal_class.parameters: (byte [] bytes)
focal_class.signature:  BitArray(byte [] bytes)
focal_class.class_method_signature: BitArray.set(int idx)
focal_class.full_signature: public void set(int idx)
focal_class.identifier: set
focal_class.modifiers: public
focal_class.parameters: (int idx)
focal_class.return: void
focal_class.signature: void set(int idx)
focal_class.class_method_signature: BitArray.get(int idx)
focal_class.full_signature: public boolean get(int idx)
focal_class.identifier: get
focal_class.modifiers: public
focal_class.parameters: (int idx)
focal_class.return: boolean
focal_class.signature: boolean get(int idx)
focal_class.class_method_signature: BitArray.clear()
focal_class.full_signature: public void clear()
focal_class.identifier: clear
focal_class.modifiers: public
focal_class.parameters: ()
focal_class.return: void
focal_class.signature: void clear()
focal_class.class_method_signature: BitArray.bytesLength()
focal_class.full_signature: public int bytesLength()
focal_class.identifier: bytesLength
focal_class.modifiers: public
focal_class.parameters: ()
focal_class.return: int
focal_class.signature: int bytesLength()
focal_class.class_method_signature: BitArray.bitsLength()
focal_class.full_signature: public int bitsLength()
focal_class.identifier: bitsLength
focal_class.modifiers: public
focal_class.parameters: ()
focal_class.return: int
focal_class.signature: int bitsLength()
focal_class.class_method_signature: BitArray.toArray()
focal_class.full_signature: public byte [] toArray()
focal_class.identifier: toArray
focal_class.modifiers: public
focal_class.parameters: ()
focal_class.return: byte []
focal_class.signature: byte [] toArray()
focal_class.class_method_signature: BitArray.fromByteBuffer(ByteBuffer byteBuffer)
focal_class.full_signature: public void fromByteBuffer(ByteBuffer byteBuffer)
focal_class.identifier: fromByteBuffer
focal_class.modifiers: public
focal_class.parameters: (ByteBuffer byteBuffer)
focal_class.return: void
focal_class.signature: void fromByteBuffer(ByteBuffer byteBuffer)
focal_class.class_method_signature: BitArray.toString()
focal_class.full_signature: public String toString()
focal_class.identifier: toString
focal_class.modifiers: public
focal_class.parameters: ()
focal_class.return: String
focal_class.signature: String toString()
focal_method.body: public void fromByteBuffer(ByteBuffer byteBuffer) {
      clear();
      int i = 0;
      while(byteBuffer.hasRemaining()) {
        data[i] = byteBuffer.get();
        i++;
      }
    }
focal_method.class_method_signature: BitArray.fromByteBuffer(ByteBuffer byteBuffer)
focal_method.full_signature: public void fromByteBuffer(ByteBuffer byteBuffer)
focal_method.identifier: fromByteBuffer
focal_method.invocations: clear hasRemaining get
focal_method.modifiers: public
focal_method.parameters: (ByteBuffer byteBuffer)
focal_method.return: void
focal_method.signature: void fromByteBuffer(ByteBuffer byteBuffer)