Program: 136288
Project: 136288
Buggy source:
@Test public void updateVersionTest_AssignedTypes() throws RepositoryException {
  providerLib=lib2;
  SimpleTypeNode simpleType=ml.addSimpleTypeToLibrary(providerLib,"String_Node_Str");
  LibraryNode userLib=lib1;
  ml.addOneOfEach(userLib,"String_Node_Str");
  for (  TypeUser user : userLib.getDescendants_TypeUsers())   user.setAssignedType(simpleType);
  providerLib=rc.createMajorVersion(providerLib);
  assertTrue("String_Node_Str",providerLib != null);
  assertTrue("String_Node_Str",!providerLib.getDescendants_TypeProviders().isEmpty());
  assertTrue("String_Node_Str",providerLib != lib2);
  assertTrue("String_Node_Str",providerLib == providerLib.getChain().getHead());
  assertTrue("String_Node_Str",simpleType.getLibrary() != providerLib);
  for (  TypeUser user : userLib.getDescendants_TypeUsers())   if (!(user.getAssignedType() instanceof ImpliedNode) && user.getRequiredType() == null)   if (user.getAssignedType() != simpleType)   LOGGER.debug("String_Node_Str" + user.getAssignedType());
 else   assertTrue("String_Node_Str",user.getAssignedType() == simpleType);
  List<LibraryNode> usedLibs=userLib.getAssignedLibraries();
  assertTrue("String_Node_Str",usedLibs.contains(simpleType.getLibrary()));
  HashMap<LibraryNode,LibraryNode> replacementMap=rc.getVersionUpdateMap(usedLibs,true);
  assertTrue("String_Node_Str",replacementMap.get(simpleType.getLibrary()) == providerLib);
  userLib.replaceTypeUsers(replacementMap);
  assertTrue(simpleType.getWhereAssigned().isEmpty());
  for (  TypeUser user : userLib.getDescendants_TypeUsers()) {
    if (!(user.getAssignedType() instanceof ImpliedNode) && user.getRequiredType() == null) {
      if (user.getAssignedType().getLibrary() != providerLib)       LOGGER.debug("String_Node_Str" + user + "String_Node_Str"+ ((Node)user.getAssignedType()).getNameWithPrefix());
      assertTrue("String_Node_Str",user.getAssignedType().getLibrary() == providerLib);
    }
  }
}

Fixed version (ground truth):
@Test public void updateVersionTest_AssignedTypes() throws RepositoryException {
  versionedLib2=lib2;
  SimpleTypeNode simpleType=ml.addSimpleTypeToLibrary(versionedLib2,"String_Node_Str");
  LibraryNode userLib=lib1;
  ml.addOneOfEach(userLib,"String_Node_Str");
  for (  TypeUser user : userLib.getDescendants_TypeUsers())   user.setAssignedType(simpleType);
  versionedLib2=rc.createMajorVersion(versionedLib2);
  assertTrue("String_Node_Str",versionedLib2 != null);
  assertTrue("String_Node_Str",!versionedLib2.getDescendants_TypeProviders().isEmpty());
  assertTrue("String_Node_Str",versionedLib2 != lib2);
  assertTrue("String_Node_Str",versionedLib2 == versionedLib2.getChain().getHead());
  assertTrue("String_Node_Str",simpleType.getLibrary() != versionedLib2);
  for (  TypeUser user : userLib.getDescendants_TypeUsers())   if (!(user.getAssignedType() instanceof ImpliedNode) && user.getRequiredType() == null)   if (user.getAssignedType() != simpleType)   LOGGER.debug("String_Node_Str" + user.getAssignedType());
 else   assertTrue("String_Node_Str",user.getAssignedType() == simpleType);
  List<LibraryNode> usedLibs=userLib.getAssignedLibraries();
  assertTrue("String_Node_Str",usedLibs.contains(simpleType.getLibrary()));
  HashMap<LibraryNode,LibraryNode> replacementMap=rc.getVersionUpdateMap(usedLibs,true);
  assertTrue("String_Node_Str",replacementMap.get(simpleType.getLibrary()) == versionedLib2);
  userLib.replaceTypeUsers(replacementMap);
  assertTrue(simpleType.getWhereAssigned().isEmpty());
  for (  TypeUser user : userLib.getDescendants_TypeUsers()) {
    if (!(user.getAssignedType() instanceof ImpliedNode) && user.getRequiredType() == null) {
      if (user.getAssignedType().getLibrary() != versionedLib2)       LOGGER.debug("String_Node_Str" + user + "String_Node_Str"+ ((Node)user.getAssignedType()).getNameWithPrefix());
      assertTrue("String_Node_Str",user.getAssignedType().getLibrary() == versionedLib2);
    }
  }
}