Program: 154949
Project: 154949
Buggy source:
public void delete(){
  NodeImpl startNode=null;
  NodeImpl endNode=null;
  boolean startNodeLocked=false;
  boolean endNodeLocked=false;
  nodeManager.acquireLock(this,LockType.WRITE);
  boolean success=false;
  try {
    startNode=nodeManager.getLightNode(startNodeId);
    if (startNode != null) {
      nodeManager.acquireLock(startNode,LockType.WRITE);
      startNodeLocked=true;
    }
    endNode=nodeManager.getLightNode(endNodeId);
    if (endNode != null) {
      nodeManager.acquireLock(endNode,LockType.WRITE);
      endNodeLocked=true;
    }
    nodeManager.deleteRelationship(this);
    if (startNode != null) {
      startNode.removeRelationship(type,id);
    }
    if (endNode != null) {
      endNode.removeRelationship(type,id);
    }
    success=true;
  }
  finally {
    boolean releaseFailed=false;
    try {
      if (startNodeLocked) {
        nodeManager.releaseLock(startNode,LockType.WRITE);
      }
    }
 catch (    Exception e) {
      releaseFailed=true;
      e.printStackTrace();
    }
    try {
      if (endNodeLocked) {
        nodeManager.releaseLock(endNode,LockType.WRITE);
      }
    }
 catch (    Exception e) {
      releaseFailed=true;
      e.printStackTrace();
    }
    nodeManager.releaseLock(this,LockType.WRITE);
    if (!success) {
      setRollbackOnly();
    }
    if (releaseFailed) {
      throw new LockException("String_Node_Str" + startNode + "String_Node_Str"+ endNode+ "String_Node_Str"+ this);
    }
  }
}

Fixed version (ground truth):
public void delete(){
  NodeImpl startNode=null;
  NodeImpl endNode=null;
  boolean startNodeLocked=false;
  boolean endNodeLocked=false;
  nodeManager.acquireLock(this,LockType.WRITE);
  boolean success=false;
  try {
    startNode=nodeManager.getLightNode(startNodeId);
    if (startNode != null) {
      nodeManager.acquireLock(startNode,LockType.WRITE);
      startNodeLocked=true;
    }
    endNode=nodeManager.getLightNode(endNodeId);
    if (endNode != null) {
      nodeManager.acquireLock(endNode,LockType.WRITE);
      endNodeLocked=true;
    }
    ArrayMap<Integer,PropertyData> skipMap=nodeManager.getCowPropertyRemoveMap(this,true);
    ArrayMap<Integer,PropertyData> removedProps=nodeManager.deleteRelationship(this);
    if (removedProps.size() > 0) {
      for (      int index : removedProps.keySet()) {
        skipMap.put(index,removedProps.get(index));
      }
    }
    success=true;
    if (startNode != null) {
      startNode.removeRelationship(type,id);
    }
    if (endNode != null) {
      endNode.removeRelationship(type,id);
    }
    success=true;
  }
  finally {
    boolean releaseFailed=false;
    try {
      if (startNodeLocked) {
        nodeManager.releaseLock(startNode,LockType.WRITE);
      }
    }
 catch (    Exception e) {
      releaseFailed=true;
      e.printStackTrace();
    }
    try {
      if (endNodeLocked) {
        nodeManager.releaseLock(endNode,LockType.WRITE);
      }
    }
 catch (    Exception e) {
      releaseFailed=true;
      e.printStackTrace();
    }
    nodeManager.releaseLock(this,LockType.WRITE);
    if (!success) {
      setRollbackOnly();
    }
    if (releaseFailed) {
      throw new LockException("String_Node_Str" + startNode + "String_Node_Str"+ endNode+ "String_Node_Str"+ this);
    }
  }
}