test_class.file: flink-runtime/src/test/java/org/apache/flink/runtime/io/network/api/serialization/SpanningRecordSerializerTest.java
test_class.identifier: SpanningRecordSerializerTest
test_case.body: @Test
  	public void testHasData() {
  		final int SEGMENT_SIZE = 16;
  
  		final SpanningRecordSerializer<SerializationTestType> serializer = new SpanningRecordSerializer<SerializationTestType>();
  		final Buffer buffer = new Buffer(MemorySegmentFactory.allocateUnpooledSegment(SEGMENT_SIZE), mock(BufferRecycler.class));
  		final SerializationTestType randomIntRecord = Util.randomRecord(SerializationTestTypeFactory.INT);
  
  		Assert.assertFalse(serializer.hasData());
  
  		try {
  			serializer.addRecord(randomIntRecord);
  			Assert.assertTrue(serializer.hasData());
  
  			serializer.setNextBuffer(buffer);
  			Assert.assertTrue(serializer.hasData());
  
  			serializer.clear();
  			Assert.assertFalse(serializer.hasData());
  
  			serializer.setNextBuffer(buffer);
  
  			serializer.addRecord(randomIntRecord);
  			Assert.assertTrue(serializer.hasData());
  
  			serializer.addRecord(randomIntRecord);
  			Assert.assertTrue(serializer.hasData());
  		}
  		catch (Exception e) {
  			e.printStackTrace();
  			Assert.fail(e.getMessage());
  		}
  	}
