test_class.declarator: compressionFileState
test_class.modifier: private
test_class.original_string: private CompressionFileState compressionFileState;
test_class.type: CompressionFileState
test_class.var_name: compressionFileState
test_class.declarator: fileName = "/testFile"
test_class.modifier: private final
test_class.original_string: private final String fileName = "/testFile";
test_class.type: String
test_class.var_name: fileName
test_class.declarator: bufferSize = 10
test_class.modifier: private final
test_class.original_string: private final int bufferSize = 10;
test_class.type: int
test_class.var_name: bufferSize
test_class.declarator: compressionImpl = "snappy"
test_class.modifier: private final
test_class.original_string: private final String compressionImpl = "snappy";
test_class.type: String
test_class.var_name: compressionImpl
test_class.declarator: originalLength = 86
test_class.modifier: private final
test_class.original_string: private final long originalLength = 86;
test_class.type: long
test_class.var_name: originalLength
test_class.declarator: compressedLength = 34
test_class.modifier: private final
test_class.original_string: private final long compressedLength = 34;
test_class.type: long
test_class.var_name: compressedLength
test_class.declarator: originalPos = {0L, 10L, 20L, 30L, 40L, 50L, 60L, 70L, 80L}
test_class.modifier: private final
test_class.original_string: private final Long[] originalPos = {0L, 10L, 20L, 30L, 40L, 50L, 60L, 70L, 80L};
test_class.type: Long[]
test_class.var_name: originalPos
test_class.declarator: compressedPos = {0L, 4L, 10L, 13L, 19L, 22L, 25L, 28L, 32L}
test_class.modifier: private final
test_class.original_string: private final Long[] compressedPos = {0L, 4L, 10L, 13L, 19L, 22L, 25L, 28L, 32L};
test_class.type: Long[]
test_class.var_name: compressedPos
test_class.file: smart-common/src/test/java/org/smartdata/model/TestCompressionFileState.java
test_class.identifier: TestCompressionFileState
test_case.body: @Test
    public void testLocateCompressionTrunk() throws IOException {
      CompressionTrunk compressionTrunk;
      // Original offset
      compressionTrunk = compressionFileState.locateCompressionTrunk(false, 12);
      Assert.assertEquals(1, compressionTrunk.getIndex());
      Assert.assertEquals(10L, compressionTrunk.getOriginOffset());
      Assert.assertEquals(10L, compressionTrunk.getOriginLength());
      Assert.assertEquals(4L, compressionTrunk.getCompressedOffset());
      Assert.assertEquals(6L, compressionTrunk.getCompressedLength());
      compressionTrunk = compressionFileState.locateCompressionTrunk(false, 40);
      Assert.assertEquals(4, compressionTrunk.getIndex());
      Assert.assertEquals(40L, compressionTrunk.getOriginOffset());
      Assert.assertEquals(10L, compressionTrunk.getOriginLength());
      Assert.assertEquals(19L, compressionTrunk.getCompressedOffset());
      Assert.assertEquals(3L, compressionTrunk.getCompressedLength());
      compressionTrunk = compressionFileState.locateCompressionTrunk(false, 85);
      Assert.assertEquals(8, compressionTrunk.getIndex());
      Assert.assertEquals(80L, compressionTrunk.getOriginOffset());
      Assert.assertEquals(6L, compressionTrunk.getOriginLength());
      Assert.assertEquals(32L, compressionTrunk.getCompressedOffset());
      Assert.assertEquals(2L, compressionTrunk.getCompressedLength());
  
      // Compressed offset
      compressionTrunk = compressionFileState.locateCompressionTrunk(true, 6);
      Assert.assertEquals(1, compressionTrunk.getIndex());
      Assert.assertEquals(10L, compressionTrunk.getOriginOffset());
      Assert.assertEquals(10L, compressionTrunk.getOriginLength());
      Assert.assertEquals(4L, compressionTrunk.getCompressedOffset());
      Assert.assertEquals(6L, compressionTrunk.getCompressedLength());
      compressionTrunk = compressionFileState.locateCompressionTrunk(true, 19);
      Assert.assertEquals(4, compressionTrunk.getIndex());
      Assert.assertEquals(40L, compressionTrunk.getOriginOffset());
      Assert.assertEquals(10L, compressionTrunk.getOriginLength());
      Assert.assertEquals(19L, compressionTrunk.getCompressedOffset());
      Assert.assertEquals(3L, compressionTrunk.getCompressedLength());
      compressionTrunk = compressionFileState.locateCompressionTrunk(true, 33);
      Assert.assertEquals(8, compressionTrunk.getIndex());
      Assert.assertEquals(80L, compressionTrunk.getOriginOffset());
      Assert.assertEquals(6L, compressionTrunk.getOriginLength());
      Assert.assertEquals(32L, compressionTrunk.getCompressedOffset());
      Assert.assertEquals(2L, compressionTrunk.getCompressedLength());
    }
