Program: 136438
Project: 136438
Buggy source:
@Test public void unlockWithoutCommitShouldRevertChanges() throws RepositoryException, LibrarySaveException {
  ProjectNode uploadProject=createProject("String_Node_Str",getRepositoryForTest(),"String_Node_Str");
  LibraryNode testLibary=LibraryNodeBuilder.create("String_Node_Str",getRepositoryForTest().getNamespace() + "String_Node_Str","String_Node_Str",new Version(1,0,0)).build(uploadProject,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());
  Assert.assertEquals(1,library.getDescendants_NamedTypes().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 unlockWithoutCommitShouldRevertChanges() throws RepositoryException, LibrarySaveException {
  ProjectNode uploadProject=createProject("String_Node_Str",getRepositoryForTest(),"String_Node_Str");
  LibraryNode testLibary=LibraryNodeBuilder.create("String_Node_Str",getRepositoryForTest().getNamespace() + "String_Node_Str","String_Node_Str",new Version(1,0,0)).build(uploadProject,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());
  Assert.assertEquals(1,library.getDescendants_NamedTypes().size());
  String libraryName=library.getName();
  String namespace=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(namespace,nodes.getNamespace());
  Assert.assertEquals(0,nodes.getDescendants_NamedTypes().size());
}