test_class.declarator: SEED = 354144423270432543L
test_class.modifier: private static final
test_class.original_string: private static final long SEED = 354144423270432543L;
test_class.type: long
test_class.var_name: SEED
test_class.declarator: rand = new Random(RecordTest.SEED)
test_class.modifier: private final
test_class.original_string: private final Random rand = new Random(RecordTest.SEED);
test_class.type: Random
test_class.var_name: rand
test_class.declarator: in
test_class.modifier: private
test_class.original_string: private DataInputView in;
test_class.type: DataInputView
test_class.var_name: in
test_class.declarator: out
test_class.modifier: private
test_class.original_string: private DataOutputView out;
test_class.type: DataOutputView
test_class.var_name: out
test_class.declarator: origVal1 = new StringValue("Hello World!")
test_class.modifier: private final
test_class.original_string: private final StringValue origVal1 = new StringValue("Hello World!");
test_class.type: StringValue
test_class.var_name: origVal1
test_class.declarator: origVal2 = new DoubleValue(Math.PI)
test_class.modifier: private final
test_class.original_string: private final DoubleValue origVal2 = new DoubleValue(Math.PI);
test_class.type: DoubleValue
test_class.var_name: origVal2
test_class.declarator: origVal3 = new IntValue(1337)
test_class.modifier: private final
test_class.original_string: private final IntValue origVal3 = new IntValue(1337);
test_class.type: IntValue
test_class.var_name: origVal3
test_class.file: flink-core/src/test/java/org/apache/flink/types/RecordTest.java
test_class.identifier: RecordTest
test_case.body: @Test
  	public void testAddField() {
  		try {
  			// Add a value to an empty record
  			Record record = new Record();
  			assertTrue(record.getNumFields() == 0);
  			record.addField(this.origVal1);
  			assertTrue(record.getNumFields() == 1);
  			assertTrue(origVal1.getValue().equals(record.getField(0, StringValue.class).getValue()));
  			
  			// Add 100 random integers to the record
  			record = new Record();
  			for (int i = 0; i < 100; i++) {
  				IntValue orig = new IntValue(this.rand.nextInt());
  				record.addField(orig);
  				IntValue rec = record.getField(i, IntValue.class);
  				
  				assertTrue(record.getNumFields() == i + 1);
  				assertTrue(orig.getValue() == rec.getValue());
  			}
  			
  			// Add 3 values of different type to the record
  			record = new Record(this.origVal1, this.origVal2);
  			record.addField(this.origVal3);
  			
  			assertTrue(record.getNumFields() == 3);
  			
  			StringValue recVal1 = record.getField(0, StringValue.class);
  			DoubleValue recVal2 = record.getField(1, DoubleValue.class);
  			IntValue recVal3 = record.getField(2, IntValue.class);
  			
  			assertTrue("The value of the first field has changed", recVal1.equals(this.origVal1));
  			assertTrue("The value of the second field changed", recVal2.equals(this.origVal2));
  			assertTrue("The value of the third field has changed", recVal3.equals(this.origVal3));
  		} catch (Throwable t) {
  			Assert.fail("Test failed due to an exception: " + t.getMessage());
  		}
  	}
