Program: 136289
Project: 136289
Buggy source:
@Test public void updateVersionTest_BaseTypes() throws RepositoryException {
  BusinessObjectNode boType=ml.addBusinessObjectToLibrary(lib2,"String_Node_Str");
  ChoiceObjectNode choiceType=ml.addChoice(lib2,"String_Node_Str");
  CoreObjectNode coreType=ml.addCoreObjectToLibrary(lib2,"String_Node_Str");
  EnumerationClosedNode ecType=ml.addClosedEnumToLibrary(lib2,"String_Node_Str");
  EnumerationOpenNode eoType=ml.addOpenEnumToLibrary(lib2,"String_Node_Str");
  VWA_Node vwaType=ml.addVWA_ToLibrary(lib2,"String_Node_Str");
  LibraryNode userLib=lib1;
  BusinessObjectNode boExtension=ml.addBusinessObjectToLibrary(lib1,"String_Node_Str");
  boExtension.setExtension(boType);
  assertTrue("String_Node_Str",boExtension.getExtensionBase() == boType);
  ChoiceObjectNode choiceExtension=ml.addChoice(lib1,"String_Node_Str");
  choiceExtension.setExtension(choiceType);
  CoreObjectNode coreExtension=ml.addCoreObjectToLibrary(lib1,"String_Node_Str");
  coreExtension.setExtension(coreType);
  EnumerationClosedNode ecExtension=ml.addClosedEnumToLibrary(lib1,"String_Node_Str");
  ecExtension.setExtension(ecType);
  EnumerationOpenNode eoExtension=ml.addOpenEnumToLibrary(lib1,"String_Node_Str");
  eoExtension.setExtension(eoType);
  VWA_Node vwaExtension=ml.addVWA_ToLibrary(lib1,"String_Node_Str");
  vwaExtension.setExtension(vwaType);
  assertTrue("String_Node_Str",lib2.validate().isEmpty());
  providerLib=rc.createMajorVersion(lib2);
  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());
  List<LibraryNode> usedLibs=userLib.getAssignedLibraries();
  assertTrue("String_Node_Str",!usedLibs.isEmpty());
  HashMap<LibraryNode,LibraryNode> replacementMap=rc.getVersionUpdateMap(usedLibs,true);
  userLib.replaceAllUsers(replacementMap);
  for (  ExtensionOwner owner : userLib.getDescendants_ExtensionOwners()) {
    if (!(owner.getExtensionBase() instanceof ImpliedNode)) {
      if (owner.getExtensionBase().getLibrary() != providerLib)       LOGGER.debug("String_Node_Str" + owner + "String_Node_Str"+ ((Node)owner.getExtensionBase()).getNameWithPrefix());
      assertTrue("String_Node_Str",owner.getExtensionBase().getLibrary() == providerLib);
    }
  }
}

Fixed version (ground truth):
@Test public void updateVersionTest_BaseTypes() throws RepositoryException {
  BusinessObjectNode boType=ml.addBusinessObjectToLibrary(lib2,"String_Node_Str");
  ChoiceObjectNode choiceType=ml.addChoice(lib2,"String_Node_Str");
  CoreObjectNode coreType=ml.addCoreObjectToLibrary(lib2,"String_Node_Str");
  EnumerationClosedNode ecType=ml.addClosedEnumToLibrary(lib2,"String_Node_Str");
  EnumerationOpenNode eoType=ml.addOpenEnumToLibrary(lib2,"String_Node_Str");
  VWA_Node vwaType=ml.addVWA_ToLibrary(lib2,"String_Node_Str");
  BusinessObjectNode boExtension=ml.addBusinessObjectToLibrary(lib1,"String_Node_Str",false);
  boExtension.setExtension(boType);
  assertTrue("String_Node_Str",boExtension.getExtensionBase() == boType);
  ChoiceObjectNode choiceExtension=ml.addChoice(lib1,"String_Node_Str");
  choiceExtension.setExtension(choiceType);
  CoreObjectNode coreExtension=ml.addCoreObjectToLibrary(lib1,"String_Node_Str");
  coreExtension.setExtension(coreType);
  EnumerationClosedNode ecExtension=ml.addClosedEnumToLibrary(lib1,"String_Node_Str");
  ecExtension.setExtension(ecType);
  EnumerationOpenNode eoExtension=ml.addOpenEnumToLibrary(lib1,"String_Node_Str");
  eoExtension.setExtension(eoType);
  VWA_Node vwaExtension=ml.addVWA_ToLibrary(lib1,"String_Node_Str");
  vwaExtension.setExtension(vwaType);
  ValidationFindings findings1=lib1.validate();
  ValidationFindings findings2=lib2.validate();
  MockLibrary.printFindings(findings1);
  MockLibrary.printFindings(findings2);
  assertTrue("String_Node_Str",lib1.validate().isEmpty());
  assertTrue("String_Node_Str",lib2.validate().isEmpty());
  versionedLib2=rc.createMajorVersion(lib2);
  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());
  List<LibraryNode> usedLibs1=lib1.getAssignedLibraries();
  List<LibraryNode> usedLibs2=versionedLib2.getAssignedLibraries();
  assertTrue("String_Node_Str",!usedLibs2.isEmpty());
  HashMap<LibraryNode,LibraryNode> replacementMap=rc.getVersionUpdateMap(usedLibs1,true);
  lib1.replaceAllUsers(replacementMap);
  for (  ExtensionOwner owner : lib1.getDescendants_ExtensionOwners()) {
    if (!(owner.getExtensionBase() instanceof ImpliedNode)) {
      if (owner.getExtensionBase().getLibrary() != versionedLib2)       LOGGER.debug("String_Node_Str" + owner + "String_Node_Str"+ ((Node)owner.getExtensionBase()).getNameWithPrefix());
      assertTrue("String_Node_Str",owner.getExtensionBase().getLibrary() == versionedLib2);
    }
  }
}