test_case.class_method_signature: TestCompressionFileState.testLocateCompressionTrunk()
test_case.full_signature: @Test public void testLocateCompressionTrunk()
test_case.identifier: testLocateCompressionTrunk
test_case.invocations: locateCompressionTrunk assertEquals getIndex assertEquals getOriginOffset assertEquals getOriginLength assertEquals getCompressedOffset assertEquals getCompressedLength locateCompressionTrunk assertEquals getIndex assertEquals getOriginOffset assertEquals getOriginLength assertEquals getCompressedOffset assertEquals getCompressedLength locateCompressionTrunk assertEquals getIndex assertEquals getOriginOffset assertEquals getOriginLength assertEquals getCompressedOffset assertEquals getCompressedLength locateCompressionTrunk assertEquals getIndex assertEquals getOriginOffset assertEquals getOriginLength assertEquals getCompressedOffset assertEquals getCompressedLength locateCompressionTrunk assertEquals getIndex assertEquals getOriginOffset assertEquals getOriginLength assertEquals getCompressedOffset assertEquals getCompressedLength locateCompressionTrunk assertEquals getIndex assertEquals getOriginOffset assertEquals getOriginLength assertEquals getCompressedOffset assertEquals getCompressedLength
test_case.modifiers: @Test public
test_case.parameters: ()
test_case.return: void
test_case.signature: void testLocateCompressionTrunk()
focal_class.declarator: bufferSize
focal_class.modifier: private
focal_class.original_string: private int bufferSize;
focal_class.type: int
focal_class.var_name: bufferSize
focal_class.declarator: compressionImpl
focal_class.modifier: private
focal_class.original_string: private String compressionImpl;
focal_class.type: String
focal_class.var_name: compressionImpl
focal_class.declarator: originalLength
focal_class.modifier: private
focal_class.original_string: private long originalLength;
focal_class.type: long
focal_class.var_name: originalLength
focal_class.declarator: compressedLength
focal_class.modifier: private
focal_class.original_string: private long compressedLength;
focal_class.type: long
focal_class.var_name: compressedLength
focal_class.declarator: originalPos
focal_class.modifier: private
focal_class.original_string: private Long[] originalPos;
focal_class.type: Long[]
focal_class.var_name: originalPos
focal_class.declarator: compressedPos
focal_class.modifier: private
focal_class.original_string: private Long[] compressedPos;
focal_class.type: Long[]
focal_class.var_name: compressedPos
focal_class.file: smart-common/src/main/java/org/smartdata/model/CompressionFileState.java
focal_class.identifier: CompressionFileState
focal_class.interfaces: implements Serializable
focal_class.class_method_signature: CompressionFileState.CompressionFileState(String fileName, FileStage stage)
focal_class.full_signature: public  CompressionFileState(String fileName, FileStage stage)
focal_class.identifier: CompressionFileState
focal_class.modifiers: public
focal_class.parameters: (String fileName, FileStage stage)
focal_class.signature:  CompressionFileState(String fileName, FileStage stage)
focal_class.class_method_signature: CompressionFileState.CompressionFileState(String fileName, int bufferSize)
focal_class.full_signature: public  CompressionFileState(String fileName, int bufferSize)
focal_class.identifier: CompressionFileState
focal_class.modifiers: public
focal_class.parameters: (String fileName, int bufferSize)
focal_class.signature:  CompressionFileState(String fileName, int bufferSize)
focal_class.class_method_signature: CompressionFileState.CompressionFileState(String fileName, int bufferSize, String compressionImpl,
                                Long[] originalPos, Long[] compressedPos)
