Program: 56554
Project: 56554
Buggy source:
@Override public void doAfterCompose(Component comp) throws Exception {
  super.doAfterCompose(comp);
  boolean isEE="String_Node_Str".equals(Version.getEdition());
  UserActionManager uam=ss.getUserActionManager();
  uam.registerHandler(DefaultUserActionManagerCtrl.Category.AUXACTION.getName(),AuxAction.NEW_BOOK.getAction(),new UserActionHandler(){
    @Override public boolean process(    UserActionContext ctx){
      doOpenNewBook();
      return true;
    }
    @Override public boolean isEnabled(    Book book,    Sheet sheet){
      return true;
    }
  }
);
  uam.setHandler(DefaultUserActionManagerCtrl.Category.AUXACTION.getName(),AuxAction.SAVE_BOOK.getAction(),new UserActionHandler(){
    @Override public boolean process(    UserActionContext ctx){
      doSaveBook(false);
      return true;
    }
    @Override public boolean isEnabled(    Book book,    Sheet sheet){
      return book != null;
    }
  }
);
  if (isEE) {
    uam.setHandler(DefaultUserActionManagerCtrl.Category.AUXACTION.getName(),AuxAction.EXPORT_PDF.getAction(),new UserActionHandler(){
      @Override public boolean process(      UserActionContext ctx){
        doExportPdf();
        return true;
      }
      @Override public boolean isEnabled(      Book book,      Sheet sheet){
        return book != null;
      }
    }
);
  }
  uam.registerHandler(DefaultUserActionManagerCtrl.Category.AUXACTION.getName(),AuxAction.CLOSE_BOOK.getAction(),new UserActionHandler(){
    @Override public boolean process(    UserActionContext ctx){
      doCloseBook();
      return true;
    }
    @Override public boolean isEnabled(    Book book,    Sheet sheet){
      return book != null;
    }
  }
);
  ss.addEventListener(Events.ON_SHEET_SELECT,new EventListener<Event>(){
    @Override public void onEvent(    Event event) throws Exception {
      onSheetSelect();
    }
  }
);
  ss.addEventListener(Events.ON_AFTER_UNDOABLE_ACTION,new EventListener<Event>(){
    @Override public void onEvent(    Event event) throws Exception {
      onAfterUndoableAction();
    }
  }
);
  String bookName=null;
  Execution exec=Executions.getCurrent();
  bookName=(String)exec.getArg().get("String_Node_Str");
  if (bookName == null) {
    bookName=exec.getParameter("String_Node_Str");
  }
  BookInfo bookinfo=null;
  if (!Strings.isBlank(bookName)) {
    bookName=bookName.trim();
    for (    BookInfo info : getRepository().list()) {
      if (bookName.equals(info.getName())) {
        bookinfo=info;
        break;
      }
    }
  }
  String sheetName=Executions.getCurrent().getParameter("String_Node_Str");
  if (bookinfo != null) {
    doLoadBook(bookinfo,null,sheetName);
  }
 else {
    doOpenNewBook();
  }
}

Fixed version (ground truth):
@Override public void doAfterCompose(Component comp) throws Exception {
  super.doAfterCompose(comp);
  boolean isEE="String_Node_Str".equals(Version.getEdition());
  boolean readonly=UiUtil.isRepositoryReadonly();
  UserActionManager uam=ss.getUserActionManager();
  uam.registerHandler(DefaultUserActionManagerCtrl.Category.AUXACTION.getName(),AuxAction.NEW_BOOK.getAction(),new UserActionHandler(){
    @Override public boolean process(    UserActionContext ctx){
      doOpenNewBook();
      return true;
    }
    @Override public boolean isEnabled(    Book book,    Sheet sheet){
      return true;
    }
  }
);
  if (!readonly) {
    uam.setHandler(DefaultUserActionManagerCtrl.Category.AUXACTION.getName(),AuxAction.SAVE_BOOK.getAction(),new UserActionHandler(){
      @Override public boolean process(      UserActionContext ctx){
        doSaveBook(false);
        return true;
      }
      @Override public boolean isEnabled(      Book book,      Sheet sheet){
        return book != null;
      }
    }
);
  }
  if (isEE) {
    uam.setHandler(DefaultUserActionManagerCtrl.Category.AUXACTION.getName(),AuxAction.EXPORT_PDF.getAction(),new UserActionHandler(){
      @Override public boolean process(      UserActionContext ctx){
        doExportPdf();
        return true;
      }
      @Override public boolean isEnabled(      Book book,      Sheet sheet){
        return book != null;
      }
    }
);
  }
  uam.registerHandler(DefaultUserActionManagerCtrl.Category.AUXACTION.getName(),AuxAction.CLOSE_BOOK.getAction(),new UserActionHandler(){
    @Override public boolean process(    UserActionContext ctx){
      doCloseBook();
      return true;
    }
    @Override public boolean isEnabled(    Book book,    Sheet sheet){
      return book != null;
    }
  }
);
  ss.addEventListener(Events.ON_SHEET_SELECT,new EventListener<Event>(){
    @Override public void onEvent(    Event event) throws Exception {
      onSheetSelect();
    }
  }
);
  ss.addEventListener(Events.ON_AFTER_UNDOABLE_ACTION,new EventListener<Event>(){
    @Override public void onEvent(    Event event) throws Exception {
      onAfterUndoableAction();
    }
  }
);
  String bookName=null;
  Execution exec=Executions.getCurrent();
  bookName=(String)exec.getArg().get("String_Node_Str");
  if (bookName == null) {
    bookName=exec.getParameter("String_Node_Str");
  }
  BookInfo bookinfo=null;
  if (!Strings.isBlank(bookName)) {
    bookName=bookName.trim();
    for (    BookInfo info : getRepository().list()) {
      if (bookName.equals(info.getName())) {
        bookinfo=info;
        break;
      }
    }
  }
  String sheetName=Executions.getCurrent().getParameter("String_Node_Str");
  if (bookinfo != null) {
    doLoadBook(bookinfo,null,sheetName);
  }
 else {
    doOpenNewBook();
  }
}