Program: 154795
Project: 154795
Buggy source:
private void commitRecovered(){
  try {
    committed=true;
    CommandSorter sorter=new CommandSorter();
    java.util.Collections.sort(relTypeCommands,sorter);
    for (    Command.RelationshipTypeCommand command : relTypeCommands) {
      command.execute();
      addRelationshipType(command.getKey());
    }
    java.util.Collections.sort(nodeCommands,sorter);
    for (    Command.NodeCommand command : nodeCommands) {
      command.execute();
      removeNodeFromCache(command.getKey());
    }
    java.util.Collections.sort(relCommands,sorter);
    for (    Command.RelationshipCommand command : relCommands) {
      command.execute();
      removeRelationshipFromCache(command.getKey());
    }
    java.util.Collections.sort(propIndexCommands,sorter);
    for (    Command.PropertyIndexCommand command : propIndexCommands) {
      command.execute();
      addPropertyIndexCommand(command.getKey());
    }
    java.util.Collections.sort(propCommands,sorter);
    for (    Command.PropertyCommand command : propCommands) {
      command.execute();
      removePropertyFromCache(command);
    }
    neoStore.setRecoveredStatus(true);
    try {
      neoStore.setLastCommittedTx(getCommitTxId());
    }
  finally {
      neoStore.setRecoveredStatus(false);
    }
    neoStore.getIdGeneratorFactory().updateIdGenerators(neoStore);
    if (!isRecovered()) {
      lockReleaser.commit();
    }
  }
  finally {
    nodeRecords.clear();
    propertyRecords.clear();
    relRecords.clear();
    relTypeRecords.clear();
    propIndexRecords.clear();
    nodeCommands.clear();
    propCommands.clear();
    propIndexCommands.clear();
    relCommands.clear();
    relTypeCommands.clear();
  }
}

Fixed version (ground truth):
private void commitRecovered(){
  try {
    committed=true;
    CommandSorter sorter=new CommandSorter();
    java.util.Collections.sort(propIndexCommands,sorter);
    for (    Command.PropertyIndexCommand command : propIndexCommands) {
      command.execute();
      addPropertyIndexCommand(command.getKey());
    }
    java.util.Collections.sort(propCommands,sorter);
    for (    Command.PropertyCommand command : propCommands) {
      command.execute();
      removePropertyFromCache(command);
    }
    java.util.Collections.sort(relTypeCommands,sorter);
    for (    Command.RelationshipTypeCommand command : relTypeCommands) {
      command.execute();
      addRelationshipType(command.getKey());
    }
    java.util.Collections.sort(relCommands,sorter);
    for (    Command.RelationshipCommand command : relCommands) {
      command.execute();
      removeRelationshipFromCache(command.getKey());
    }
    java.util.Collections.sort(nodeCommands,sorter);
    for (    Command.NodeCommand command : nodeCommands) {
      command.execute();
      removeNodeFromCache(command.getKey());
    }
    neoStore.setRecoveredStatus(true);
    try {
      neoStore.setLastCommittedTx(getCommitTxId());
    }
  finally {
      neoStore.setRecoveredStatus(false);
    }
    neoStore.getIdGeneratorFactory().updateIdGenerators(neoStore);
    if (!isRecovered()) {
      lockReleaser.commit();
    }
  }
  finally {
    nodeRecords.clear();
    propertyRecords.clear();
    relRecords.clear();
    relTypeRecords.clear();
    propIndexRecords.clear();
    nodeCommands.clear();
    propCommands.clear();
    propIndexCommands.clear();
    relCommands.clear();
    relTypeCommands.clear();
  }
}