test_class.file: storm/trident-ml/src/test/java/com/github/pmerienne/trident/ml/preprocessing/InstanceCreatorTest.java
test_class.identifier: InstanceCreatorTest
test_case.body: @Test
  	public void testCreateInstanceWithoutLabel() {
  		// Given
  		InstanceCreator<Boolean> instanceCreator = new InstanceCreator<Boolean>(false);
  
  		TridentTuple tuple = mock(TridentTuple.class);
  		double f1 = 0.53;
  		double f2 = 0.65;
  		when(tuple.size()).thenReturn(2);
  		when(tuple.getDouble(0)).thenReturn(f1);
  		when(tuple.getDouble(1)).thenReturn(f2);
  
  		// When
  		Instance<Boolean> actualInstance = instanceCreator.createInstance(tuple);
  
  		// Then
  		Instance<Boolean> expectedInstance = new Instance<Boolean>(new double[] { f1, f2 });
  		assertEquals(expectedInstance, actualInstance);
  	}
test_case.class_method_signature: InstanceCreatorTest.testCreateInstanceWithoutLabel()
test_case.full_signature: @Test public void testCreateInstanceWithoutLabel()
test_case.identifier: testCreateInstanceWithoutLabel
test_case.invocations: mock thenReturn when size thenReturn when getDouble thenReturn when getDouble createInstance assertEquals
test_case.modifiers: @Test public
test_case.parameters: ()
test_case.return: void
test_case.signature: void testCreateInstanceWithoutLabel()
focal_class.declarator: serialVersionUID = 3312351524410720639L
focal_class.modifier: private static final
focal_class.original_string: private static final long serialVersionUID = 3312351524410720639L;
focal_class.type: long
focal_class.var_name: serialVersionUID
focal_class.declarator: withLabel = true
focal_class.modifier: private
focal_class.original_string: private boolean withLabel = true;
focal_class.type: boolean
focal_class.var_name: withLabel
focal_class.file: storm/trident-ml/src/main/java/com/github/pmerienne/trident/ml/preprocessing/InstanceCreator.java
focal_class.identifier: InstanceCreator
focal_class.class_method_signature: InstanceCreator.InstanceCreator()
focal_class.full_signature: public  InstanceCreator()
focal_class.identifier: InstanceCreator
focal_class.modifiers: public
focal_class.parameters: ()
focal_class.signature:  InstanceCreator()
focal_class.class_method_signature: InstanceCreator.InstanceCreator(boolean withLabel)
focal_class.full_signature: public  InstanceCreator(boolean withLabel)
focal_class.identifier: InstanceCreator
focal_class.modifiers: public
focal_class.parameters: (boolean withLabel)
focal_class.signature:  InstanceCreator(boolean withLabel)
focal_class.class_method_signature: InstanceCreator.execute(TridentTuple tuple, TridentCollector collector)
focal_class.full_signature: @Override public void execute(TridentTuple tuple, TridentCollector collector)
focal_class.identifier: execute
focal_class.modifiers: @Override public
focal_class.parameters: (TridentTuple tuple, TridentCollector collector)
focal_class.return: void
focal_class.signature: void execute(TridentTuple tuple, TridentCollector collector)
focal_class.class_method_signature: InstanceCreator.createInstance(TridentTuple tuple)
focal_class.full_signature: @SuppressWarnings("unchecked") protected Instance<L> createInstance(TridentTuple tuple)
focal_class.identifier: createInstance
focal_class.modifiers: @SuppressWarnings("unchecked") protected
focal_class.parameters: (TridentTuple tuple)
focal_class.return: Instance<L>
focal_class.signature: Instance<L> createInstance(TridentTuple tuple)
focal_class.superclass: extends BaseFunction
focal_method.body: @SuppressWarnings("unchecked")
  	protected Instance<L> createInstance(TridentTuple tuple) {
  		Instance<L> instance = null;
  
  		if (this.withLabel) {
  			L label = (L) tuple.get(0);
  			double[] features = new double[tuple.size() - 1];
  			for (int i = 1; i < tuple.size(); i++) {
  				features[i - 1] = tuple.getDouble(i);
  			}
  
  			instance = new Instance<L>(label, features);
  		} else {
  			double[] features = new double[tuple.size()];
  			for (int i = 0; i < tuple.size(); i++) {
  				features[i] = tuple.getDouble(i);
  			}
  
  			instance = new Instance<L>(features);
  		}
  
  		return instance;
  	}
focal_method.class_method_signature: InstanceCreator.createInstance(TridentTuple tuple)
focal_method.full_signature: @SuppressWarnings("unchecked") protected Instance<L> createInstance(TridentTuple tuple)
focal_method.identifier: createInstance
focal_method.invocations: get size size getDouble size size getDouble
focal_method.modifiers: @SuppressWarnings("unchecked") protected
focal_method.parameters: (TridentTuple tuple)
focal_method.return: Instance<L>
focal_method.signature: Instance<L> createInstance(TridentTuple tuple)