Program: 155275
Project: 155275
Buggy source:
void nodeRemoveProperty(int nodeId,int propertyId) throws IOException {
  NodeRecord nodeRecord=getNodeRecord(nodeId);
  if (nodeRecord == null) {
    nodeRecord=getNodeStore().getRecord(nodeId,readFromBuffer);
  }
  PropertyRecord propRecord=getPropertyRecord(propertyId);
  if (propRecord == null) {
    propRecord=getPropertyStore().getRecord(propertyId,readFromBuffer);
    addPropertyRecord(propRecord);
  }
  if (propRecord.isLight()) {
    getPropertyStore().makeHeavy(propRecord,readFromBuffer);
  }
  propRecord.setInUse(false);
  for (  DynamicRecord valueRecord : propRecord.getValueRecords()) {
    if (valueRecord.inUse()) {
      valueRecord.setInUse(false,propRecord.getType().intValue());
    }
  }
  int prevProp=propRecord.getPrevProp();
  int nextProp=propRecord.getNextProp();
  if (nodeRecord.getNextProp() == propertyId) {
    nodeRecord.setNextProp(nextProp);
    addNodeRecord(nodeRecord);
  }
  if (prevProp != Record.NO_PREVIOUS_PROPERTY.intValue()) {
    PropertyRecord prevPropRecord=getPropertyRecord(prevProp);
    if (prevPropRecord == null) {
      prevPropRecord=getPropertyStore().getLightRecord(prevProp,readFromBuffer);
    }
    prevPropRecord.setNextProp(nextProp);
    addPropertyRecord(prevPropRecord);
  }
  if (nextProp != Record.NO_PREVIOUS_PROPERTY.intValue()) {
    PropertyRecord nextPropRecord=getPropertyRecord(nextProp);
    if (nextPropRecord == null) {
      nextPropRecord=getPropertyStore().getLightRecord(nextProp,readFromBuffer);
    }
    nextPropRecord.setPrevProp(prevProp);
    addPropertyRecord(nextPropRecord);
  }
}

Fixed version (ground truth):
void nodeRemoveProperty(int nodeId,int propertyId) throws IOException {
  NodeRecord nodeRecord=getNodeRecord(nodeId);
  if (nodeRecord == null) {
    nodeRecord=getNodeStore().getRecord(nodeId,readFromBuffer);
  }
  PropertyRecord propRecord=getPropertyRecord(propertyId);
  if (propRecord == null) {
    propRecord=getPropertyStore().getRecord(propertyId,readFromBuffer);
    addPropertyRecord(propRecord);
  }
  propRecord.setNodeId(nodeId);
  if (propRecord.isLight()) {
    getPropertyStore().makeHeavy(propRecord,readFromBuffer);
  }
  propRecord.setInUse(false);
  for (  DynamicRecord valueRecord : propRecord.getValueRecords()) {
    if (valueRecord.inUse()) {
      valueRecord.setInUse(false,propRecord.getType().intValue());
    }
  }
  int prevProp=propRecord.getPrevProp();
  int nextProp=propRecord.getNextProp();
  if (nodeRecord.getNextProp() == propertyId) {
    nodeRecord.setNextProp(nextProp);
    addNodeRecord(nodeRecord);
  }
  if (prevProp != Record.NO_PREVIOUS_PROPERTY.intValue()) {
    PropertyRecord prevPropRecord=getPropertyRecord(prevProp);
    if (prevPropRecord == null) {
      prevPropRecord=getPropertyStore().getLightRecord(prevProp,readFromBuffer);
    }
    prevPropRecord.setNextProp(nextProp);
    addPropertyRecord(prevPropRecord);
  }
  if (nextProp != Record.NO_PREVIOUS_PROPERTY.intValue()) {
    PropertyRecord nextPropRecord=getPropertyRecord(nextProp);
    if (nextPropRecord == null) {
      nextPropRecord=getPropertyStore().getLightRecord(nextProp,readFromBuffer);
    }
    nextPropRecord.setPrevProp(prevProp);
    addPropertyRecord(nextPropRecord);
  }
}