Program: 155271
Project: 155271
Buggy source:
public void doRollback() throws XAException {
  if (committed) {
    throw new XAException("String_Node_Str" + "String_Node_Str" + getIdentifier() + "String_Node_Str"+ "String_Node_Str");
  }
  try {
    NodeManager nm=NodeManager.getManager();
    for (    RelationshipTypeRecord record : relTypeRecords.values()) {
      if (record.isCreated()) {
        getRelationshipTypeStore().freeId(record.getId());
        for (        DynamicRecord dynamicRecord : record.getTypeRecords()) {
          if (dynamicRecord.isCreated()) {
            getRelationshipTypeStore().freeBlockId(dynamicRecord.getId());
          }
        }
      }
      nm.removeRelationshipTypeFromCache(record.getId());
    }
    for (    NodeRecord record : nodeRecords.values()) {
      if (record.isCreated()) {
        getNodeStore().freeId(record.getId());
      }
      nm.removeNodeFromCache(record.getId());
    }
    for (    RelationshipRecord record : relRecords.values()) {
      if (record.isCreated()) {
        getRelationshipStore().freeId(record.getId());
      }
      nm.removeRelationshipFromCache(record.getId());
    }
    for (    PropertyIndexRecord record : propIndexRecords.values()) {
      if (record.isCreated()) {
        getPropertyStore().getIndexStore().freeId(record.getId());
        for (        DynamicRecord dynamicRecord : record.getKeyRecords()) {
          if (dynamicRecord.isCreated()) {
            getPropertyStore().getIndexStore().freeBlockId(dynamicRecord.getId());
          }
        }
      }
    }
    for (    PropertyRecord record : propertyRecords.values()) {
      if (record.isCreated()) {
        getPropertyStore().freeId(record.getId());
        for (        DynamicRecord dynamicRecord : record.getValueRecords()) {
          if (dynamicRecord.isCreated()) {
            if (dynamicRecord.getType() == PropertyType.STRING.intValue()) {
              getPropertyStore().freeStringBlockId(dynamicRecord.getId());
            }
 else             if (dynamicRecord.getType() == PropertyType.ARRAY.intValue()) {
              getPropertyStore().freeArrayBlockId(dynamicRecord.getId());
            }
 else {
              throw new RuntimeException("String_Node_Str");
            }
          }
        }
      }
    }
  }
 catch (  IOException e) {
    logger.log(Level.SEVERE,"String_Node_Str",e);
    throw new XAException("String_Node_Str" + getIdentifier() + "String_Node_Str"+ e);
  }
  nodeRecords=null;
  propertyRecords=null;
  relRecords=null;
  relTypeRecords=null;
  propIndexRecords=null;
  nodeCommands=null;
  propCommands=null;
  propIndexCommands=null;
  relCommands=null;
  relTypeCommands=null;
}

Fixed version (ground truth):
public void doRollback() throws XAException {
  if (committed) {
    throw new XAException("String_Node_Str" + "String_Node_Str" + getIdentifier() + "String_Node_Str"+ "String_Node_Str");
  }
  try {
    NodeManager nm=NodeManager.getManager();
    for (    RelationshipTypeRecord record : relTypeRecords.values()) {
      if (record.isCreated()) {
        getRelationshipTypeStore().freeId(record.getId());
        for (        DynamicRecord dynamicRecord : record.getTypeRecords()) {
          if (dynamicRecord.isCreated()) {
            getRelationshipTypeStore().freeBlockId(dynamicRecord.getId());
          }
        }
      }
      nm.removeRelationshipTypeFromCache(record.getId());
    }
    for (    NodeRecord record : nodeRecords.values()) {
      if (record.isCreated()) {
        getNodeStore().freeId(record.getId());
      }
      nm.removeNodeFromCache(record.getId());
    }
    for (    RelationshipRecord record : relRecords.values()) {
      if (record.isCreated()) {
        getRelationshipStore().freeId(record.getId());
      }
      nm.removeRelationshipFromCache(record.getId());
    }
    for (    PropertyIndexRecord record : propIndexRecords.values()) {
      if (record.isCreated()) {
        getPropertyStore().getIndexStore().freeId(record.getId());
        for (        DynamicRecord dynamicRecord : record.getKeyRecords()) {
          if (dynamicRecord.isCreated()) {
            getPropertyStore().getIndexStore().freeBlockId(dynamicRecord.getId());
          }
        }
      }
    }
    for (    PropertyRecord record : propertyRecords.values()) {
      if (record.getNodeId() != -1) {
        nm.removeNodeFromCache(record.getNodeId());
      }
 else       if (record.getRelId() != -1) {
        nm.removeRelationshipFromCache(record.getRelId());
      }
      if (record.isCreated()) {
        getPropertyStore().freeId(record.getId());
        for (        DynamicRecord dynamicRecord : record.getValueRecords()) {
          if (dynamicRecord.isCreated()) {
            if (dynamicRecord.getType() == PropertyType.STRING.intValue()) {
              getPropertyStore().freeStringBlockId(dynamicRecord.getId());
            }
 else             if (dynamicRecord.getType() == PropertyType.ARRAY.intValue()) {
              getPropertyStore().freeArrayBlockId(dynamicRecord.getId());
            }
 else {
              throw new RuntimeException("String_Node_Str");
            }
          }
        }
      }
    }
  }
 catch (  IOException e) {
    logger.log(Level.SEVERE,"String_Node_Str",e);
    throw new XAException("String_Node_Str" + getIdentifier() + "String_Node_Str"+ e);
  }
  nodeRecords=null;
  propertyRecords=null;
  relRecords=null;
  relTypeRecords=null;
  propIndexRecords=null;
  nodeCommands=null;
  propCommands=null;
  propIndexCommands=null;
  relCommands=null;
  relTypeCommands=null;
}