Program: 155144
Project: 155144
Buggy source:
public Object removeProperty(String key){
  if (key == null) {
    throw new IllegalArgumentException("String_Node_Str");
  }
  nodeManager.acquireLock(this,LockType.WRITE);
  boolean success=false;
  try {
    ensureFullProperties();
    PropertyData property=null;
    ArrayMap<Integer,PropertyData> addMap=nodeManager.getCowPropertyAddMap(this);
    ArrayMap<Integer,PropertyData> removeMap=nodeManager.getCowPropertyRemoveMap(this,true);
    for (    PropertyIndex cachedIndex : nodeManager.index(key)) {
      if (addMap != null) {
        property=addMap.remove(cachedIndex.getKeyId());
        if (property != null) {
          removeMap.put(cachedIndex.getKeyId(),property);
          break;
        }
      }
      property=propertyMap.get(cachedIndex.getKeyId());
      if (property != null) {
        removeMap.put(cachedIndex.getKeyId(),property);
        break;
      }
    }
    if (property == null && !nodeManager.hasAllPropertyIndexes()) {
      if (addMap != null) {
        for (        int keyId : addMap.keySet()) {
          if (!nodeManager.hasIndexFor(keyId)) {
            PropertyIndex indexToCheck=nodeManager.getIndexFor(keyId);
            if (indexToCheck.getKey().equals(key)) {
              property=addMap.remove(indexToCheck.getKeyId());
              if (property != null) {
                removeMap.put(indexToCheck.getKeyId(),property);
                break;
              }
            }
          }
        }
        if (property == null) {
          for (          int keyId : propertyMap.keySet()) {
            if (!nodeManager.hasIndexFor(keyId)) {
              PropertyIndex indexToCheck=nodeManager.getIndexFor(keyId);
              if (indexToCheck.getKey().equals(key)) {
                property=propertyMap.get(indexToCheck.getKeyId());
                if (property != null) {
                  removeMap.put(indexToCheck.getKeyId(),property);
                  break;
                }
              }
            }
          }
        }
      }
    }
    if (property == null) {
      success=true;
      return null;
    }
    removeProperty(property.getId());
    success=true;
    return getPropertyValue(property);
  }
  finally {
    nodeManager.releaseLock(this,LockType.WRITE);
    if (!success) {
      setRollbackOnly();
    }
  }
}

Fixed version (ground truth):
public Object removeProperty(String key){
  if (key == null) {
    throw new IllegalArgumentException("String_Node_Str");
  }
  nodeManager.acquireLock(this,LockType.WRITE);
  boolean success=false;
  try {
    ensureFullProperties();
    PropertyData property=null;
    ArrayMap<Integer,PropertyData> addMap=nodeManager.getCowPropertyAddMap(this);
    ArrayMap<Integer,PropertyData> removeMap=nodeManager.getCowPropertyRemoveMap(this,true);
    for (    PropertyIndex cachedIndex : nodeManager.index(key)) {
      if (addMap != null) {
        property=addMap.remove(cachedIndex.getKeyId());
        if (property != null) {
          removeMap.put(cachedIndex.getKeyId(),property);
          break;
        }
      }
      if (removeMap.get(cachedIndex.getKeyId()) != null) {
        success=true;
        return null;
      }
      property=propertyMap.get(cachedIndex.getKeyId());
      if (property != null) {
        removeMap.put(cachedIndex.getKeyId(),property);
        break;
      }
    }
    if (property == null && !nodeManager.hasAllPropertyIndexes()) {
      if (addMap != null) {
        for (        int keyId : addMap.keySet()) {
          if (!nodeManager.hasIndexFor(keyId)) {
            PropertyIndex indexToCheck=nodeManager.getIndexFor(keyId);
            if (indexToCheck.getKey().equals(key)) {
              property=addMap.remove(indexToCheck.getKeyId());
              if (property != null) {
                removeMap.put(indexToCheck.getKeyId(),property);
                break;
              }
            }
          }
        }
        if (property == null) {
          for (          int keyId : propertyMap.keySet()) {
            if (!nodeManager.hasIndexFor(keyId)) {
              PropertyIndex indexToCheck=nodeManager.getIndexFor(keyId);
              if (indexToCheck.getKey().equals(key)) {
                property=propertyMap.get(indexToCheck.getKeyId());
                if (property != null) {
                  removeMap.put(indexToCheck.getKeyId(),property);
                  break;
                }
              }
            }
          }
        }
      }
    }
    if (property == null) {
      success=true;
      return null;
    }
    removeProperty(property.getId());
    success=true;
    return getPropertyValue(property);
  }
  finally {
    nodeManager.releaseLock(this,LockType.WRITE);
    if (!success) {
      setRollbackOnly();
    }
  }
}