Program: 3119
Project: 3119
Buggy source:
/** 
 * Send a message through this Stream.
 * @param text The message to send.
 * @throws SkypeException when the connection to the Skype client has gone bad or AP2AP connection is not ok.
 */
public void write(String text) throws SkypeException {
  Utils.checkNotNull(text,"String_Node_Str");
  try {
    final Object wait=new Object();
    AbstractConnectorListener connectorListener=new AbstractConnectorListener(){
      @Override public void messageReceived(      ConnectorMessageEvent event){
        String message=event.getMessage();
        if (message.startsWith("String_Node_Str" + getApplication().getName() + "String_Node_Str")) {
          String data=message.substring(("String_Node_Str" + getApplication().getName() + "String_Node_Str").length());
          if ("String_Node_Str".equals(data)) {
synchronized (wait) {
              wait.notify();
            }
            return;
          }
          String[] streams=data.split("String_Node_Str");
          for (          String stream : streams) {
            stream=stream.substring(0,stream.indexOf('='));
            if (stream.equals(getId())) {
              return;
            }
          }
synchronized (wait) {
            wait.notify();
          }
        }
      }
    }
;
    ApplicationListener applicationListener=new ApplicationAdapter(){
      @Override public void disconnected(      Stream stream) throws SkypeException {
        if (stream == Stream.this) {
synchronized (wait) {
            wait.notify();
          }
        }
      }
    }
;
    Connector.getInstance().addConnectorListener(connectorListener);
    application.addApplicationListener(applicationListener);
    String header="String_Node_Str" + getApplication().getName() + "String_Node_Str"+ getId();
synchronized (wait) {
      try {
        String result=Connector.getInstance().executeWithId(header + "String_Node_Str" + text,header);
        Utils.checkError(result);
        wait.wait();
      }
 catch (      InterruptedException e) {
        throw new SkypeException("String_Node_Str",e);
      }
 finally {
        Connector.getInstance().removeConnectorListener(connectorListener);
        application.removeApplicationListener(applicationListener);
      }
    }
  }
 catch (  ConnectorException e) {
    Utils.convertToSkypeException(e);
  }
}

Fixed version (ground truth):
/** 
 * Send a message through this Stream.
 * @param text The message to send.
 * @throws SkypeException when the connection to the Skype client has gone bad or AP2AP connection is not ok.
 */
public void write(String text) throws SkypeException {
  Utils.checkNotNull(text,"String_Node_Str");
  try {
    NotificationChecker checker=new NotificationChecker(){
      public boolean isTarget(      String message){
        if (message.startsWith("String_Node_Str" + getApplication().getName() + "String_Node_Str")) {
          String data=message.substring(("String_Node_Str" + getApplication().getName() + "String_Node_Str").length());
          if ("String_Node_Str".equals(data)) {
            return true;
          }
          String[] streams=data.split("String_Node_Str");
          for (          String stream : streams) {
            stream=stream.substring(0,stream.indexOf('='));
            if (stream.equals(getId())) {
              return false;
            }
          }
          return true;
        }
        return false;
      }
    }
;
    String header="String_Node_Str" + getApplication().getName() + "String_Node_Str"+ getId();
    ApplicationListener applicationListener=null;
    try {
      final Future<String> future=Connector.getInstance().waitForEndWithId(header + "String_Node_Str" + text,header,checker);
      applicationListener=new ApplicationAdapter(){
        @Override public void disconnected(        Stream stream) throws SkypeException {
          if (stream == Stream.this) {
            future.cancel(true);
          }
        }
      }
;
      application.addApplicationListener(applicationListener);
      try {
        Utils.checkError(future.get());
      }
 catch (      CancellationException e) {
        throw new SkypeException("String_Node_Str" + getId() + "String_Node_Str",e);
      }
catch (      ExecutionException e) {
        if (e.getCause() instanceof ConnectorException) {
          throw (ConnectorException)e.getCause();
        }
        throw new SkypeException("String_Node_Str" + header + "String_Node_Str"+ text+ "String_Node_Str",e);
      }
catch (      InterruptedException e) {
        Thread.currentThread().interrupt();
        throw new SkypeException("String_Node_Str",e);
      }
    }
  finally {
      application.removeApplicationListener(applicationListener);
    }
  }
 catch (  ConnectorException e) {
    Utils.convertToSkypeException(e);
  }
}