test_class.file: flink-runtime/src/test/java/org/apache/flink/runtime/instance/SimpleSlotTest.java
test_class.identifier: SimpleSlotTest
test_case.body: @Test
  	public void testStateTransitions() {
  		try {
  			// release immediately
  			{
  				SimpleSlot slot = getSlot();
  				assertTrue(slot.isAlive());
  
  				slot.releaseSlot();
  				assertFalse(slot.isAlive());
  				assertTrue(slot.isCanceled());
  				assertTrue(slot.isReleased());
  			}
  
  			// state transitions manually
  			{
  				SimpleSlot slot = getSlot();
  				assertTrue(slot.isAlive());
  
  				slot.markCancelled();
  				assertFalse(slot.isAlive());
  				assertTrue(slot.isCanceled());
  				assertFalse(slot.isReleased());
  
  				slot.markReleased();
  				assertFalse(slot.isAlive());
  				assertTrue(slot.isCanceled());
  				assertTrue(slot.isReleased());
  			}
  		}
  		catch (Exception e) {
  			e.printStackTrace();
  			fail(e.getMessage());
  		}
  	}
test_case.class_method_signature: SimpleSlotTest.testStateTransitions()
test_case.full_signature: @Test public void testStateTransitions()
test_case.identifier: testStateTransitions
test_case.invocations: getSlot assertTrue isAlive releaseSlot assertFalse isAlive assertTrue isCanceled assertTrue isReleased getSlot assertTrue isAlive markCancelled assertFalse isAlive assertTrue isCanceled assertFalse isReleased markReleased assertFalse isAlive assertTrue isCanceled assertTrue isReleased printStackTrace fail getMessage
test_case.modifiers: @Test public
test_case.parameters: ()
test_case.return: void
test_case.signature: void testStateTransitions()
focal_class.declarator: VERTEX_UPDATER =
  			AtomicReferenceFieldUpdater.newUpdater(SimpleSlot.class, Execution.class, "executedTask")
focal_class.modifier: private static final
focal_class.original_string: private static final AtomicReferenceFieldUpdater<SimpleSlot, Execution> VERTEX_UPDATER =
  			AtomicReferenceFieldUpdater.newUpdater(SimpleSlot.class, Execution.class, "executedTask");
focal_class.type: AtomicReferenceFieldUpdater<SimpleSlot, Execution>
focal_class.var_name: VERTEX_UPDATER
focal_class.declarator: executedTask
focal_class.modifier: private volatile
focal_class.original_string: private volatile Execution executedTask;
focal_class.type: Execution
focal_class.var_name: executedTask
focal_class.declarator: locality = Locality.UNCONSTRAINED
focal_class.modifier: private
focal_class.original_string: private Locality locality = Locality.UNCONSTRAINED;
focal_class.type: Locality
focal_class.var_name: locality
focal_class.file: flink-runtime/src/main/java/org/apache/flink/runtime/instance/SimpleSlot.java
focal_class.identifier: SimpleSlot
focal_class.class_method_signature: SimpleSlot.SimpleSlot(JobID jobID, Instance instance, int slotNumber)
focal_class.full_signature: public  SimpleSlot(JobID jobID, Instance instance, int slotNumber)
focal_class.identifier: SimpleSlot
focal_class.modifiers: public
focal_class.parameters: (JobID jobID, Instance instance, int slotNumber)
focal_class.signature:  SimpleSlot(JobID jobID, Instance instance, int slotNumber)
focal_class.class_method_signature: SimpleSlot.SimpleSlot(JobID jobID, Instance instance, int slotNumber, SharedSlot parent, AbstractID groupID)
focal_class.full_signature: public  SimpleSlot(JobID jobID, Instance instance, int slotNumber, SharedSlot parent, AbstractID groupID)
focal_class.identifier: SimpleSlot
focal_class.modifiers: public
focal_class.parameters: (JobID jobID, Instance instance, int slotNumber, SharedSlot parent, AbstractID groupID)
focal_class.signature:  SimpleSlot(JobID jobID, Instance instance, int slotNumber, SharedSlot parent, AbstractID groupID)
focal_class.class_method_signature: SimpleSlot.getNumberLeaves()
focal_class.full_signature: @Override public int getNumberLeaves()
focal_class.identifier: getNumberLeaves
focal_class.modifiers: @Override public
focal_class.parameters: ()
focal_class.return: int
focal_class.signature: int getNumberLeaves()
focal_class.class_method_signature: SimpleSlot.getExecutedVertex()
focal_class.full_signature: public Execution getExecutedVertex()
focal_class.identifier: getExecutedVertex
focal_class.modifiers: public
focal_class.parameters: ()
focal_class.return: Execution
focal_class.signature: Execution getExecutedVertex()
focal_class.class_method_signature: SimpleSlot.setExecutedVertex(Execution executedVertex)
focal_class.full_signature: public boolean setExecutedVertex(Execution executedVertex)
focal_class.identifier: setExecutedVertex
focal_class.modifiers: public
focal_class.parameters: (Execution executedVertex)
focal_class.return: boolean
focal_class.signature: boolean setExecutedVertex(Execution executedVertex)
focal_class.class_method_signature: SimpleSlot.getLocality()
focal_class.full_signature: public Locality getLocality()
focal_class.identifier: getLocality
focal_class.modifiers: public
focal_class.parameters: ()
focal_class.return: Locality
focal_class.signature: Locality getLocality()
focal_class.class_method_signature: SimpleSlot.setLocality(Locality locality)
focal_class.full_signature: public void setLocality(Locality locality)
focal_class.identifier: setLocality
focal_class.modifiers: public
focal_class.parameters: (Locality locality)
focal_class.return: void
focal_class.signature: void setLocality(Locality locality)
focal_class.class_method_signature: SimpleSlot.releaseSlot()
focal_class.full_signature: @Override public void releaseSlot()
focal_class.identifier: releaseSlot
focal_class.modifiers: @Override public
focal_class.parameters: ()
focal_class.return: void
focal_class.signature: void releaseSlot()
focal_class.class_method_signature: SimpleSlot.toString()
focal_class.full_signature: @Override public String toString()
focal_class.identifier: toString
focal_class.modifiers: @Override public
focal_class.parameters: ()
focal_class.return: String
focal_class.signature: String toString()
focal_class.superclass: extends Slot
focal_method.body: @Override
  	public void releaseSlot() {
  
  		if (!isCanceled()) {
  
  			// kill all tasks currently running in this slot
  			Execution exec = this.executedTask;
  			if (exec != null && !exec.isFinished()) {
  				exec.fail(new Exception(
  						"The slot in which the task was executed has been released. Probably loss of TaskManager "
  								+ getInstance()));
  			}
  
  			// release directly (if we are directly allocated),
  			// otherwise release through the parent shared slot
  			if (getParent() == null) {
  				// we have to give back the slot to the owning instance
  				if (markCancelled()) {
  					getInstance().returnAllocatedSlot(this);
  				}
  			} else {
  				// we have to ask our parent to dispose us
  				getParent().releaseChild(this);
  			}
  		}
  	}
focal_method.class_method_signature: SimpleSlot.releaseSlot()
focal_method.full_signature: @Override public void releaseSlot()
focal_method.identifier: releaseSlot
focal_method.invocations: isCanceled isFinished fail getInstance getParent markCancelled returnAllocatedSlot getInstance releaseChild getParent
focal_method.modifiers: @Override public
focal_method.parameters: ()
focal_method.return: void
focal_method.signature: void releaseSlot()