if (removed != null) {
if (removed != null && sipTransaction.testAndSetTransactionTerminatedEvent()) {
	public void removeTransaction(SIPTransaction sipTransaction) {		if (logWriter.isLoggingEnabled()) {			logWriter.logDebug("Removing Transaction = "					+ sipTransaction.getTransactionId());		}		if (sipTransaction instanceof SIPServerTransaction) {			String key = sipTransaction.getTransactionId();			Object removed = serverTransactionTable.remove(key);			this					.removePendingTransaction((SIPServerTransaction) sipTransaction);			// Send a notification to the listener.			SipProviderImpl sipProvider = (SipProviderImpl) sipTransaction					.getSipProvider();			if (removed != null) {				TransactionTerminatedEvent event = new TransactionTerminatedEvent(						sipProvider, (ServerTransaction) sipTransaction);				sipProvider.handleEvent(event, sipTransaction);			}		} else {			String key = sipTransaction.getTransactionId();			Object removed = clientTransactionTable.remove(key);			// Send a notification to the listener.			if (removed != null) {				SipProviderImpl sipProvider = (SipProviderImpl) sipTransaction						.getSipProvider();				TransactionTerminatedEvent event = new TransactionTerminatedEvent(						sipProvider, (ClientTransaction) sipTransaction);				sipProvider.handleEvent(event, sipTransaction);			}		}	}