Program: 88027
Project: 88027
Buggy source:
public void changeExecutionState(final ExecutionState newExecutionState,final String optionalMessage){
  if (this.executionState == ExecutionState.CANCELED || this.executionState == ExecutionState.FINISHED) {
    return;
  }
  if (this.executionState == ExecutionState.RESTARTING && newExecutionState == ExecutionState.CANCELED) {
    this.isCanceled=false;
    return;
  }
  LOG.info("String_Node_Str" + executionState + "String_Node_Str"+ newExecutionState+ "String_Node_Str"+ this.getTaskName()+ "String_Node_Str"+ (this.getIndexInSubtaskGroup() + 1)+ "String_Node_Str"+ this.getCurrentNumberOfSubtasks()+ "String_Node_Str");
  boolean unexpectedStateChange=true;
  if (this.executionState == ExecutionState.CREATED && newExecutionState == ExecutionState.SCHEDULED) {
    unexpectedStateChange=false;
  }
  if (this.executionState == ExecutionState.SCHEDULED && newExecutionState == ExecutionState.ASSIGNING) {
    unexpectedStateChange=false;
  }
  if (this.executionState == ExecutionState.ASSIGNING && newExecutionState == ExecutionState.ASSIGNED) {
    unexpectedStateChange=false;
  }
  if (this.executionState == ExecutionState.ASSIGNED && newExecutionState == ExecutionState.READY) {
    unexpectedStateChange=false;
  }
  if (this.executionState == ExecutionState.READY && newExecutionState == ExecutionState.RUNNING) {
    unexpectedStateChange=false;
  }
  if (this.executionState == ExecutionState.RUNNING && newExecutionState == ExecutionState.FINISHING) {
    unexpectedStateChange=false;
  }
  if (this.executionState == ExecutionState.FINISHING && newExecutionState == ExecutionState.FINISHED) {
    unexpectedStateChange=false;
  }
  if (this.executionState == ExecutionState.SCHEDULED && newExecutionState == ExecutionState.ASSIGNED) {
    unexpectedStateChange=false;
  }
  if (this.executionState == ExecutionState.SCHEDULED && newExecutionState == ExecutionState.CANCELED) {
    unexpectedStateChange=false;
  }
  if (this.executionState == ExecutionState.ASSIGNING && newExecutionState == ExecutionState.CANCELED) {
    unexpectedStateChange=false;
  }
  if (this.executionState == ExecutionState.ASSIGNED && newExecutionState == ExecutionState.CANCELED) {
    unexpectedStateChange=false;
  }
  if (this.executionState == ExecutionState.READY && newExecutionState == ExecutionState.CANCELED) {
    unexpectedStateChange=false;
  }
  if (this.executionState == ExecutionState.RUNNING && newExecutionState == ExecutionState.FAILED) {
    unexpectedStateChange=false;
  }
  if (this.executionState == ExecutionState.FINISHING && newExecutionState == ExecutionState.FAILED) {
    unexpectedStateChange=false;
  }
  if (this.executionState == ExecutionState.RUNNING && newExecutionState == ExecutionState.CANCELING) {
    unexpectedStateChange=false;
  }
  if (this.executionState == ExecutionState.FINISHING && newExecutionState == ExecutionState.CANCELING) {
    unexpectedStateChange=false;
  }
  if (this.executionState == ExecutionState.CANCELING && newExecutionState == ExecutionState.CANCELED) {
    unexpectedStateChange=false;
  }
  if (this.executionState == ExecutionState.RUNNING && newExecutionState == ExecutionState.RESTARTING) {
    unexpectedStateChange=false;
  }
  if (unexpectedStateChange) {
    LOG.error("String_Node_Str" + this.executionState + "String_Node_Str"+ newExecutionState);
  }
  if (this.restarting && newExecutionState == ExecutionState.RUNNING) {
    this.restarting=false;
  }
  this.executionState=newExecutionState;
synchronized (this.executionListeners) {
    final Iterator<ExecutionListener> it=this.executionListeners.iterator();
    while (it.hasNext()) {
      it.next().executionStateChanged(this,newExecutionState,optionalMessage);
    }
  }
}

