Program: 172228
Project: 172228
Buggy source:
/** 
 * Goes direct to the shared cache in the absence of a transaction. <p> Where a transaction is present, a cache of removed items is lazily added to the thread and the <tt>Object</tt> put onto that. 
 */
public void remove(K key){
  if (AlfrescoTransactionSupport.getTransactionId() == null) {
    sharedCache.remove(key);
    if (isDebugEnabled) {
      logger.debug("String_Node_Str" + "String_Node_Str" + this + "String_Node_Str"+ "String_Node_Str"+ key);
    }
  }
 else {
    TransactionData txnData=getTransactionData();
    if (txnData.isClosed) {
      throw new AlfrescoRuntimeException("String_Node_Str");
    }
    if (txnData.isClearOn) {
    }
 else {
      if (txnData.removedItemsCache.getMemoryStoreSize() >= maxCacheSize) {
        txnData.isClearOn=true;
        if (isDebugEnabled) {
          logger.debug("String_Node_Str" + "String_Node_Str" + this + "String_Node_Str"+ "String_Node_Str"+ AlfrescoTransactionSupport.getTransactionId());
        }
      }
 else {
        V existingValue=sharedCache.get(key);
        if (existingValue == null) {
        }
 else {
          CacheBucket<V> removeBucket=new RemoveCacheBucket<V>(existingValue);
          Element element=new Element(key,removeBucket);
          txnData.removedItemsCache.put(element);
        }
      }
    }
    txnData.updatedItemsCache.remove(key);
    if (isDebugEnabled) {
      logger.debug("String_Node_Str" + "String_Node_Str" + this + "String_Node_Str"+ "String_Node_Str"+ key);
    }
  }
}

Fixed version (ground truth):
/** 
 * Goes direct to the shared cache in the absence of a transaction. <p> Where a transaction is present, a cache of removed items is lazily added to the thread and the <tt>Object</tt> put onto that. 
 */
public void remove(K key){
  if (AlfrescoTransactionSupport.getTransactionId() == null) {
    sharedCache.remove(key);
    if (isDebugEnabled) {
      logger.debug("String_Node_Str" + "String_Node_Str" + this + "String_Node_Str"+ "String_Node_Str"+ key);
    }
  }
 else {
    TransactionData txnData=getTransactionData();
    if (txnData.isClosed) {
      if (isDebugEnabled) {
        logger.debug("String_Node_Str" + "String_Node_Str" + this + "String_Node_Str"+ "String_Node_Str"+ key);
      }
    }
 else {
      if (txnData.isClearOn) {
      }
 else {
        if (txnData.removedItemsCache.getMemoryStoreSize() >= maxCacheSize) {
          txnData.isClearOn=true;
          if (isDebugEnabled) {
            logger.debug("String_Node_Str" + "String_Node_Str" + this + "String_Node_Str"+ "String_Node_Str"+ AlfrescoTransactionSupport.getTransactionId());
          }
        }
 else {
          V existingValue=sharedCache.get(key);
          if (existingValue == null) {
          }
 else {
            CacheBucket<V> removeBucket=new RemoveCacheBucket<V>(existingValue);
            Element element=new Element(key,removeBucket);
            txnData.removedItemsCache.put(element);
          }
        }
      }
      txnData.updatedItemsCache.remove(key);
      if (isDebugEnabled) {
        logger.debug("String_Node_Str" + "String_Node_Str" + this + "String_Node_Str"+ "String_Node_Str"+ key);
      }
    }
  }
}