Program: 60526
Project: 60526
Buggy source:
public Roles(final PageParameters parameters){
  super(parameters);
  roleTabsContainer=new WebMarkupContainer("String_Node_Str");
  roleTabsContainer.setOutputMarkupId(true);
  add(roleTabsContainer);
  editRoleWin=new ModalWindow("String_Node_Str");
  editRoleWin.setCssClassName(ModalWindow.CSS_CLASS_GRAY);
  editRoleWin.setInitialHeight(WIN_HEIGHT);
  editRoleWin.setInitialWidth(WIN_WIDTH);
  editRoleWin.setCookieName("String_Node_Str");
  add(editRoleWin);
  final TreeRolePanel treePanel=new TreeRolePanel("String_Node_Str");
  treePanel.setOutputMarkupId(true);
  roleTabsContainer.add(treePanel);
  final RoleSummaryPanel summaryPanel=new RoleSummaryPanel.Builder("String_Node_Str").window(editRoleWin).callerPageRef(Roles.this.getPageReference()).build();
  roleTabsContainer.add(summaryPanel);
  editRoleWin.setWindowClosedCallback(new ModalWindow.WindowClosedCallback(){
    private static final long serialVersionUID=8804221891699487139L;
    @Override public void onClose(    final AjaxRequestTarget target){
      final RoleSummaryPanel summaryPanel=(RoleSummaryPanel)roleTabsContainer.get("String_Node_Str");
      final TreeNodeClickUpdate data=new TreeNodeClickUpdate(target,summaryPanel == null || summaryPanel.getSelectedNode() == null ? 0 : summaryPanel.getSelectedNode().getId());
      send(getPage(),Broadcast.BREADTH,data);
      if (modalResult) {
        getSession().info(getString(Constants.OPERATION_SUCCEEDED));
        feedbackPanel.refresh(target);
        modalResult=false;
      }
    }
  }
);
  final AbstractSearchResultPanel searchResult=new RoleSearchResultPanel("String_Node_Str",true,null,getPageReference(),restClient);
  add(searchResult);
  final Form searchForm=new Form("String_Node_Str");
  add(searchForm);
  final RoleSearchPanel searchPanel=new RoleSearchPanel.Builder("String_Node_Str").build();
  searchForm.add(searchPanel);
  searchForm.add(new ClearIndicatingAjaxButton("String_Node_Str",new ResourceModel("String_Node_Str"),getPageReference()){
    private static final long serialVersionUID=-958724007591692537L;
    @Override protected void onSubmitInternal(    final AjaxRequestTarget target,    final Form<?> form){
      final String fiql=searchPanel.buildFIQL();
      LOG.debug("String_Node_Str",fiql);
      doSearch(target,fiql,searchResult);
      Session.get().getFeedbackMessages().clear();
      searchPanel.getSearchFeedback().refresh(target);
    }
    @Override protected void onError(    final AjaxRequestTarget target,    final Form<?> form){
      searchPanel.getSearchFeedback().refresh(target);
    }
  }
);
}

Fixed version (ground truth):
public Roles(final PageParameters parameters){
  super(parameters);
  roleTabsContainer=new WebMarkupContainer("String_Node_Str");
  roleTabsContainer.setOutputMarkupId(true);
  add(roleTabsContainer);
  editRoleWin=new ModalWindow("String_Node_Str");
  editRoleWin.setCssClassName(ModalWindow.CSS_CLASS_GRAY);
  editRoleWin.setInitialHeight(WIN_HEIGHT);
  editRoleWin.setInitialWidth(WIN_WIDTH);
  editRoleWin.setCookieName("String_Node_Str");
  add(editRoleWin);
  final TreeRolePanel treePanel=new TreeRolePanel("String_Node_Str");
  treePanel.setOutputMarkupId(true);
  roleTabsContainer.add(treePanel);
  final RoleSummaryPanel summaryPanel=new RoleSummaryPanel.Builder("String_Node_Str").window(editRoleWin).callerPageRef(Roles.this.getPageReference()).build();
  roleTabsContainer.add(summaryPanel);
  editRoleWin.setWindowClosedCallback(new ModalWindow.WindowClosedCallback(){
    private static final long serialVersionUID=8804221891699487139L;
    @Override public void onClose(    final AjaxRequestTarget target){
      final RoleSummaryPanel summaryPanel=(RoleSummaryPanel)roleTabsContainer.get("String_Node_Str");
      final TreeNodeClickUpdate data=new TreeNodeClickUpdate(target,summaryPanel == null || summaryPanel.getSelectedNode() == null ? 0 : summaryPanel.getSelectedNode().getId());
      send(getPage(),Broadcast.BREADTH,data);
      if (modalResult) {
        getSession().info(getString(Constants.OPERATION_SUCCEEDED));
        feedbackPanel.refresh(target);
        modalResult=false;
      }
    }
  }
);
  final AbstractSearchResultPanel searchResult=new RoleSearchResultPanel("String_Node_Str",true,null,getPageReference(),restClient);
  add(searchResult);
  final Form searchForm=new Form("String_Node_Str");
  add(searchForm);
  final RoleSearchPanel searchPanel=new RoleSearchPanel.Builder("String_Node_Str").build();
  searchForm.add(searchPanel);
  final ClearIndicatingAjaxButton searchButton=new ClearIndicatingAjaxButton("String_Node_Str",new ResourceModel("String_Node_Str"),getPageReference()){
    private static final long serialVersionUID=-958724007591692537L;
    @Override protected void onSubmitInternal(    final AjaxRequestTarget target,    final Form<?> form){
      final String fiql=searchPanel.buildFIQL();
      LOG.debug("String_Node_Str",fiql);
      doSearch(target,fiql,searchResult);
      Session.get().getFeedbackMessages().clear();
      searchPanel.getSearchFeedback().refresh(target);
    }
    @Override protected void onError(    final AjaxRequestTarget target,    final Form<?> form){
      searchPanel.getSearchFeedback().refresh(target);
    }
  }
;
  searchForm.add(searchButton);
  searchForm.setDefaultButton(searchButton);
}