Program: 94998
Project: 94998
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);
  Thread transferThread=new Thread(new Runnable(){
    public void run(){
      setStatus(outgoingFileTransfer.getStatus());
      boolean negotiation=true;
      while (negotiation) {
        try {
          Thread.sleep(300);
        }
 catch (        InterruptedException e) {
          return;
        }
        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(){
              StringBuffer buf=new StringBuffer("String_Node_Str");
              buf.append("String_Node_Str").append(requestAccepted());
              buf.append("String_Node_Str").append(getSource()).append("String_Node_Str");
              return buf.toString();
            }
          }
);
          negotiation=false;
        }
      }
      OutputStream outs=progress.getOutputStream();
      if (outs == null)       return;
      InputStream inputStream=null;
      try {
        inputStream=new FileInputStream(XMPPOutgoingFileTransfer.this.localFile);
        writeToStream(inputStream,outs);
      }
 catch (      FileNotFoundException e) {
        setStatus(FileTransfer.Status.ERROR);
        setException(e);
      }
catch (      XMPPException e) {
        setStatus(FileTransfer.Status.ERROR);
        setException(e);
      }
 finally {
        setStatus(Status.COMPLETE);
        try {
          if (inputStream != null) {
            inputStream.close();
          }
        }
 catch (        IOException e) {
        }
        try {
          outs.flush();
          outs.close();
        }
 catch (        IOException e) {
        }
        fireTransferListenerEvent(new IOutgoingFileTransferSendDoneEvent(){
          private static final long serialVersionUID=-6315336868737148845L;
          public IOutgoingFileTransfer getSource(){
            return XMPPOutgoingFileTransfer.this;
          }
          public String toString(){
            StringBuffer buf=new StringBuffer("String_Node_Str");
            buf.append("String_Node_Str").append(getSource());
            buf.append("String_Node_Str").append(getSource().getPercentComplete()).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);
  Thread transferThread=new Thread(new Runnable(){
    public void run(){
      setStatus(outgoingFileTransfer.getStatus());
      boolean negotiation=true;
      while (negotiation) {
        try {
          Thread.sleep(300);
        }
 catch (        InterruptedException e) {
          return;
        }
        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(){
              StringBuffer buf=new StringBuffer("String_Node_Str");
              buf.append("String_Node_Str").append(requestAccepted()).append("String_Node_Str");
              return buf.toString();
            }
          }
);
          negotiation=false;
        }
      }
      OutputStream outs=progress.getOutputStream();
      if (outs == null)       return;
      InputStream inputStream=null;
      try {
        inputStream=new FileInputStream(XMPPOutgoingFileTransfer.this.localFile);
        writeToStream(inputStream,outs);
      }
 catch (      FileNotFoundException e) {
        setStatus(FileTransfer.Status.ERROR);
        setException(e);
      }
catch (      XMPPException e) {
        setStatus(FileTransfer.Status.ERROR);
        setException(e);
      }
 finally {
        setStatus(Status.COMPLETE);
        try {
          if (inputStream != null) {
            inputStream.close();
          }
        }
 catch (        IOException e) {
        }
        try {
          outs.flush();
          outs.close();
        }
 catch (        IOException e) {
        }
        fireTransferListenerEvent(new IOutgoingFileTransferSendDoneEvent(){
          private static final long serialVersionUID=-6315336868737148845L;
          public IOutgoingFileTransfer getSource(){
            return XMPPOutgoingFileTransfer.this;
          }
          public String toString(){
            StringBuffer buf=new StringBuffer("String_Node_Str");
            buf.append("String_Node_Str").append(getSource().getBytesSent()).append("String_Node_Str");
            return buf.toString();
          }
        }
);
      }
    }
  }
,"String_Node_Str");
  transferThread.start();
}