Program: 155273
Project: 155273
Buggy source:
void relRemoveProperty(int relId,int propertyId) throws IOException {
  RelationshipRecord relRecord=getRelationshipRecord(relId);
  if (relRecord == null) {
    relRecord=getRelationshipStore().getRecord(relId,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 (relRecord.getNextProp() == propertyId) {
    relRecord.setNextProp(nextProp);
    addRelationshipRecord(relRecord);
  }
  if (prevProp != Record.NO_PREVIOUS_PROPERTY.intValue()) {
    PropertyRecord prevPropRecord=getPropertyRecord(prevProp);
    if (prevPropRecord == null) {
      prevPropRecord=getPropertyStore().getLightRecord(prevProp,readFromBuffer);
      addPropertyRecord(prevPropRecord);
    }
    prevPropRecord.setNextProp(nextProp);
  }
  if (nextProp != Record.NO_NEXT_PROPERTY.intValue()) {
    PropertyRecord nextPropRecord=getPropertyRecord(nextProp);
    if (nextPropRecord == null) {
      nextPropRecord=getPropertyStore().getLightRecord(nextProp,readFromBuffer);
      addPropertyRecord(nextPropRecord);
    }
    nextPropRecord.setPrevProp(prevProp);
  }
}

Fixed version (ground truth):
void relRemoveProperty(int relId,int propertyId) throws IOException {
  RelationshipRecord relRecord=getRelationshipRecord(relId);
  if (relRecord == null) {
    relRecord=getRelationshipStore().getRecord(relId,readFromBuffer);
  }
  PropertyRecord propRecord=getPropertyRecord(propertyId);
  if (propRecord == null) {
    propRecord=getPropertyStore().getRecord(propertyId,readFromBuffer);
    addPropertyRecord(propRecord);
  }
  propRecord.setRelId(relId);
  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 (relRecord.getNextProp() == propertyId) {
    relRecord.setNextProp(nextProp);
    addRelationshipRecord(relRecord);
  }
  if (prevProp != Record.NO_PREVIOUS_PROPERTY.intValue()) {
    PropertyRecord prevPropRecord=getPropertyRecord(prevProp);
    if (prevPropRecord == null) {
      prevPropRecord=getPropertyStore().getLightRecord(prevProp,readFromBuffer);
      addPropertyRecord(prevPropRecord);
    }
    prevPropRecord.setNextProp(nextProp);
  }
  if (nextProp != Record.NO_NEXT_PROPERTY.intValue()) {
    PropertyRecord nextPropRecord=getPropertyRecord(nextProp);
    if (nextPropRecord == null) {
      nextPropRecord=getPropertyStore().getLightRecord(nextProp,readFromBuffer);
      addPropertyRecord(nextPropRecord);
    }
    nextPropRecord.setPrevProp(prevProp);
  }
}