Program: 4820
Project: 4820
Buggy source:
/** 
 * Accepts a new upload, creating a new <tt>HTTPUploader</tt> if it successfully parses the HTTP request.  BLOCKING.
 * @param method the <tt>HTTPRequestMethod</tt> that will delegate tothe appropriate response handlers for the type of request
 * @param socket the <tt>Socket</tt> that will be used for the new upload
 */
public void acceptUpload(HTTPRequestMethod method,Socket socket){
  debug("String_Node_Str");
  HTTPUploader uploader=null;
  try {
    int queued=-1;
    String oldFileName="String_Node_Str";
    while (true) {
      HttpRequestLine line=parseHttpRequest(socket);
      debug("String_Node_Str");
      String fileName=line._fileName;
      uploader=new HTTPUploader(method,fileName,socket,line._index,this,_fileManager,_router);
      uploader.readHeader();
      debug(uploader + "String_Node_Str");
      boolean giveSlot=(oldFileName.equalsIgnoreCase(fileName) && queued == ACCEPTED);
      queued=doSingleUpload(uploader,socket,socket.getInetAddress().getHostAddress(),line._index,giveSlot);
      oldFileName=fileName;
      if ((!line.isHTTP11() || uploader.getCloseConnection()) && queued != QUEUED)       return;
      debug(uploader + "String_Node_Str");
      int oldTimeout=socket.getSoTimeout();
      if (queued != QUEUED)       socket.setSoTimeout(SettingsManager.instance().getPersistentHTTPConnectionTimeout());
      String word=IOUtils.readWord(socket.getInputStream(),4);
      debug(uploader + "String_Node_Str");
      socket.setSoTimeout(oldTimeout);
      if (!word.equalsIgnoreCase("String_Node_Str") && !word.equalsIgnoreCase("String_Node_Str"))       return;
    }
  }
 catch (  IOException ioe) {
    debug("String_Node_Str");
  }
 finally {
synchronized (this) {
      boolean found=false;
      for (Iterator iter=_queuedUploads.iterator(); iter.hasNext(); ) {
        KeyValue kv=(KeyValue)iter.next();
        if (kv.getKey() == socket) {
          found=true;
          iter.remove();
        }
      }
      if (found)       uploader.setState(Uploader.INTERRUPTED);
    }
    debug("String_Node_Str");
    close(socket);
  }
}

Fixed version (ground truth):
/** 
 * Accepts a new upload, creating a new <tt>HTTPUploader</tt> if it successfully parses the HTTP request.  BLOCKING.
 * @param method the initial request type to use, e.g., GET or HEAD
 * @param socket the <tt>Socket</tt> that will be used for the new upload.It is assumed that the initial word of the request (e.g., "GET") has been consumed (e.g., by Acceptor)
 */
public void acceptUpload(final HTTPRequestMethod method,Socket socket){
  debug("String_Node_Str");
  HTTPUploader uploader=null;
  try {
    int queued=-1;
    String oldFileName="String_Node_Str";
    HTTPRequestMethod currentMethod=method;
    while (true) {
      HttpRequestLine line=parseHttpRequest(socket);
      debug("String_Node_Str");
      String fileName=line._fileName;
      uploader=new HTTPUploader(currentMethod,fileName,socket,line._index,this,_fileManager,_router);
      uploader.readHeader();
      debug(uploader + "String_Node_Str");
      boolean giveSlot=(oldFileName.equalsIgnoreCase(fileName) && queued == ACCEPTED);
      queued=doSingleUpload(uploader,socket,socket.getInetAddress().getHostAddress(),line._index,giveSlot);
      oldFileName=fileName;
      if ((!line.isHTTP11() || uploader.getCloseConnection()) && queued != QUEUED)       return;
      debug(uploader + "String_Node_Str");
      int oldTimeout=socket.getSoTimeout();
      if (queued != QUEUED)       socket.setSoTimeout(SettingsManager.instance().getPersistentHTTPConnectionTimeout());
      String word=IOUtils.readWord(socket.getInputStream(),4);
      debug(uploader + "String_Node_Str");
      socket.setSoTimeout(oldTimeout);
      if (word.equals("String_Node_Str"))       currentMethod=HTTPRequestMethod.GET;
 else       if (word.equals("String_Node_Str"))       currentMethod=HTTPRequestMethod.HEAD;
 else       return;
    }
  }
 catch (  IOException ioe) {
    debug("String_Node_Str");
  }
 finally {
synchronized (this) {
      boolean found=false;
      for (Iterator iter=_queuedUploads.iterator(); iter.hasNext(); ) {
        KeyValue kv=(KeyValue)iter.next();
        if (kv.getKey() == socket) {
          found=true;
          iter.remove();
        }
      }
      if (found)       uploader.setState(Uploader.INTERRUPTED);
    }
    debug("String_Node_Str");
    close(socket);
  }
}