Program: 136410
Project: 136410
Buggy source:
private void addFacet(final TLFacetType facetType){
  if (!(getSelectedNode_NavigatorView() instanceof ComponentNode))   return;
  final ComponentNode current=(ComponentNode)getSelectedNode_NavigatorView();
  if (current != null && current.isBusinessObject()) {
    final ComponentNode propertyOwner=facetType.equals(TLFacetType.CUSTOM) ? current.getDetailFacet() : current;
    String defaultContext=contextController.getDefaultContextId(current.getLibrary());
    String defaultName="String_Node_Str";
    boolean canBeEmpty=TLFacetType.QUERY.equals(facetType);
    if (TLFacetType.CUSTOM.equals(facetType)) {
      defaultName=defaultContext;
    }
    final NewFacetWizard wizard=new NewFacetWizard(propertyOwner,defaultName);
    wizard.setValidator(new NewFacetValidator(current,facetType,wizard));
    wizard.run(OtmRegistry.getActiveShell());
    if (!wizard.wasCanceled()) {
      LOGGER.info("String_Node_Str" + facetType + "String_Node_Str"+ wizard.getSelectedProperties());
      BusinessObjectNode bo=(BusinessObjectNode)current;
      if (TLFacetType.QUERY.equals(facetType) && (wizard.getName() == null || wizard.getName().isEmpty())) {
        defaultContext=null;
      }
      FacetNode newFacet=bo.addFacet(wizard.getName(),defaultContext,facetType);
      for (      final PropertyNode n : wizard.getSelectedProperties()) {
        NodeFactory.newComponentMember(newFacet,n.cloneTLObj());
      }
      refresh(bo);
    }
  }
 else {
    DialogUserNotifier.openWarning("String_Node_Str","String_Node_Str");
    LOGGER.warn("String_Node_Str" + current);
  }
}

Fixed version (ground truth):
private void addFacet(final TLFacetType facetType){
  if (!(getSelectedNode_NavigatorView() instanceof ComponentNode))   return;
  final ComponentNode current=(ComponentNode)getSelectedNode_NavigatorView();
  if (current != null && current.isBusinessObject()) {
    if (!current.getLibrary().isMajorVersion()) {
      LOGGER.debug("String_Node_Str");
      return;
    }
    final ComponentNode propertyOwner=facetType.equals(TLFacetType.CUSTOM) ? current.getDetailFacet() : current;
    String defaultContext=contextController.getDefaultContextId(current.getLibrary());
    String defaultName="String_Node_Str";
    boolean canBeEmpty=TLFacetType.QUERY.equals(facetType);
    if (TLFacetType.CUSTOM.equals(facetType)) {
      defaultName=defaultContext;
    }
    final NewFacetWizard wizard=new NewFacetWizard(propertyOwner,defaultName);
    wizard.setValidator(new NewFacetValidator(current,facetType,wizard));
    wizard.run(OtmRegistry.getActiveShell());
    if (!wizard.wasCanceled()) {
      LOGGER.info("String_Node_Str" + facetType + "String_Node_Str"+ wizard.getSelectedProperties());
      BusinessObjectNode bo=(BusinessObjectNode)current;
      if (TLFacetType.QUERY.equals(facetType) && (wizard.getName() == null || wizard.getName().isEmpty())) {
        defaultContext=null;
      }
      FacetNode newFacet=bo.addFacet(wizard.getName(),defaultContext,facetType);
      for (      final PropertyNode n : wizard.getSelectedProperties()) {
        NodeFactory.newComponentMember(newFacet,n.cloneTLObj());
      }
      refresh(bo);
    }
  }
 else {
    DialogUserNotifier.openWarning("String_Node_Str","String_Node_Str");
    LOGGER.warn("String_Node_Str" + current);
  }
}