focal_class.full_signature: public  CompressionFileState(String fileName, int bufferSize, String compressionImpl,
                                Long[] originalPos, Long[] compressedPos)
focal_class.identifier: CompressionFileState
focal_class.modifiers: public
focal_class.parameters: (String fileName, int bufferSize, String compressionImpl,
                                Long[] originalPos, Long[] compressedPos)
focal_class.signature:  CompressionFileState(String fileName, int bufferSize, String compressionImpl,
                                Long[] originalPos, Long[] compressedPos)
focal_class.class_method_signature: CompressionFileState.CompressionFileState(String fileName, int bufferSize, String compressionImpl,
                                long originalLength, long compressedLength)
focal_class.full_signature: public  CompressionFileState(String fileName, int bufferSize, String compressionImpl,
                                long originalLength, long compressedLength)
focal_class.identifier: CompressionFileState
focal_class.modifiers: public
focal_class.parameters: (String fileName, int bufferSize, String compressionImpl,
                                long originalLength, long compressedLength)
focal_class.signature:  CompressionFileState(String fileName, int bufferSize, String compressionImpl,
                                long originalLength, long compressedLength)
focal_class.class_method_signature: CompressionFileState.CompressionFileState(String fileName, int bufferSize, String compressionImpl)
focal_class.full_signature: public  CompressionFileState(String fileName, int bufferSize, String compressionImpl)
focal_class.identifier: CompressionFileState
focal_class.modifiers: public
focal_class.parameters: (String fileName, int bufferSize, String compressionImpl)
focal_class.signature:  CompressionFileState(String fileName, int bufferSize, String compressionImpl)
focal_class.class_method_signature: CompressionFileState.CompressionFileState(String fileName, int bufferSize,
                                long originalLength, long compressedLength, Long[] originalPos,
                                Long[] compressedPos)
focal_class.full_signature: public  CompressionFileState(String fileName, int bufferSize,
                                long originalLength, long compressedLength, Long[] originalPos,
                                Long[] compressedPos)
focal_class.identifier: CompressionFileState
focal_class.modifiers: public
focal_class.parameters: (String fileName, int bufferSize,
                                long originalLength, long compressedLength, Long[] originalPos,
                                Long[] compressedPos)
focal_class.signature:  CompressionFileState(String fileName, int bufferSize,
                                long originalLength, long compressedLength, Long[] originalPos,
                                Long[] compressedPos)
focal_class.class_method_signature: CompressionFileState.CompressionFileState(String fileName, int bufferSize,
                                Long[] originalPos, Long[] compressedPos)
focal_class.full_signature: public  CompressionFileState(String fileName, int bufferSize,
                                Long[] originalPos, Long[] compressedPos)
focal_class.identifier: CompressionFileState
focal_class.modifiers: public
focal_class.parameters: (String fileName, int bufferSize,
                                Long[] originalPos, Long[] compressedPos)
focal_class.signature:  CompressionFileState(String fileName, int bufferSize,
                                Long[] originalPos, Long[] compressedPos)
focal_class.class_method_signature: CompressionFileState.CompressionFileState(String fileName, int bufferSize, String compressionImpl,
                                long originalLength, long compressedLength, Long[] originalPos,
                                Long[] compressedPos)
focal_class.full_signature: public  CompressionFileState(String fileName, int bufferSize, String compressionImpl,
                                long originalLength, long compressedLength, Long[] originalPos,
                                Long[] compressedPos)
focal_class.identifier: CompressionFileState
focal_class.modifiers: public
focal_class.parameters: (String fileName, int bufferSize, String compressionImpl,
                                long originalLength, long compressedLength, Long[] originalPos,
                                Long[] compressedPos)
focal_class.signature:  CompressionFileState(String fileName, int bufferSize, String compressionImpl,
                                long originalLength, long compressedLength, Long[] originalPos,
                                Long[] compressedPos)
focal_class.class_method_signature: CompressionFileState.CompressionFileState(String fileName, int bufferSize, String compressionImpl,
                                long originalLength, long compressedLength, Long[] originalPos,
                                Long[] compressedPos, FileStage stage)
