Program: 60760
Project: 60760
Buggy source:
private void pageSetup(){
  ((SyncopeApplication)getApplication()).setupNavigationPane(this,xmlRolesReader,version);
  feedbackPanel=new FeedbackPanel("String_Node_Str");
  feedbackPanel.setOutputMarkupId(true);
  add(feedbackPanel);
  final String kind=getClass().getSimpleName().toLowerCase();
  final Component kindIcon=get(kind);
  if (kindIcon != null) {
    kindIcon.add(new Behavior(){
      private static final long serialVersionUID=1469628524240283489L;
      @Override public void onComponentTag(      final Component component,      final ComponentTag tag){
        tag.put("String_Node_Str",kind);
      }
    }
);
    add(kindIcon);
  }
  final ModalWindow editProfileModalWin=new ModalWindow("String_Node_Str");
  editProfileModalWin.setCssClassName(ModalWindow.CSS_CLASS_GRAY);
  editProfileModalWin.setInitialHeight(EDIT_PROFILE_WIN_HEIGHT);
  editProfileModalWin.setInitialWidth(EDIT_PROFILE_WIN_WIDTH);
  editProfileModalWin.setCookieName("String_Node_Str");
  add(editProfileModalWin);
  add(new Label("String_Node_Str",SyncopeSession.get().getUserId()));
  Fragment editProfileFrag;
  if ("String_Node_Str".equals(SyncopeSession.get().getUserId())) {
    editProfileFrag=new Fragment("String_Node_Str","String_Node_Str",this);
  }
 else {
    final UserTO userTO=SyncopeSession.get().isAuthenticated() ? profileRestClient.readProfile() : new UserTO();
    editProfileFrag=new Fragment("String_Node_Str","String_Node_Str",this);
    AjaxLink editProfileLink=new IndicatingAjaxLink("String_Node_Str"){
      private static final long serialVersionUID=-7978723352517770644L;
      @Override public void onClick(      final AjaxRequestTarget target){
        editProfileModalWin.setPageCreator(new ModalWindow.PageCreator(){
          @Override public Page createPage(){
            return new UserModalPage(BasePage.this.getPageReference(),editProfileModalWin,userTO,UserModalPage.Mode.SELF);
          }
        }
);
        editProfileModalWin.show(target);
      }
    }
;
    editProfileLink.add(new Label("String_Node_Str",getString("String_Node_Str")));
    Panel panel=new LinkPanel("String_Node_Str",new ResourceModel("String_Node_Str"));
    panel.add(editProfileLink);
    editProfileFrag.add(panel);
  }
  add(editProfileFrag);
}

Fixed version (ground truth):
private void pageSetup(){
  ((SyncopeApplication)getApplication()).setupNavigationPane(this,xmlRolesReader,true,version);
  feedbackPanel=new FeedbackPanel("String_Node_Str");
  feedbackPanel.setOutputMarkupId(true);
  add(feedbackPanel);
  final String kind=getClass().getSimpleName().toLowerCase();
  final BookmarkablePageLink kindLink=(BookmarkablePageLink)get(kind);
  kindLink.add(new Behavior(){
    private static final long serialVersionUID=1469628524240283489L;
    @Override public void onComponentTag(    final Component component,    final ComponentTag tag){
      tag.put("String_Node_Str",kind);
    }
  }
);
  Component kindIcon=kindLink.get(0);
  if (kindIcon != null) {
    kindIcon.add(new Behavior(){
      private static final long serialVersionUID=1469628524240283489L;
      @Override public void onComponentTag(      final Component component,      final ComponentTag tag){
        tag.put("String_Node_Str","String_Node_Str" + SyncopeApplication.IMG_PREFIX + kind+ SyncopeApplication.IMG_SUFFIX);
      }
    }
);
  }
  final ModalWindow editProfileModalWin=new ModalWindow("String_Node_Str");
  editProfileModalWin.setCssClassName(ModalWindow.CSS_CLASS_GRAY);
  editProfileModalWin.setInitialHeight(EDIT_PROFILE_WIN_HEIGHT);
  editProfileModalWin.setInitialWidth(EDIT_PROFILE_WIN_WIDTH);
  editProfileModalWin.setCookieName("String_Node_Str");
  add(editProfileModalWin);
  add(new Label("String_Node_Str",SyncopeSession.get().getUserId()));
  Fragment editProfileFrag;
  if ("String_Node_Str".equals(SyncopeSession.get().getUserId())) {
    editProfileFrag=new Fragment("String_Node_Str","String_Node_Str",this);
  }
 else {
    final UserTO userTO=SyncopeSession.get().isAuthenticated() ? profileRestClient.readProfile() : new UserTO();
    editProfileFrag=new Fragment("String_Node_Str","String_Node_Str",this);
    AjaxLink editProfileLink=new IndicatingAjaxLink("String_Node_Str"){
      private static final long serialVersionUID=-7978723352517770644L;
      @Override public void onClick(      final AjaxRequestTarget target){
        editProfileModalWin.setPageCreator(new ModalWindow.PageCreator(){
          @Override public Page createPage(){
            return new UserModalPage(BasePage.this.getPageReference(),editProfileModalWin,userTO,UserModalPage.Mode.SELF);
          }
        }
);
        editProfileModalWin.show(target);
      }
    }
;
    editProfileLink.add(new Label("String_Node_Str",getString("String_Node_Str")));
    Panel panel=new LinkPanel("String_Node_Str",new ResourceModel("String_Node_Str"));
    panel.add(editProfileLink);
    editProfileFrag.add(panel);
  }
  add(editProfileFrag);
}