Fixed version (ground truth):
public void changeExecutionState(final ExecutionState newExecutionState,final String optionalMessage){
  if (this.executionState == ExecutionState.CANCELED || this.executionState == ExecutionState.FINISHED) {
    return;
  }
  if (this.executionState == ExecutionState.RESTARTING && newExecutionState == ExecutionState.CANCELED) {
    this.isCanceled=false;
    return;
  }
  LOG.info("String_Node_Str" + executionState + "String_Node_Str"+ newExecutionState+ "String_Node_Str"+ this.getTaskName()+ "String_Node_Str"+ (this.getIndexInSubtaskGroup() + 1)+ "String_Node_Str"+ this.getCurrentNumberOfSubtasks()+ "String_Node_Str");
  boolean unexpectedStateChange=true;
  if (this.executionState == ExecutionState.CREATED && newExecutionState == ExecutionState.SCHEDULED) {
    unexpectedStateChange=false;
  }
  if (this.executionState == ExecutionState.SCHEDULED && newExecutionState == ExecutionState.ASSIGNING) {
    unexpectedStateChange=false;
  }
  if (this.executionState == ExecutionState.ASSIGNING && newExecutionState == ExecutionState.ASSIGNED) {
    unexpectedStateChange=false;
  }
  if (this.executionState == ExecutionState.ASSIGNED && newExecutionState == ExecutionState.READY) {
    unexpectedStateChange=false;
  }
  if (this.executionState == ExecutionState.READY && newExecutionState == ExecutionState.RUNNING) {
    unexpectedStateChange=false;
  }
  if (this.executionState == ExecutionState.RUNNING && newExecutionState == ExecutionState.FINISHING) {
    unexpectedStateChange=false;
  }
  if (this.executionState == ExecutionState.FINISHING && newExecutionState == ExecutionState.FINISHED) {
    unexpectedStateChange=false;
  }
  if (this.executionState == ExecutionState.SCHEDULED && newExecutionState == ExecutionState.ASSIGNED) {
    unexpectedStateChange=false;
  }
  if (this.executionState == ExecutionState.SCHEDULED && newExecutionState == ExecutionState.CANCELED) {
    unexpectedStateChange=false;
  }
  if (this.executionState == ExecutionState.ASSIGNING && newExecutionState == ExecutionState.CANCELED) {
    unexpectedStateChange=false;
  }
  if (this.executionState == ExecutionState.ASSIGNED && newExecutionState == ExecutionState.CANCELED) {
    unexpectedStateChange=false;
  }
  if (this.executionState == ExecutionState.READY && newExecutionState == ExecutionState.CANCELED) {
    unexpectedStateChange=false;
  }
  if (this.executionState == ExecutionState.RUNNING && newExecutionState == ExecutionState.FAILED) {
    unexpectedStateChange=false;
  }
  if (this.executionState == ExecutionState.FINISHING && newExecutionState == ExecutionState.FAILED) {
    unexpectedStateChange=false;
  }
  if (this.executionState == ExecutionState.RUNNING && newExecutionState == ExecutionState.CANCELING) {
    unexpectedStateChange=false;
  }
  if (this.executionState == ExecutionState.FINISHING && newExecutionState == ExecutionState.CANCELING) {
    unexpectedStateChange=false;
  }
  if (this.executionState == ExecutionState.CANCELING && newExecutionState == ExecutionState.CANCELED) {
    unexpectedStateChange=false;
  }
  if (this.executionState == ExecutionState.RUNNING && newExecutionState == ExecutionState.RESTARTING) {
    unexpectedStateChange=false;
  }
  if (this.executionState == ExecutionState.RESTARTING && newExecutionState == ExecutionState.RUNNING) {
    unexpectedStateChange=false;
  }
  if (unexpectedStateChange) {
    LOG.error("String_Node_Str" + this.executionState + "String_Node_Str"+ newExecutionState);
  }
  if (this.restarting && newExecutionState == ExecutionState.RUNNING) {
    this.restarting=false;
  }
  this.executionState=newExecutionState;
synchronized (this.executionListeners) {
    final Iterator<ExecutionListener> it=this.executionListeners.iterator();
    while (it.hasNext()) {
      it.next().executionStateChanged(this,newExecutionState,optionalMessage);
    }
  }
}