Program: 14288
Project: 14288
Buggy source:
public void check() throws Faults.CheckException, IllegalStateException {
  final Cluster.State currentState=this.stateMachine.getState();
  final List<Throwable> currentErrors=Lists.newArrayList(this.pendingErrors);
  this.pendingErrors.clear();
  try {
    if (Component.State.ENABLED.equals(this.configuration.lookupState())) {
      enabledTransition().call().get();
    }
 else     if (Component.State.DISABLED.equals(this.configuration.lookupState())) {
      disabledTransition().call().get();
    }
 else     if (Component.State.NOTREADY.equals(this.configuration.lookupState())) {
      notreadyTransition().call().get();
    }
 else {
      Refresh.SERVICEREADY.fire(this);
    }
  }
 catch (  Exception ex) {
    if (ex.getCause() instanceof CancellationException) {
    }
 else {
      currentErrors.add(ex);
    }
  }
  final Component.State externalState=this.configuration.lookupState();
  if (!currentErrors.isEmpty()) {
    throw Faults.failure(this.configuration,currentErrors);
  }
 else   if (Component.State.ENABLED.equals(externalState) && (Cluster.State.ENABLING.ordinal() >= currentState.ordinal())) {
    final IllegalStateException ex=new IllegalStateException("String_Node_Str" + externalState + "String_Node_Str"+ currentState+ "String_Node_Str");
    currentErrors.add(ex);
    throw Faults.failure(this.configuration,currentErrors);
  }
}

Fixed version (ground truth):
public void check() throws Faults.CheckException, IllegalStateException, InterruptedException, ServiceStateException {
  if (this.gateLock.tryLock(30,TimeUnit.SECONDS)) {
    try {
      final Cluster.State currentState=this.stateMachine.getState();
      final List<Throwable> currentErrors=Lists.newArrayList(this.pendingErrors);
      this.pendingErrors.clear();
      try {
        Component.State state=this.configuration.lookupState();
        if (Component.State.ENABLED.equals(this.configuration.lookupState())) {
          enabledTransition().call().get();
        }
 else         if (Component.State.DISABLED.equals(this.configuration.lookupState())) {
          disabledTransition().call().get();
        }
 else         if (Component.State.NOTREADY.equals(this.configuration.lookupState())) {
          notreadyTransition().call().get();
        }
 else {
          Refresh.SERVICEREADY.fire(this);
        }
      }
 catch (      Exception ex) {
        if (ex.getCause() instanceof CancellationException) {
        }
 else {
          currentErrors.add(ex);
        }
      }
      final Component.State externalState=this.configuration.lookupState();
      if (!currentErrors.isEmpty()) {
        throw Faults.failure(this.configuration,currentErrors);
      }
 else       if (Component.State.ENABLED.equals(externalState) && (Cluster.State.ENABLING.ordinal() >= currentState.ordinal())) {
        final IllegalStateException ex=new IllegalStateException("String_Node_Str" + externalState + "String_Node_Str"+ currentState+ "String_Node_Str");
        currentErrors.add(ex);
        throw Faults.failure(this.configuration,currentErrors);
      }
    }
 catch (    Exception ex) {
      LOG.error(ex);
      throw ex;
    }
 finally {
      this.gateLock.unlock();
    }
  }
 else {
    throw new ServiceStateException("String_Node_Str" + this.getPartition() + "String_Node_Str");
  }
}