private synchronized void clearBid(int transID) {
    int auction = transID & 31;
    int clearID = transID >> 5;

    Bid activeBid = getBid(auction);
    while (activeBid != null) {
      if (activeBid.getClearID() == clearID) {
	String bidString = activeBid.getClearString();
	Bid newBid = new Bid(activeBid, bidString, activeBid.getClearHash());
	boolean isActiveBid = activeBid == getBid(auction);
	if (bidString.equals(Bid.EMPTY_BID_STRING)) {
	  removeBid(auction, activeBid);
	} else {
	  changeBid(auction, activeBid, newBid);
	}
	if (isActiveBid) {
	  try {
	    agent.bidUpdated(newBid);
	  } catch (Exception e) {
	    log.log(Level.SEVERE, "agent could not handle bidUpdated", e);
	  }
	  if (tableModel != null) {
	    tableModel.fireTableRowsUpdated(auction, auction);
	  }
	}
	activeBid = null;

      } else {
	activeBid = activeBid.getReplacing();
      }
    }
  }