test_case.class_method_signature: SpanningRecordSerializerTest.testHasData()
test_case.full_signature: @Test public void testHasData()
test_case.identifier: testHasData
test_case.invocations: allocateUnpooledSegment mock randomRecord assertFalse hasData addRecord assertTrue hasData setNextBuffer assertTrue hasData clear assertFalse hasData setNextBuffer addRecord assertTrue hasData addRecord assertTrue hasData printStackTrace fail getMessage
test_case.modifiers: @Test public
test_case.parameters: ()
test_case.return: void
test_case.signature: void testHasData()
focal_class.declarator: CHECKED = false
focal_class.modifier: private static final
focal_class.original_string: private static final boolean CHECKED = false;
focal_class.type: boolean
focal_class.var_name: CHECKED
focal_class.declarator: serializationBuffer
focal_class.modifier: private final
focal_class.original_string: private final DataOutputSerializer serializationBuffer;
focal_class.type: DataOutputSerializer
focal_class.var_name: serializationBuffer
focal_class.declarator: dataBuffer
focal_class.modifier: private
focal_class.original_string: private ByteBuffer dataBuffer;
focal_class.type: ByteBuffer
focal_class.var_name: dataBuffer
focal_class.declarator: lengthBuffer
focal_class.modifier: private final
focal_class.original_string: private final ByteBuffer lengthBuffer;
focal_class.type: ByteBuffer
focal_class.var_name: lengthBuffer
focal_class.declarator: targetBuffer
focal_class.modifier: private
focal_class.original_string: private Buffer targetBuffer;
focal_class.type: Buffer
focal_class.var_name: targetBuffer
focal_class.declarator: position
focal_class.modifier: private
focal_class.original_string: private int position;
focal_class.type: int
focal_class.var_name: position
focal_class.declarator: limit
focal_class.modifier: private
focal_class.original_string: private int limit;
focal_class.type: int
focal_class.var_name: limit
focal_class.declarator: reporter
focal_class.modifier: private
focal_class.original_string: private AccumulatorRegistry.Reporter reporter;
focal_class.type: AccumulatorRegistry.Reporter
focal_class.var_name: reporter
focal_class.file: flink-runtime/src/main/java/org/apache/flink/runtime/io/network/api/serialization/SpanningRecordSerializer.java
focal_class.identifier: SpanningRecordSerializer
focal_class.interfaces: implements RecordSerializer<T>
focal_class.class_method_signature: SpanningRecordSerializer.SpanningRecordSerializer()
focal_class.full_signature: public  SpanningRecordSerializer()
focal_class.identifier: SpanningRecordSerializer
focal_class.modifiers: public
focal_class.parameters: ()
focal_class.signature:  SpanningRecordSerializer()
focal_class.class_method_signature: SpanningRecordSerializer.addRecord(T record)
focal_class.full_signature: @Override public SerializationResult addRecord(T record)
focal_class.identifier: addRecord
focal_class.modifiers: @Override public
focal_class.parameters: (T record)
focal_class.return: SerializationResult
focal_class.signature: SerializationResult addRecord(T record)
focal_class.class_method_signature: SpanningRecordSerializer.setNextBuffer(Buffer buffer)
focal_class.full_signature: @Override public SerializationResult setNextBuffer(Buffer buffer)
focal_class.identifier: setNextBuffer
focal_class.modifiers: @Override public
focal_class.parameters: (Buffer buffer)
focal_class.return: SerializationResult
focal_class.signature: SerializationResult setNextBuffer(Buffer buffer)
focal_class.class_method_signature: SpanningRecordSerializer.copyToTargetBufferFrom(ByteBuffer source)
focal_class.full_signature: private void copyToTargetBufferFrom(ByteBuffer source)
focal_class.identifier: copyToTargetBufferFrom
focal_class.modifiers: private
focal_class.parameters: (ByteBuffer source)
focal_class.return: void
focal_class.signature: void copyToTargetBufferFrom(ByteBuffer source)
focal_class.class_method_signature: SpanningRecordSerializer.getSerializationResult()
focal_class.full_signature: private SerializationResult getSerializationResult()
focal_class.identifier: getSerializationResult
focal_class.modifiers: private
focal_class.parameters: ()
focal_class.return: SerializationResult
focal_class.signature: SerializationResult getSerializationResult()
focal_class.class_method_signature: SpanningRecordSerializer.getCurrentBuffer()
focal_class.full_signature: @Override public Buffer getCurrentBuffer()
focal_class.identifier: getCurrentBuffer
focal_class.modifiers: @Override public
focal_class.parameters: ()
focal_class.return: Buffer
focal_class.signature: Buffer getCurrentBuffer()
focal_class.class_method_signature: SpanningRecordSerializer.clearCurrentBuffer()
focal_class.full_signature: @Override public void clearCurrentBuffer()
focal_class.identifier: clearCurrentBuffer
focal_class.modifiers: @Override public
focal_class.parameters: ()
focal_class.return: void
focal_class.signature: void clearCurrentBuffer()
focal_class.class_method_signature: SpanningRecordSerializer.clear()
focal_class.full_signature: @Override public void clear()
focal_class.identifier: clear
focal_class.modifiers: @Override public
focal_class.parameters: ()
focal_class.return: void
focal_class.signature: void clear()
focal_class.class_method_signature: SpanningRecordSerializer.hasData()
focal_class.full_signature: @Override public boolean hasData()
focal_class.identifier: hasData
focal_class.modifiers: @Override public
focal_class.parameters: ()
focal_class.return: boolean
focal_class.signature: boolean hasData()
focal_class.class_method_signature: SpanningRecordSerializer.setReporter(AccumulatorRegistry.Reporter reporter)
focal_class.full_signature: @Override public void setReporter(AccumulatorRegistry.Reporter reporter)
focal_class.identifier: setReporter
focal_class.modifiers: @Override public
focal_class.parameters: (AccumulatorRegistry.Reporter reporter)
focal_class.return: void
focal_class.signature: void setReporter(AccumulatorRegistry.Reporter reporter)
focal_method.body: @Override
  	public boolean hasData() {
  		// either data in current target buffer or intermediate buffers
  		return this.position > 0 || (this.lengthBuffer.hasRemaining() || this.dataBuffer.hasRemaining());
  	}
focal_method.class_method_signature: SpanningRecordSerializer.hasData()
focal_method.full_signature: @Override public boolean hasData()
focal_method.identifier: hasData
focal_method.invocations: hasRemaining hasRemaining
focal_method.modifiers: @Override public
focal_method.parameters: ()
focal_method.return: boolean
focal_method.signature: boolean hasData()