Program: 48111
Project: 48111
Buggy source:
public void shutdown(final boolean terminate){
  long start=Clock.currentTimeMillis();
  if (logger.isFinestEnabled()) {
    logger.finest("String_Node_Str" + String.valueOf(active));
  }
  if (!terminate && isActive()) {
    final int maxWaitSeconds=groupProperties.GRACEFUL_SHUTDOWN_MAX_WAIT.getInteger();
    if (!partitionService.prepareToSafeShutdown(maxWaitSeconds,TimeUnit.SECONDS)) {
      logger.warning("String_Node_Str" + maxWaitSeconds + "String_Node_Str");
    }
  }
  if (isActive()) {
    if (!terminate) {
      clusterService.sendShutdownMessage();
    }
    joined.set(false);
    setActive(false);
    setMasterAddress(null);
    try {
      Runtime.getRuntime().removeShutdownHook(shutdownHookThread);
    }
 catch (    Throwable ignored) {
    }
    versionCheck.shutdown();
    if (managementCenterService != null) {
      managementCenterService.shutdown();
    }
    logger.finest("String_Node_Str");
    nodeEngine.shutdown(terminate);
    if (multicastService != null) {
      logger.finest("String_Node_Str");
      multicastService.stop();
    }
    logger.finest("String_Node_Str");
    connectionManager.shutdown();
    textCommandService.stop();
    masterAddress=null;
    if (securityContext != null) {
      securityContext.destroy();
    }
    initializer.destroy();
    serializationService.destroy();
    int numThreads=threadGroup.activeCount();
    Thread[] threads=new Thread[numThreads * 2];
    numThreads=threadGroup.enumerate(threads,false);
    for (int i=0; i < numThreads; i++) {
      Thread thread=threads[i];
      if (thread.isAlive()) {
        if (logger.isFinestEnabled()) {
          logger.finest("String_Node_Str" + thread.getName());
        }
        thread.interrupt();
      }
    }
    failedConnections.clear();
    systemLogService.shutdown();
    logger.info("String_Node_Str" + (Clock.currentTimeMillis() - start) + "String_Node_Str");
  }
}

Fixed version (ground truth):
public void shutdown(final boolean terminate){
  long start=Clock.currentTimeMillis();
  if (logger.isFinestEnabled()) {
    logger.finest("String_Node_Str" + String.valueOf(active));
  }
  if (!terminate && isActive() && joined()) {
    final int maxWaitSeconds=groupProperties.GRACEFUL_SHUTDOWN_MAX_WAIT.getInteger();
    if (!partitionService.prepareToSafeShutdown(maxWaitSeconds,TimeUnit.SECONDS)) {
      logger.warning("String_Node_Str" + maxWaitSeconds + "String_Node_Str");
    }
  }
  if (isActive()) {
    if (!terminate) {
      clusterService.sendShutdownMessage();
    }
    joined.set(false);
    setActive(false);
    setMasterAddress(null);
    try {
      Runtime.getRuntime().removeShutdownHook(shutdownHookThread);
    }
 catch (    Throwable ignored) {
    }
    versionCheck.shutdown();
    if (managementCenterService != null) {
      managementCenterService.shutdown();
    }
    logger.finest("String_Node_Str");
    nodeEngine.shutdown(terminate);
    if (multicastService != null) {
      logger.finest("String_Node_Str");
      multicastService.stop();
    }
    logger.finest("String_Node_Str");
    connectionManager.shutdown();
    textCommandService.stop();
    masterAddress=null;
    if (securityContext != null) {
      securityContext.destroy();
    }
    initializer.destroy();
    serializationService.destroy();
    int numThreads=threadGroup.activeCount();
    Thread[] threads=new Thread[numThreads * 2];
    numThreads=threadGroup.enumerate(threads,false);
    for (int i=0; i < numThreads; i++) {
      Thread thread=threads[i];
      if (thread.isAlive()) {
        if (logger.isFinestEnabled()) {
          logger.finest("String_Node_Str" + thread.getName());
        }
        thread.interrupt();
      }
    }
    failedConnections.clear();
    systemLogService.shutdown();
    logger.info("String_Node_Str" + (Clock.currentTimeMillis() - start) + "String_Node_Str");
  }
}