test_class.file: flink-streaming-java/src/test/java/org/apache/flink/streaming/runtime/operators/TimestampsAndPunctuatedWatermarksOperatorTest.java
test_class.identifier: TimestampsAndPunctuatedWatermarksOperatorTest
test_case.body: @Test
  	public void testZeroOnNegativeTimestamps() throws Exception {
  
  		final AssignerWithPunctuatedWatermarks<Long> assigner = new NeverWatermarkExtractor();
  
  		final TimestampsAndPunctuatedWatermarksOperator<Long> operator =
  				new TimestampsAndPunctuatedWatermarksOperator<Long>(assigner);
  
  		OneInputStreamOperatorTestHarness<Long, Long> testHarness =
  				new OneInputStreamOperatorTestHarness<Long, Long>(operator);
  
  		testHarness.open();
  
  		long[] values = { Long.MIN_VALUE, -1L, 0L, 1L, 2L, 3L, Long.MAX_VALUE };
  
  		for (long value : values) {
  			testHarness.processElement(new StreamRecord<>(value));
  		}
  
  		ConcurrentLinkedQueue<Object> output = testHarness.getOutput();
  
  		for (long value: values) {
  			assertEquals(value, ((StreamRecord<?>) output.poll()).getTimestamp());
  		}
  	}
test_case.class_method_signature: TimestampsAndPunctuatedWatermarksOperatorTest.testZeroOnNegativeTimestamps()
test_case.full_signature: @Test public void testZeroOnNegativeTimestamps()
test_case.identifier: testZeroOnNegativeTimestamps
test_case.invocations: open processElement getOutput assertEquals getTimestamp poll
test_case.modifiers: @Test public
test_case.parameters: ()
test_case.return: void
test_case.signature: void testZeroOnNegativeTimestamps()
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: currentWatermark = Long.MIN_VALUE
focal_class.modifier: private
focal_class.original_string: private long currentWatermark = Long.MIN_VALUE;
focal_class.type: long
focal_class.var_name: currentWatermark
focal_class.file: flink-streaming-java/src/main/java/org/apache/flink/streaming/runtime/operators/TimestampsAndPunctuatedWatermarksOperator.java
focal_class.identifier: TimestampsAndPunctuatedWatermarksOperator
focal_class.interfaces: implements OneInputStreamOperator<T, T>
focal_class.class_method_signature: TimestampsAndPunctuatedWatermarksOperator.TimestampsAndPunctuatedWatermarksOperator(AssignerWithPunctuatedWatermarks<T> assigner)
focal_class.full_signature: public  TimestampsAndPunctuatedWatermarksOperator(AssignerWithPunctuatedWatermarks<T> assigner)
focal_class.identifier: TimestampsAndPunctuatedWatermarksOperator
focal_class.modifiers: public
focal_class.parameters: (AssignerWithPunctuatedWatermarks<T> assigner)
focal_class.signature:  TimestampsAndPunctuatedWatermarksOperator(AssignerWithPunctuatedWatermarks<T> assigner)
focal_class.class_method_signature: TimestampsAndPunctuatedWatermarksOperator.processElement(StreamRecord<T> element)
focal_class.full_signature: @Override public void processElement(StreamRecord<T> element)
focal_class.identifier: processElement
focal_class.modifiers: @Override public
focal_class.parameters: (StreamRecord<T> element)
focal_class.return: void
focal_class.signature: void processElement(StreamRecord<T> element)
focal_class.class_method_signature: TimestampsAndPunctuatedWatermarksOperator.processWatermark(Watermark mark)
focal_class.full_signature: @Override public void processWatermark(Watermark mark)
focal_class.identifier: processWatermark
focal_class.modifiers: @Override public
focal_class.parameters: (Watermark mark)
focal_class.return: void
focal_class.signature: void processWatermark(Watermark mark)
focal_class.superclass: extends AbstractUdfStreamOperator<T, AssignerWithPunctuatedWatermarks<T>>
focal_method.body: @Override
  	public void processElement(StreamRecord<T> element) throws Exception {
  		final T value = element.getValue();
  		final long newTimestamp = userFunction.extractTimestamp(value, 
  				element.hasTimestamp() ? element.getTimestamp() : Long.MIN_VALUE);
  
  		output.collect(element.replace(element.getValue(), newTimestamp));
  
  		final Watermark nextWatermark = userFunction.checkAndGetNextWatermark(value, newTimestamp);
  		if (nextWatermark != null && nextWatermark.getTimestamp() > currentWatermark) {
  			currentWatermark = nextWatermark.getTimestamp();
  			output.emitWatermark(nextWatermark);
  		}
  	}
focal_method.class_method_signature: TimestampsAndPunctuatedWatermarksOperator.processElement(StreamRecord<T> element)
focal_method.full_signature: @Override public void processElement(StreamRecord<T> element)
focal_method.identifier: processElement
focal_method.invocations: getValue extractTimestamp hasTimestamp getTimestamp collect replace getValue checkAndGetNextWatermark getTimestamp getTimestamp emitWatermark
focal_method.modifiers: @Override public
focal_method.parameters: (StreamRecord<T> element)
focal_method.return: void
focal_method.signature: void processElement(StreamRecord<T> element)