Program: 95195
Project: 95195
Buggy source:
private Thread setupPing(){
  trace("String_Node_Str");
  final int pingStartWait=(new Random()).nextInt(keepAlive / 2);
  return new Thread(new Runnable(){
    public void run(){
      Thread me=Thread.currentThread();
      try {
        Thread.sleep(pingStartWait);
      }
 catch (      InterruptedException e) {
        return;
      }
      while (!queue.isStopped()) {
        try {
          if (me.isInterrupted())           break;
          Thread.sleep(keepAlive / 2);
          if (me.isInterrupted())           break;
synchronized (outputStream) {
            if (System.currentTimeMillis() >= nextPingTime) {
              waitForPing=true;
              sendIt(ping);
              if (waitForPing) {
                try {
                  outputStream.wait(keepAlive / 2);
                }
 catch (                InterruptedException e) {
                }
              }
              if (waitForPing) {
                throw new IOException(getAddressPort() + "String_Node_Str");
              }
            }
          }
        }
 catch (        Exception e) {
          if (isClosing) {
            dumpStack("String_Node_Str",e);
synchronized (Client.this) {
              Client.this.notifyAll();
            }
          }
 else {
            dumpStack("String_Node_Str",e);
            if (!handler.handleSuspectEvent(new ConnectionEvent(Client.this,e))) {
              handler.handleDisconnectEvent(new DisconnectConnectionEvent(Client.this,e,queue));
            }
          }
          break;
        }
      }
      trace("String_Node_Str");
    }
  }
,getLocalID() + "String_Node_Str" + getAddressPort());
}

Fixed version (ground truth):
private Thread setupPing(){
  trace("String_Node_Str");
  final int pingStartWait=(new Random()).nextInt(keepAlive / 2);
  return new Thread(new Runnable(){
    public void run(){
      Thread me=Thread.currentThread();
      try {
        Thread.sleep(pingStartWait);
      }
 catch (      InterruptedException e) {
        return;
      }
      while (!queue.isStopped()) {
        try {
          if (me.isInterrupted())           break;
          Thread.sleep(keepAlive / 2);
          if (me.isInterrupted())           break;
synchronized (pingLock) {
            if (System.currentTimeMillis() >= nextPingTime) {
              waitForPing=true;
              sendIt(ping);
              if (waitForPing) {
                try {
                  pingLock.wait(keepAlive / 2);
                }
 catch (                InterruptedException e) {
                  dumpStack("String_Node_Str",e);
                  return;
                }
              }
              if (waitForPing) {
                throw new IOException(getAddressPort() + "String_Node_Str");
              }
            }
          }
        }
 catch (        Exception e) {
          if (isClosing) {
            dumpStack("String_Node_Str",e);
synchronized (Client.this) {
              Client.this.notifyAll();
            }
          }
 else {
            dumpStack("String_Node_Str",e);
            if (!handler.handleSuspectEvent(new ConnectionEvent(Client.this,e))) {
              handler.handleDisconnectEvent(new DisconnectConnectionEvent(Client.this,e,queue));
            }
          }
          break;
        }
      }
      trace("String_Node_Str");
    }
  }
,getLocalID() + "String_Node_Str" + getAddressPort());
}