test_case.class_method_signature: RecordTest.testAddField()
test_case.full_signature: @Test public void testAddField()
test_case.identifier: testAddField
test_case.invocations: assertTrue getNumFields addField assertTrue getNumFields assertTrue equals getValue getValue getField nextInt addField getField assertTrue getNumFields assertTrue getValue getValue addField assertTrue getNumFields getField getField getField assertTrue equals assertTrue equals assertTrue equals fail getMessage
test_case.modifiers: @Test public
test_case.parameters: ()
test_case.return: void
test_case.signature: void testAddField()
focal_class.declarator: serialVersionUID = 1L
focal_class.modifier: private static final
focal_class.original_string: private static final long serialVersionUID = 1L;
focal_class.type: long
focal_class.var_name: serialVersionUID
focal_class.declarator: NULL_INDICATOR_OFFSET = Integer.MIN_VALUE
focal_class.modifier: private static final
focal_class.original_string: private static final int NULL_INDICATOR_OFFSET = Integer.MIN_VALUE;
focal_class.type: int
focal_class.var_name: NULL_INDICATOR_OFFSET
focal_class.declarator: MODIFIED_INDICATOR_OFFSET = Integer.MIN_VALUE + 1
focal_class.modifier: private static final
focal_class.original_string: private static final int MODIFIED_INDICATOR_OFFSET = Integer.MIN_VALUE + 1;
focal_class.type: int
focal_class.var_name: MODIFIED_INDICATOR_OFFSET
focal_class.declarator: DEFAULT_FIELD_LEN_ESTIMATE = 8
focal_class.modifier: private static final
focal_class.original_string: private static final int DEFAULT_FIELD_LEN_ESTIMATE = 8;
focal_class.type: int
focal_class.var_name: DEFAULT_FIELD_LEN_ESTIMATE
focal_class.declarator: serializer = new InternalDeSerializer()
focal_class.modifier: private final
focal_class.original_string: private final InternalDeSerializer serializer = new InternalDeSerializer();
focal_class.type: InternalDeSerializer
focal_class.var_name: serializer
focal_class.declarator: binaryData
focal_class.modifier: private
focal_class.original_string: private byte[] binaryData;
focal_class.type: byte[]
focal_class.var_name: binaryData
focal_class.declarator: switchBuffer
focal_class.modifier: private
focal_class.original_string: private byte[] switchBuffer;
focal_class.type: byte[]
focal_class.var_name: switchBuffer
focal_class.declarator: offsets
focal_class.modifier: private
focal_class.original_string: private int[] offsets;
focal_class.type: int[]
focal_class.var_name: offsets
focal_class.declarator: lengths
focal_class.modifier: private
focal_class.original_string: private int[] lengths;
focal_class.type: int[]
focal_class.var_name: lengths
focal_class.declarator: readFields
focal_class.modifier: private
focal_class.original_string: private Value[] readFields;
focal_class.type: Value[]
focal_class.var_name: readFields
focal_class.declarator: writeFields
focal_class.modifier: private
focal_class.original_string: private Value[] writeFields;
focal_class.type: Value[]
focal_class.var_name: writeFields
focal_class.declarator: binaryLen
focal_class.modifier: private
focal_class.original_string: private int binaryLen;
focal_class.type: int
focal_class.var_name: binaryLen
focal_class.declarator: numFields
focal_class.modifier: private
focal_class.original_string: private int numFields;
focal_class.type: int
focal_class.var_name: numFields
focal_class.declarator: firstModifiedPos
focal_class.modifier: private
focal_class.original_string: private int firstModifiedPos;
focal_class.type: int
focal_class.var_name: firstModifiedPos
focal_class.declarator: MAX_BIT = 0x1 << 7
focal_class.modifier: private static final
focal_class.original_string: private static final int MAX_BIT = 0x1 << 7;
focal_class.type: int
focal_class.var_name: MAX_BIT
focal_class.declarator: RESERVE_SPACE = new Value() {
  		private static final long serialVersionUID = 1L;
  
  		@Override
  		public void write(DataOutputView out) throws IOException {
  			throw new UnsupportedOperationException();
  		}
  
  		@Override
  		public void read(DataInputView in) throws IOException {
  			throw new UnsupportedOperationException();
  		}		
  	}
focal_class.modifier: private static final
focal_class.original_string: private static final Value RESERVE_SPACE = new Value() {
  		private static final long serialVersionUID = 1L;
  
  		@Override
  		public void write(DataOutputView out) throws IOException {
  			throw new UnsupportedOperationException();
  		}
  
  		@Override
  		public void read(DataInputView in) throws IOException {
  			throw new UnsupportedOperationException();
  		}		
  	};