focal_class.full_signature: public  CompressionFileState(String fileName, int bufferSize, String compressionImpl,
                                long originalLength, long compressedLength, Long[] originalPos,
                                Long[] compressedPos, FileStage stage)
focal_class.identifier: CompressionFileState
focal_class.modifiers: public
focal_class.parameters: (String fileName, int bufferSize, String compressionImpl,
                                long originalLength, long compressedLength, Long[] originalPos,
                                Long[] compressedPos, FileStage stage)
focal_class.signature:  CompressionFileState(String fileName, int bufferSize, String compressionImpl,
                                long originalLength, long compressedLength, Long[] originalPos,
                                Long[] compressedPos, FileStage stage)
focal_class.class_method_signature: CompressionFileState.getBufferSize()
focal_class.full_signature: public int getBufferSize()
focal_class.identifier: getBufferSize
focal_class.modifiers: public
focal_class.parameters: ()
focal_class.return: int
focal_class.signature: int getBufferSize()
focal_class.class_method_signature: CompressionFileState.setBufferSize(int bufferSize)
focal_class.full_signature: public void setBufferSize(int bufferSize)
focal_class.identifier: setBufferSize
focal_class.modifiers: public
focal_class.parameters: (int bufferSize)
focal_class.return: void
focal_class.signature: void setBufferSize(int bufferSize)
focal_class.class_method_signature: CompressionFileState.getOriginalLength()
focal_class.full_signature: public long getOriginalLength()
focal_class.identifier: getOriginalLength
focal_class.modifiers: public
focal_class.parameters: ()
focal_class.return: long
focal_class.signature: long getOriginalLength()
focal_class.class_method_signature: CompressionFileState.getCompressedLength()
focal_class.full_signature: public long getCompressedLength()
focal_class.identifier: getCompressedLength
focal_class.modifiers: public
focal_class.parameters: ()
focal_class.return: long
focal_class.signature: long getCompressedLength()
focal_class.class_method_signature: CompressionFileState.setOriginalLength(long length)
focal_class.full_signature: public void setOriginalLength(long length)
focal_class.identifier: setOriginalLength
focal_class.modifiers: public
focal_class.parameters: (long length)
focal_class.return: void
focal_class.signature: void setOriginalLength(long length)
focal_class.class_method_signature: CompressionFileState.setCompressedLength(long length)
focal_class.full_signature: public void setCompressedLength(long length)
focal_class.identifier: setCompressedLength
focal_class.modifiers: public
focal_class.parameters: (long length)
focal_class.return: void
focal_class.signature: void setCompressedLength(long length)
focal_class.class_method_signature: CompressionFileState.getOriginalPos()
focal_class.full_signature: public Long[] getOriginalPos()
focal_class.identifier: getOriginalPos
focal_class.modifiers: public
focal_class.parameters: ()
focal_class.return: Long[]
focal_class.signature: Long[] getOriginalPos()
focal_class.class_method_signature: CompressionFileState.getCompressedPos()
focal_class.full_signature: public Long[] getCompressedPos()
focal_class.identifier: getCompressedPos
focal_class.modifiers: public
focal_class.parameters: ()
focal_class.return: Long[]
focal_class.signature: Long[] getCompressedPos()
focal_class.class_method_signature: CompressionFileState.getCompressionImpl()
focal_class.full_signature: public String getCompressionImpl()
focal_class.identifier: getCompressionImpl
focal_class.modifiers: public
focal_class.parameters: ()
focal_class.return: String
focal_class.signature: String getCompressionImpl()
focal_class.class_method_signature: CompressionFileState.setCompressionImpl(String compressionImpl)
focal_class.full_signature: public void setCompressionImpl(String compressionImpl)
focal_class.identifier: setCompressionImpl
focal_class.modifiers: public
focal_class.parameters: (String compressionImpl)
focal_class.return: void
focal_class.signature: void setCompressionImpl(String compressionImpl)
focal_class.class_method_signature: CompressionFileState.getPosIndexByOriginalOffset(long offset)
focal_class.full_signature: public int getPosIndexByOriginalOffset(long offset)
focal_class.identifier: getPosIndexByOriginalOffset
focal_class.modifiers: public
focal_class.parameters: (long offset)
focal_class.return: int
focal_class.signature: int getPosIndexByOriginalOffset(long offset)
focal_class.class_method_signature: CompressionFileState.getPosIndexByCompressedOffset(long offset)
focal_class.full_signature: public int getPosIndexByCompressedOffset(long offset)
focal_class.identifier: getPosIndexByCompressedOffset
focal_class.modifiers: public
focal_class.parameters: (long offset)
focal_class.return: int
focal_class.signature: int getPosIndexByCompressedOffset(long offset)
focal_class.class_method_signature: CompressionFileState.locateCompressionTrunk(boolean compressed,
        long offset)
