Program: 155097
Project: 155097
Buggy source:
public void setProperty(String key,Object value){
  if (key == null || value == null) {
    throw new IllegalArgumentException("String_Node_Str" + "String_Node_Str" + key + "String_Node_Str"+ "String_Node_Str"+ value);
  }
  nodeManager.acquireLock(this,LockType.WRITE);
  boolean success=false;
  try {
    ensureFullProperties();
    ArrayMap<Integer,PropertyData> addMap=nodeManager.getCowPropertyAddMap(this,true);
    ArrayMap<Integer,PropertyData> skipMap=nodeManager.getCowPropertyRemoveMap(this);
    PropertyIndex index=null;
    PropertyData property=null;
    boolean foundInSkipMap=false;
    for (    PropertyIndex cachedIndex : nodeManager.index(key)) {
      if (skipMap != null) {
        if (skipMap.remove(cachedIndex.getKeyId()) != null) {
          foundInSkipMap=true;
        }
      }
      index=cachedIndex;
      property=addMap.get(cachedIndex.getKeyId());
      if (property != null) {
        break;
      }
      property=propertyMap.get(cachedIndex.getKeyId());
      if (property != null) {
        break;
      }
    }
    if (property == null && !nodeManager.hasAllPropertyIndexes()) {
      for (      int keyId : addMap.keySet()) {
        if (!nodeManager.hasIndexFor(keyId)) {
          PropertyIndex indexToCheck=nodeManager.getIndexFor(keyId);
          if (indexToCheck.getKey().equals(key)) {
            if (skipMap != null) {
              skipMap.remove(indexToCheck.getKeyId());
            }
            index=indexToCheck;
            property=addMap.get(indexToCheck.getKeyId());
            if (property != null) {
              break;
            }
          }
        }
      }
      if (property == null) {
        for (        int keyId : propertyMap.keySet()) {
          if (!nodeManager.hasIndexFor(keyId)) {
            PropertyIndex indexToCheck=nodeManager.getIndexFor(keyId);
            if (indexToCheck.getKey().equals(key)) {
              if (skipMap != null) {
                skipMap.remove(indexToCheck.getKeyId());
              }
              index=indexToCheck;
              property=propertyMap.get(indexToCheck.getKeyId());
              if (property != null) {
                break;
              }
            }
          }
        }
      }
    }
    if (index == null) {
      index=nodeManager.createPropertyIndex(key);
    }
    if (property != null && !foundInSkipMap) {
      int propertyId=property.getId();
      changeProperty(propertyId,value);
      property.setNewValue(value);
    }
 else {
      int propertyId=addProperty(index,value);
      property=new PropertyData(propertyId,value);
    }
    addMap.put(index.getKeyId(),property);
    success=true;
  }
  finally {
    nodeManager.releaseLock(this,LockType.WRITE);
    if (!success) {
      setRollbackOnly();
    }
  }
}

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