Program: 49706
Project: 49706
Buggy source:
private void doShutdown(boolean force){
  long start=System.currentTimeMillis();
  logger.log(Level.FINE,"String_Node_Str" + String.valueOf(active));
  if (!force && isActive()) {
    final int maxWaitSeconds=groupProperties.GRACEFUL_SHUTDOWN_MAX_WAIT.getInteger();
    int waitSeconds=0;
    do {
      try {
        Thread.sleep(500);
      }
 catch (      InterruptedException e) {
      }
    }
 while (concurrentMapManager.partitionManager.hasActiveBackupTask() && ++waitSeconds < maxWaitSeconds);
    if (waitSeconds >= maxWaitSeconds) {
      logger.log(Level.WARNING,"String_Node_Str" + maxWaitSeconds + "String_Node_Str");
    }
  }
  if (isActive()) {
    joined.set(false);
    setActive(false);
    wanReplicationService.shutdown();
    try {
      Runtime.getRuntime().removeShutdownHook(shutdownHookThread);
    }
 catch (    Throwable ignored) {
    }
    if (managementCenterService != null) {
      managementCenterService.shutdown();
    }
    logger.log(Level.FINEST,"String_Node_Str");
    clientService.shutdown();
    logger.log(Level.FINEST,"String_Node_Str");
    concurrentMapManager.shutdown();
    logger.log(Level.FINEST,"String_Node_Str");
    clusterService.stop();
    if (multicastService != null) {
      logger.log(Level.FINEST,"String_Node_Str");
      multicastService.stop();
    }
    logger.log(Level.FINEST,"String_Node_Str");
    connectionManager.shutdown();
    logger.log(Level.FINEST,"String_Node_Str");
    executorManager.stop();
    textCommandService.stop();
    masterAddress=null;
    if (securityContext != null) {
      securityContext.destroy();
    }
    initializer.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];
      logger.log(Level.FINEST,"String_Node_Str" + thread.getName());
      thread.interrupt();
    }
    failedConnections.clear();
    serviceThreadPacketQueue.clear();
    ThreadContext.get().shutdown(this.factory);
    logger.log(Level.INFO,"String_Node_Str" + (System.currentTimeMillis() - start) + "String_Node_Str");
  }
}

Fixed version (ground truth):
private void doShutdown(boolean force){
  long start=System.currentTimeMillis();
  logger.log(Level.FINE,"String_Node_Str" + String.valueOf(active));
  if (!force && isActive()) {
    final int maxWaitSeconds=groupProperties.GRACEFUL_SHUTDOWN_MAX_WAIT.getInteger();
    int waitSeconds=0;
    do {
      try {
        Thread.sleep(500);
      }
 catch (      InterruptedException e) {
      }
    }
 while (concurrentMapManager.partitionManager.hasActiveBackupTask() && ++waitSeconds < maxWaitSeconds);
    if (waitSeconds >= maxWaitSeconds) {
      logger.log(Level.WARNING,"String_Node_Str" + maxWaitSeconds + "String_Node_Str");
    }
  }
  if (isActive()) {
    joined.set(false);
    setActive(false);
    wanReplicationService.shutdown();
    try {
      Runtime.getRuntime().removeShutdownHook(shutdownHookThread);
    }
 catch (    Throwable ignored) {
    }
    if (managementCenterService != null) {
      managementCenterService.shutdown();
    }
    logger.log(Level.FINEST,"String_Node_Str");
    clientService.shutdown();
    logger.log(Level.FINEST,"String_Node_Str");
    concurrentMapManager.shutdown();
    logger.log(Level.FINEST,"String_Node_Str");
    clusterService.stop();
    if (multicastService != null) {
      logger.log(Level.FINEST,"String_Node_Str");
      multicastService.stop();
    }
    logger.log(Level.FINEST,"String_Node_Str");
    connectionManager.shutdown();
    logger.log(Level.FINEST,"String_Node_Str");
    executorManager.stop();
    textCommandService.stop();
    masterAddress=null;
    if (securityContext != null) {
      securityContext.destroy();
    }
    initializer.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];
      logger.log(Level.FINEST,"String_Node_Str" + thread.getName());
      thread.interrupt();
    }
    failedConnections.clear();
    serviceThreadPacketQueue.clear();
    mapCallStates.clear();
    ThreadContext.get().shutdown(this.factory);
    logger.log(Level.INFO,"String_Node_Str" + (System.currentTimeMillis() - start) + "String_Node_Str");
  }
}