<BUG>if(retval != null)next_to_remove++;}</BUG><CONTEXT>public Message remove() {Message retval;synchronized(msgs) {Long key=new Long(next_to_remove);retval=(Message)msgs.remove(key);<extra_id_0>return retval;</CONTEXT>
if(retval != null) {if(log.isTraceEnabled())log.trace("removed seqno=" + next_to_remove);