output: #fixed code
                                  public void disconnect(int reason, String msg) throws IOException {
          Buffer buffer = createBuffer(SshConstants.Message.SSH_MSG_DISCONNECT);
          buffer.putInt(reason);
          buffer.putString(msg);
          buffer.putString("");
          WriteFuture f = writePacket(buffer);
          f.addListener(new IoFutureListener() {
              public void operationComplete(IoFuture future) {
                  close();
              }
          });
      }
input: #vulnerable code 
                                  public void disconnect(int reason, String msg) throws IOException {
          Buffer buffer = createBuffer(SshConstants.Message.SSH_MSG_DISCONNECT);
          buffer.putInt(reason);
          buffer.putString(msg);
          buffer.putString("");
          WriteFuture f = writePacket(buffer);
          f.join();
          close();
      } 
                              #location 8 
                              #vulnerability type THREAD_SAFETY_VIOLATION