Program: 94751
Project: 94751
Buggy source:
public synchronized void startSend(File localFile,String description) throws XMPPException {
  this.localFile=localFile;
  this.fileSize=localFile.length();
  setStatus(Status.INITIAL);
  outgoingFileTransfer.sendFile(localFile.getAbsolutePath(),this.fileSize,description,progress);
  final Thread transferThread=new Thread(new Runnable(){
    public void run(){
      setStatus(outgoingFileTransfer.getStatus());
      boolean negotiation=true;
      while (negotiation) {
        try {
          Thread.sleep(300);
        }
 catch (        final InterruptedException e) {
          return;
        }
        final Status s=progress.getStatus();
        setStatus(s);
        final boolean negotiated=getStatus().equals(Status.NEGOTIATED);
        if (s.equals(Status.NEGOTIATED) || s.equals(Status.CANCLED) || s.equals(Status.COMPLETE)|| s.equals(Status.ERROR)|| s.equals(Status.REFUSED)) {
          fireTransferListenerEvent(new IOutgoingFileTransferResponseEvent(){
            private static final long serialVersionUID=-5940612388464073240L;
            public boolean requestAccepted(){
              return negotiated;
            }
            public IOutgoingFileTransfer getSource(){
              return XMPPOutgoingFileTransfer.this;
            }
            public String toString(){
              final StringBuffer buf=new StringBuffer("String_Node_Str");
              buf.append("String_Node_Str").append(requestAccepted()).append("String_Node_Str");
              return buf.toString();
            }
          }
);
          negotiation=false;
        }
      }
      final OutputStream outs=progress.getOutputStream();
      if (outs == null)       return;
      InputStream inputStream=null;
      try {
        inputStream=new FileInputStream(XMPPOutgoingFileTransfer.this.localFile);
        writeToStream(inputStream,outs);
      }
 catch (      final FileNotFoundException e) {
        setStatus(FileTransfer.Status.ERROR);
        setException(e);
      }
catch (      final XMPPException e) {
        setStatus(FileTransfer.Status.ERROR);
        setException(e);
      }
 finally {
        setStatus(Status.COMPLETE);
        try {
          if (inputStream != null) {
            inputStream.close();
          }
        }
 catch (        final IOException e) {
        }
        try {
          outs.flush();
          outs.close();
        }
 catch (        final IOException e) {
        }
        fireTransferListenerEvent(new IOutgoingFileTransferSendDoneEvent(){
          private static final long serialVersionUID=-6315336868737148845L;
          public IOutgoingFileTransfer getSource(){
            return XMPPOutgoingFileTransfer.this;
          }
          public String toString(){
            final StringBuffer buf=new StringBuffer("String_Node_Str");
            buf.append("String_Node_Str" + getSource().isDone());
            buf.append("String_Node_Str").append(getSource().getBytesSent()).append("String_Node_Str");
            return buf.toString();
          }
        }
);
      }
    }
  }
,"String_Node_Str");
  transferThread.start();
}

Fixed version (ground truth):
public synchronized void startSend(File localFile,String description) throws XMPPException {
  this.localFile=localFile;
  this.fileSize=localFile.length();
  setStatus(Status.INITIAL);
  outgoingFileTransfer.sendFile(localFile.getAbsolutePath(),this.fileSize,description,progress);
  final Thread transferThread=new Thread(new Runnable(){
    public void run(){
      setStatus(outgoingFileTransfer.getStatus());
      boolean negotiation=true;
      while (negotiation) {
        try {
          Thread.sleep(300);
        }
 catch (        final InterruptedException e) {
          return;
        }
        final Status s=progress.getStatus();
        setStatus(s);
        final boolean negotiated=getStatus().equals(Status.NEGOTIATED);
        if (s.equals(Status.NEGOTIATED) || s.equals(Status.CANCLED) || s.equals(Status.COMPLETE)|| s.equals(Status.ERROR)|| s.equals(Status.REFUSED)) {
          fireTransferListenerEvent(new IOutgoingFileTransferResponseEvent(){
            private static final long serialVersionUID=-5940612388464073240L;
            public boolean requestAccepted(){
              return negotiated;
            }
            public IOutgoingFileTransfer getSource(){
              return XMPPOutgoingFileTransfer.this;
            }
            public String toString(){
              final StringBuffer buf=new StringBuffer("String_Node_Str");
              buf.append("String_Node_Str").append(requestAccepted()).append("String_Node_Str");
              return buf.toString();
            }
            public void setFileTransferJob(            FileTransferJob job){
            }
          }
);
          negotiation=false;
        }
      }
      final OutputStream outs=progress.getOutputStream();
      if (outs == null)       return;
      InputStream inputStream=null;
      try {
        inputStream=new FileInputStream(XMPPOutgoingFileTransfer.this.localFile);
        writeToStream(inputStream,outs);
      }
 catch (      final FileNotFoundException e) {
        setStatus(FileTransfer.Status.ERROR);
        setException(e);
      }
catch (      final XMPPException e) {
        setStatus(FileTransfer.Status.ERROR);
        setException(e);
      }
 finally {
        setStatus(Status.COMPLETE);
        try {
          if (inputStream != null) {
            inputStream.close();
          }
        }
 catch (        final IOException e) {
        }
        try {
          outs.flush();
          outs.close();
        }
 catch (        final IOException e) {
        }
        fireTransferListenerEvent(new IOutgoingFileTransferSendDoneEvent(){
          private static final long serialVersionUID=-6315336868737148845L;
          public IOutgoingFileTransfer getSource(){
            return XMPPOutgoingFileTransfer.this;
          }
          public String toString(){
            final StringBuffer buf=new StringBuffer("String_Node_Str");
            buf.append("String_Node_Str" + getSource().isDone());
            buf.append("String_Node_Str").append(getSource().getBytesSent()).append("String_Node_Str");
            return buf.toString();
          }
        }
);
      }
    }
  }
,"String_Node_Str");
  transferThread.start();
}