test_class.file: flink-runtime/src/test/java/org/apache/flink/runtime/iterative/concurrent/SuperstepKickoffLatchTest.java
test_class.identifier: SuperstepKickoffLatchTest
test_case.body: @Test
  	public void testWaitIncorrectAsync() {
  		try {
  			SuperstepKickoffLatch latch = new SuperstepKickoffLatch();
  			latch.triggerNextSuperstep();
  			latch.triggerNextSuperstep();
  			
  			Waiter w = new Waiter(latch, 2);
  			Thread waiter = new Thread(w);
  			waiter.setDaemon(true);
  			waiter.start();
  			
  			WatchDog wd = new WatchDog(waiter, 2000);
  			wd.start();
  			
  			Thread.sleep(100);
  			
  			wd.join();
  			if (wd.getError() != null) {
  				throw wd.getError();
  			}
  			
  			if (w.getError() != null) {
  				if (!(w.getError() instanceof IllegalStateException)) {
  					throw new Exception("wrong exception type " + w.getError());
  				}
  			} else {
  				Assert.fail("should cause exception");
  			}
  		}
  		catch (Throwable t) {
  			t.printStackTrace();
  			Assert.fail("Error: " + t.getMessage());
  		}
  	}
test_case.class_method_signature: SuperstepKickoffLatchTest.testWaitIncorrectAsync()
test_case.full_signature: @Test public void testWaitIncorrectAsync()
test_case.identifier: testWaitIncorrectAsync
test_case.invocations: triggerNextSuperstep triggerNextSuperstep setDaemon start start sleep join getError getError getError getError getError fail printStackTrace fail getMessage
test_case.modifiers: @Test public
test_case.parameters: ()
test_case.return: void
test_case.signature: void testWaitIncorrectAsync()
focal_class.declarator: monitor = new Object()
focal_class.modifier: private final
focal_class.original_string: private final Object monitor = new Object();
focal_class.type: Object
focal_class.var_name: monitor
focal_class.declarator: superstepNumber = 1
focal_class.modifier: private
focal_class.original_string: private int superstepNumber = 1;
focal_class.type: int
focal_class.var_name: superstepNumber
focal_class.declarator: terminated
focal_class.modifier: private
focal_class.original_string: private boolean terminated;
focal_class.type: boolean
focal_class.var_name: terminated
focal_class.file: flink-runtime/src/main/java/org/apache/flink/runtime/iterative/concurrent/SuperstepKickoffLatch.java
focal_class.identifier: SuperstepKickoffLatch
focal_class.class_method_signature: SuperstepKickoffLatch.triggerNextSuperstep()
focal_class.full_signature: public void triggerNextSuperstep()
focal_class.identifier: triggerNextSuperstep
focal_class.modifiers: public
focal_class.parameters: ()
focal_class.return: void
focal_class.signature: void triggerNextSuperstep()
focal_class.class_method_signature: SuperstepKickoffLatch.signalTermination()
focal_class.full_signature: public void signalTermination()
focal_class.identifier: signalTermination
focal_class.modifiers: public
focal_class.parameters: ()
focal_class.return: void
focal_class.signature: void signalTermination()
focal_class.class_method_signature: SuperstepKickoffLatch.awaitStartOfSuperstepOrTermination(int superstep)
focal_class.full_signature: public boolean awaitStartOfSuperstepOrTermination(int superstep)
focal_class.identifier: awaitStartOfSuperstepOrTermination
focal_class.modifiers: public
focal_class.parameters: (int superstep)
focal_class.return: boolean
focal_class.signature: boolean awaitStartOfSuperstepOrTermination(int superstep)
focal_method.body: public void triggerNextSuperstep() {
  		synchronized (monitor) {
  			if (terminated) {
  				throw new IllegalStateException("Already terminated.");
  			}
  			superstepNumber++;
  			monitor.notifyAll();
  		}
  	}
focal_method.class_method_signature: SuperstepKickoffLatch.triggerNextSuperstep()
focal_method.full_signature: public void triggerNextSuperstep()
focal_method.identifier: triggerNextSuperstep
focal_method.invocations: notifyAll
focal_method.modifiers: public
focal_method.parameters: ()
focal_method.return: void
focal_method.signature: void triggerNextSuperstep()