Program: 136406
Project: 136406
Buggy source:
@Test public void unlockWithoutCommitForDefaultProjectShouldRevertChanges() throws RepositoryException, LibrarySaveException {
  LibraryNode testLibary=LibraryNodeBuilder.create("String_Node_Str",getRepositoryForTest().getNamespace() + "String_Node_Str","String_Node_Str",new Version(1,0,0)).build(pc.getDefaultProject(),pc);
  LibraryChainNode library=rc.manage(getRepositoryForTest(),Collections.singletonList(testLibary)).get(0);
  library.getHead().lock();
  library.getHead().addMember(ComponentNodeBuilder.createCoreObject("String_Node_Str").addProperty("String_Node_Str").setSimpleType().get());
  List<Node> descendants=library.getDescendants_NamedTypes();
  Assert.assertEquals(1,library.getDescendants_NamedTypes().size());
  Assert.assertEquals(1,descendants.size());
  ProjectNode revertProject=mc.getRepositoryController().unlockAndRevert(library.getHead());
  Assert.assertEquals(1,revertProject.getLibraries().size());
  LibraryNode revertedLib=revertProject.getLibraries().get(0);
  Assert.assertEquals(0,revertedLib.getDescendants_NamedTypes().size());
  RepositoryItemNode nodeToRetrive=findRepositoryItem(revertedLib.getChain(),getRepositoryForTest());
  pc.add(defaultProject,nodeToRetrive.getItem());
  Assert.assertEquals(1,defaultProject.getChildren().size());
  LibraryChainNode nodes=(LibraryChainNode)defaultProject.getChildren().get(0);
  Assert.assertEquals(library.getName(),nodes.getName());
  Assert.assertEquals(library.getHead().getNamespace(),nodes.getHead().getNamespace());
  Assert.assertEquals(0,nodes.getDescendants_NamedTypes().size());
}

Fixed version (ground truth):
@Test public void unlockWithoutCommitForDefaultProjectShouldRevertChanges() throws RepositoryException, LibrarySaveException {
  LibraryNode testLibary=LibraryNodeBuilder.create("String_Node_Str",getRepositoryForTest().getNamespace() + "String_Node_Str","String_Node_Str",new Version(1,0,0)).build(pc.getDefaultProject(),pc);
  LibraryChainNode library=rc.manage(getRepositoryForTest(),Collections.singletonList(testLibary)).get(0);
  library.getHead().lock();
  library.getHead().addMember(ComponentNodeBuilder.createCoreObject("String_Node_Str").addProperty("String_Node_Str").setSimpleType().get());
  List<Node> descendants=library.getDescendants_NamedTypes();
  Assert.assertEquals(1,library.getDescendants_NamedTypes().size());
  Assert.assertEquals(1,descendants.size());
  String libraryName=library.getName();
  String libraryNamespace=library.getNamespace();
  ProjectNode revertProject=mc.getRepositoryController().unlockAndRevert(library.getHead());
  Assert.assertEquals(1,revertProject.getLibraries().size());
  LibraryNode revertedLib=revertProject.getLibraries().get(0);
  Assert.assertEquals(0,revertedLib.getDescendants_NamedTypes().size());
  RepositoryItemNode nodeToRetrive=findRepositoryItem(revertedLib.getChain(),getRepositoryForTest());
  pc.add(defaultProject,nodeToRetrive.getItem());
  Assert.assertEquals(1,defaultProject.getChildren().size());
  LibraryChainNode nodes=(LibraryChainNode)defaultProject.getChildren().get(0);
  Assert.assertEquals(libraryName,nodes.getName());
  Assert.assertEquals(libraryNamespace,nodes.getNamespace());
  Assert.assertEquals(0,nodes.getDescendants_NamedTypes().size());
}