focal_class.full_signature: public CompressionTrunk locateCompressionTrunk(boolean compressed,
        long offset)
focal_class.identifier: locateCompressionTrunk
focal_class.modifiers: public
focal_class.parameters: (boolean compressed,
        long offset)
focal_class.return: CompressionTrunk
focal_class.signature: CompressionTrunk locateCompressionTrunk(boolean compressed,
        long offset)
focal_class.class_method_signature: CompressionFileState.getOriginTrunkSize(int index)
focal_class.full_signature: public long getOriginTrunkSize(int index)
focal_class.identifier: getOriginTrunkSize
focal_class.modifiers: public
focal_class.parameters: (int index)
focal_class.return: long
focal_class.signature: long getOriginTrunkSize(int index)
focal_class.class_method_signature: CompressionFileState.getCompressedTrunkSize(int index)
focal_class.full_signature: public long getCompressedTrunkSize(int index)
focal_class.identifier: getCompressedTrunkSize
focal_class.modifiers: public
focal_class.parameters: (int index)
focal_class.return: long
focal_class.signature: long getCompressedTrunkSize(int index)
focal_class.class_method_signature: CompressionFileState.setPositionMapping(Long[] originalPos, Long[] compressedPos)
focal_class.full_signature: public void setPositionMapping(Long[] originalPos, Long[] compressedPos)
focal_class.identifier: setPositionMapping
focal_class.modifiers: public
focal_class.parameters: (Long[] originalPos, Long[] compressedPos)
focal_class.return: void
focal_class.signature: void setPositionMapping(Long[] originalPos, Long[] compressedPos)
focal_class.class_method_signature: CompressionFileState.newBuilder()
focal_class.full_signature: public static Builder newBuilder()
focal_class.identifier: newBuilder
focal_class.modifiers: public static
focal_class.parameters: ()
focal_class.return: Builder
focal_class.signature: Builder newBuilder()
focal_class.superclass: extends FileState
focal_method.body: public CompressionTrunk locateCompressionTrunk(boolean compressed,
        long offset) throws IOException {
      int index = compressed ? getPosIndexByCompressedOffset(offset) :
          getPosIndexByOriginalOffset(offset);
      CompressionTrunk compressionTrunk = new CompressionTrunk(index);
      compressionTrunk.setCompressionImpl(compressionImpl);
      compressionTrunk.setOriginOffset(originalPos[index]);
      compressionTrunk.setOriginLength(getOriginTrunkSize(index));
      compressionTrunk.setCompressedOffset(compressedPos[index]);
      compressionTrunk.setCompressedLength(getCompressedTrunkSize(index));
      return compressionTrunk;
    }
focal_method.class_method_signature: CompressionFileState.locateCompressionTrunk(boolean compressed,
        long offset)
focal_method.full_signature: public CompressionTrunk locateCompressionTrunk(boolean compressed,
        long offset)
focal_method.identifier: locateCompressionTrunk
focal_method.invocations: getPosIndexByCompressedOffset getPosIndexByOriginalOffset setCompressionImpl setOriginOffset setOriginLength getOriginTrunkSize setCompressedOffset setCompressedLength getCompressedTrunkSize
focal_method.modifiers: public
focal_method.parameters: (boolean compressed,
        long offset)
focal_method.return: CompressionTrunk
focal_method.signature: CompressionTrunk locateCompressionTrunk(boolean compressed,
        long offset)