focal_class.type: Value
focal_class.var_name: RESERVE_SPACE
focal_class.file: flink-core/src/main/java/org/apache/flink/types/Record.java
focal_class.identifier: Record
focal_class.interfaces: implements Value, CopyableValue<Record>
focal_class.class_method_signature: Record.Record()
focal_class.full_signature: public  Record()
focal_class.identifier: Record
focal_class.modifiers: public
focal_class.parameters: ()
focal_class.signature:  Record()
focal_class.class_method_signature: Record.Record(Value value)
focal_class.full_signature: public  Record(Value value)
focal_class.identifier: Record
focal_class.modifiers: public
focal_class.parameters: (Value value)
focal_class.signature:  Record(Value value)
focal_class.class_method_signature: Record.Record(Value val1, Value val2)
focal_class.full_signature: public  Record(Value val1, Value val2)
focal_class.identifier: Record
focal_class.modifiers: public
focal_class.parameters: (Value val1, Value val2)
focal_class.signature:  Record(Value val1, Value val2)
focal_class.class_method_signature: Record.Record(int numFields)
focal_class.full_signature: public  Record(int numFields)
focal_class.identifier: Record
focal_class.modifiers: public
focal_class.parameters: (int numFields)
focal_class.signature:  Record(int numFields)
focal_class.class_method_signature: Record.getNumFields()
focal_class.full_signature: public int getNumFields()
focal_class.identifier: getNumFields
focal_class.modifiers: public
focal_class.parameters: ()
focal_class.return: int
focal_class.signature: int getNumFields()
focal_class.class_method_signature: Record.setNumFields(final int numFields)
focal_class.full_signature: public void setNumFields(final int numFields)
focal_class.identifier: setNumFields
focal_class.modifiers: public
focal_class.parameters: (final int numFields)
focal_class.return: void
focal_class.signature: void setNumFields(final int numFields)
focal_class.class_method_signature: Record.makeSpace(int numFields)
focal_class.full_signature: public void makeSpace(int numFields)
focal_class.identifier: makeSpace
focal_class.modifiers: public
focal_class.parameters: (int numFields)
focal_class.return: void
focal_class.signature: void makeSpace(int numFields)
focal_class.class_method_signature: Record.getField(final int fieldNum, final Class<T> type)
focal_class.full_signature: @SuppressWarnings("unchecked") public T getField(final int fieldNum, final Class<T> type)
focal_class.identifier: getField
focal_class.modifiers: @SuppressWarnings("unchecked") public
focal_class.parameters: (final int fieldNum, final Class<T> type)
focal_class.return: T
focal_class.signature: T getField(final int fieldNum, final Class<T> type)
focal_class.class_method_signature: Record.getField(int fieldNum, T target)
focal_class.full_signature: @SuppressWarnings("unchecked") public T getField(int fieldNum, T target)
focal_class.identifier: getField
focal_class.modifiers: @SuppressWarnings("unchecked") public
focal_class.parameters: (int fieldNum, T target)
focal_class.return: T
focal_class.signature: T getField(int fieldNum, T target)
focal_class.class_method_signature: Record.getFieldInto(int fieldNum, Value target)
focal_class.full_signature: public boolean getFieldInto(int fieldNum, Value target)
focal_class.identifier: getFieldInto
focal_class.modifiers: public
focal_class.parameters: (int fieldNum, Value target)
focal_class.return: boolean
focal_class.signature: boolean getFieldInto(int fieldNum, Value target)
focal_class.class_method_signature: Record.getFieldsInto(int[] positions, Value[] targets)
focal_class.full_signature: public boolean getFieldsInto(int[] positions, Value[] targets)
focal_class.identifier: getFieldsInto
focal_class.modifiers: public
focal_class.parameters: (int[] positions, Value[] targets)
focal_class.return: boolean
focal_class.signature: boolean getFieldsInto(int[] positions, Value[] targets)
focal_class.class_method_signature: Record.getFieldsIntoCheckingNull(int[] positions, Value[] targets)
focal_class.full_signature: public void getFieldsIntoCheckingNull(int[] positions, Value[] targets)
focal_class.identifier: getFieldsIntoCheckingNull
focal_class.modifiers: public
focal_class.parameters: (int[] positions, Value[] targets)
focal_class.return: void
focal_class.signature: void getFieldsIntoCheckingNull(int[] positions, Value[] targets)
focal_class.class_method_signature: Record.deserialize(T target, int offset, int limit, int fieldNumber)
focal_class.full_signature: private void deserialize(T target, int offset, int limit, int fieldNumber)
focal_class.identifier: deserialize
focal_class.modifiers: private
focal_class.parameters: (T target, int offset, int limit, int fieldNumber)
focal_class.return: void
focal_class.signature: void deserialize(T target, int offset, int limit, int fieldNumber)
focal_class.class_method_signature: Record.setField(int fieldNum, Value value)
focal_class.full_signature: public void setField(int fieldNum, Value value)
focal_class.identifier: setField
focal_class.modifiers: public
focal_class.parameters: (int fieldNum, Value value)
focal_class.return: void
focal_class.signature: void setField(int fieldNum, Value value)
focal_class.class_method_signature: Record.addField(Value value)
focal_class.full_signature: public void addField(Value value)
focal_class.identifier: addField
focal_class.modifiers: public
focal_class.parameters: (Value value)
focal_class.return: void
focal_class.signature: void addField(Value value)
focal_class.class_method_signature: Record.internallySetField(int fieldNum, Value value)
focal_class.full_signature: private void internallySetField(int fieldNum, Value value)
focal_class.identifier: internallySetField
focal_class.modifiers: private
focal_class.parameters: (int fieldNum, Value value)
focal_class.return: void
focal_class.signature: void internallySetField(int fieldNum, Value value)
focal_class.class_method_signature: Record.markModified(int field)
focal_class.full_signature: private void markModified(int field)
focal_class.identifier: markModified
focal_class.modifiers: private
focal_class.parameters: (int field)
focal_class.return: void
focal_class.signature: void markModified(int field)
focal_class.class_method_signature: Record.isModified()
focal_class.full_signature: private boolean isModified()
focal_class.identifier: isModified
focal_class.modifiers: private
focal_class.parameters: ()
focal_class.return: boolean
focal_class.signature: boolean isModified()
focal_class.class_method_signature: Record.removeField(int fieldNum)
focal_class.full_signature: public void removeField(int fieldNum)
focal_class.identifier: removeField
focal_class.modifiers: public
focal_class.parameters: (int fieldNum)
focal_class.return: void
focal_class.signature: void removeField(int fieldNum)
focal_class.class_method_signature: Record.isNull(int fieldNum)
focal_class.full_signature: public final boolean isNull(int fieldNum)
focal_class.identifier: isNull
focal_class.modifiers: public final
focal_class.parameters: (int fieldNum)
focal_class.return: boolean
focal_class.signature: boolean isNull(int fieldNum)
focal_class.class_method_signature: Record.setNull(int field)
focal_class.full_signature: public void setNull(int field)
focal_class.identifier: setNull
focal_class.modifiers: public
focal_class.parameters: (int field)
focal_class.return: void
focal_class.signature: void setNull(int field)
focal_class.class_method_signature: Record.setNull(long mask)
focal_class.full_signature: public void setNull(long mask)
focal_class.identifier: setNull
focal_class.modifiers: public
focal_class.parameters: (long mask)
focal_class.return: void
focal_class.signature: void setNull(long mask)
focal_class.class_method_signature: Record.setNull(long[] mask)
focal_class.full_signature: public void setNull(long[] mask)
focal_class.identifier: setNull
focal_class.modifiers: public
focal_class.parameters: (long[] mask)
focal_class.return: void
focal_class.signature: void setNull(long[] mask)
focal_class.class_method_signature: Record.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: Record.concatenate(Record record)
focal_class.full_signature: public void concatenate(Record record)
focal_class.identifier: concatenate
focal_class.modifiers: public
focal_class.parameters: (Record record)
focal_class.return: void
focal_class.signature: void concatenate(Record record)
focal_class.class_method_signature: Record.unionFields(Record other)
focal_class.full_signature: public void unionFields(Record other)
focal_class.identifier: unionFields
focal_class.modifiers: public
focal_class.parameters: (Record other)
focal_class.return: void
focal_class.signature: void unionFields(Record other)
focal_class.class_method_signature: Record.copyTo(Record target)
focal_class.full_signature: public void copyTo(Record target)
focal_class.identifier: copyTo
focal_class.modifiers: public
focal_class.parameters: (Record target)
focal_class.return: void
focal_class.signature: void copyTo(Record target)
focal_class.class_method_signature: Record.getBinaryLength()
focal_class.full_signature: @Override public int getBinaryLength()
focal_class.identifier: getBinaryLength
focal_class.modifiers: @Override public
focal_class.parameters: ()
focal_class.return: int
focal_class.signature: int getBinaryLength()
focal_class.class_method_signature: Record.copy()
focal_class.full_signature: @Override public Record copy()
focal_class.identifier: copy
focal_class.modifiers: @Override public
focal_class.parameters: ()
focal_class.return: Record
focal_class.signature: Record copy()
focal_class.class_method_signature: Record.copy(DataInputView source, DataOutputView target)
focal_class.full_signature: @Override public void copy(DataInputView source, DataOutputView target)
focal_class.identifier: copy
focal_class.modifiers: @Override public
focal_class.parameters: (DataInputView source, DataOutputView target)
focal_class.return: void
focal_class.signature: void copy(DataInputView source, DataOutputView target)
focal_class.class_method_signature: Record.createCopy()
focal_class.full_signature: public Record createCopy()
focal_class.identifier: createCopy
focal_class.modifiers: public
focal_class.parameters: ()
focal_class.return: Record
focal_class.signature: Record createCopy()
focal_class.class_method_signature: Record.copyFrom(final Record source, final int[] sourcePositions, final int[] targetPositions)
focal_class.full_signature: public void copyFrom(final Record source, final int[] sourcePositions, final int[] targetPositions)
focal_class.identifier: copyFrom
focal_class.modifiers: public
focal_class.parameters: (final Record source, final int[] sourcePositions, final int[] targetPositions)
focal_class.return: void
focal_class.signature: void copyFrom(final Record source, final int[] sourcePositions, final int[] targetPositions)
focal_class.class_method_signature: Record.equalsFields(int[] positions, Value[] searchValues, Value[] deserializationHolders)
focal_class.full_signature: public final boolean equalsFields(int[] positions, Value[] searchValues, Value[] deserializationHolders)
focal_class.identifier: equalsFields
focal_class.modifiers: public final
focal_class.parameters: (int[] positions, Value[] searchValues, Value[] deserializationHolders)
focal_class.return: boolean
focal_class.signature: boolean equalsFields(int[] positions, Value[] searchValues, Value[] deserializationHolders)
focal_class.class_method_signature: Record.updateBinaryRepresenation()
focal_class.full_signature: public void updateBinaryRepresenation()
focal_class.identifier: updateBinaryRepresenation
focal_class.modifiers: public
focal_class.parameters: ()
focal_class.return: void
focal_class.signature: void updateBinaryRepresenation()
focal_class.class_method_signature: Record.serializeHeader(final InternalDeSerializer serializer, final int[] offsets, final int numFields)
focal_class.full_signature: private void serializeHeader(final InternalDeSerializer serializer, final int[] offsets, final int numFields)
focal_class.identifier: serializeHeader
focal_class.modifiers: private
focal_class.parameters: (final InternalDeSerializer serializer, final int[] offsets, final int numFields)
focal_class.return: void
focal_class.signature: void serializeHeader(final InternalDeSerializer serializer, final int[] offsets, final int numFields)
focal_class.class_method_signature: Record.write(DataOutputView out)
focal_class.full_signature: @Override public void write(DataOutputView out)
focal_class.identifier: write
focal_class.modifiers: @Override public
focal_class.parameters: (DataOutputView out)
focal_class.return: void
focal_class.signature: void write(DataOutputView out)
focal_class.class_method_signature: Record.read(DataInputView in)
focal_class.full_signature: @Override public void read(DataInputView in)
focal_class.identifier: read
focal_class.modifiers: @Override public
focal_class.parameters: (DataInputView in)
focal_class.return: void
focal_class.signature: void read(DataInputView in)
focal_class.class_method_signature: Record.initFields(final byte[] data, final int begin, final int len)
focal_class.full_signature: private void initFields(final byte[] data, final int begin, final int len)
focal_class.identifier: initFields
focal_class.modifiers: private
focal_class.parameters: (final byte[] data, final int begin, final int len)
focal_class.return: void
focal_class.signature: void initFields(final byte[] data, final int begin, final int len)
focal_class.class_method_signature: Record.serialize(DataOutputView target)
focal_class.full_signature: public long serialize(DataOutputView target)
focal_class.identifier: serialize
focal_class.modifiers: public
focal_class.parameters: (DataOutputView target)
focal_class.return: long
focal_class.signature: long serialize(DataOutputView target)
focal_class.class_method_signature: Record.deserialize(DataInputView source)
focal_class.full_signature: public void deserialize(DataInputView source)
focal_class.identifier: deserialize
focal_class.modifiers: public
focal_class.parameters: (DataInputView source)
focal_class.return: void
focal_class.signature: void deserialize(DataInputView source)
focal_class.class_method_signature: Record.writeVarLengthInt(DataOutput out, int value)
focal_class.full_signature: private static final void writeVarLengthInt(DataOutput out, int value)
focal_class.identifier: writeVarLengthInt
focal_class.modifiers: private static final
focal_class.parameters: (DataOutput out, int value)
focal_class.return: void
focal_class.signature: void writeVarLengthInt(DataOutput out, int value)
focal_class.class_method_signature: Record.readVarLengthInt(DataInput in)
focal_class.full_signature: private static final int readVarLengthInt(DataInput in)
focal_class.identifier: readVarLengthInt
focal_class.modifiers: private static final
focal_class.parameters: (DataInput in)
focal_class.return: int
focal_class.signature: int readVarLengthInt(DataInput in)
focal_method.body: public void addField(Value value) {
  		final int num = this.numFields;
  		setNumFields(num + 1);
  		internallySetField(num, value);
  	}
focal_method.class_method_signature: Record.addField(Value value)
focal_method.full_signature: public void addField(Value value)
focal_method.identifier: addField
focal_method.invocations: setNumFields internallySetField
focal_method.modifiers: public
focal_method.parameters: (Value value)
focal_method.return: void
focal_method.signature: void addField(Value value)