Program: 34516
Project: 34516
Buggy source:
@SuppressWarnings("String_Node_Str") private int kill(ThreadGroup tg){
  int threadCount=0;
  Thread[] threads=new Thread[2 * tg.activeCount()];
  int n=tg.enumerate(threads);
  for (int i=0; i != n; ++i) {
    ++threadCount;
    Thread t=threads[i];
    try {
      if (Runtime.getRuntime().removeShutdownHook(t)) {
        stdErr.println("String_Node_Str" + t.getName());
      }
    }
 catch (    IllegalStateException e) {
    }
    if (t.getState() != State.TERMINATED) {
      stdErr.println("String_Node_Str" + t.getName());
      try {
        t.resume();
      }
 catch (      Exception e) {
      }
      ;
      try {
        t.start();
      }
 catch (      Exception e) {
      }
      ;
      try {
        t.interrupt();
      }
 catch (      Exception e) {
      }
      ;
      try {
        t.stop(new ThreadDoomError());
      }
 catch (      IllegalStateException e) {
      }
      ;
    }
 else {
      if (shutdownRetry % 10 == 9) {
        stdErr.println("String_Node_Str" + t.getName());
      }
    }
    if (t.isAlive() && shutdownRetry > 24) {
      if (shutdownRetry > 10 && (shutdownRetry % 10 == 5)) {
        StackTraceElement[] trace=t.getStackTrace();
        for (        StackTraceElement e : trace) {
          stdErr.println("String_Node_Str" + e);
        }
      }
      try {
        try {
          t.interrupt();
        }
 catch (        Exception e) {
        }
        ;
        trySocketInterrupt(t);
        try {
          t.interrupt();
        }
 catch (        Exception e) {
        }
        ;
        try {
          t.stop(new ThreadDoomError());
        }
 catch (        IllegalStateException e) {
        }
        ;
      }
 catch (      Exception e) {
        stdErr.println("String_Node_Str" + e.toString());
      }
    }
  }
  ThreadGroup[] groups=new ThreadGroup[2 * tg.activeGroupCount()];
  n=tg.enumerate(groups);
  for (  ThreadGroup g : groups) {
    if (g != null) {
      threadCount+=kill(g);
    }
  }
  return threadCount;
}

Fixed version (ground truth):
private int kill(ThreadGroup tg){
  int threadCount=0;
  Thread[] threads=new Thread[2 * tg.activeCount()];
  int n=tg.enumerate(threads);
  for (int i=0; i != n; ++i) {
    ++threadCount;
    Thread t=threads[i];
    try {
      if (Runtime.getRuntime().removeShutdownHook(t)) {
        stdErr.println("String_Node_Str" + t.getName());
      }
    }
 catch (    IllegalStateException e) {
    }
    if (t.getState() != State.TERMINATED) {
      killThread(t,false);
    }
 else {
      if (shutdownRetry % 10 == 9) {
        stdErr.println("String_Node_Str" + t.getName());
      }
    }
    if (t.isAlive() && shutdownRetry > 24) {
      stdErr.println("String_Node_Str" + t.getName());
      if (shutdownRetry > 30 && (shutdownRetry % 10 == 5)) {
        StackTraceElement[] trace=t.getStackTrace();
        for (        StackTraceElement e : trace) {
          stdErr.println("String_Node_Str" + e);
        }
      }
      try {
        killThread(t,true);
      }
 catch (      Exception e) {
        stdErr.println("String_Node_Str" + e.toString());
      }
    }
  }
  ThreadGroup[] groups=new ThreadGroup[2 * tg.activeGroupCount()];
  n=tg.enumerate(groups);
  for (  ThreadGroup g : groups) {
    if (g != null) {
      threadCount+=kill(g);
    }
  }
  return threadCount;
}