Program: 60853
Project: 60853
Buggy source:
public PoliciesPanel(final String id,final PolicyType policyType){
  super(id);
  this.policyType=policyType;
  final ModalWindow mwindow=new ModalWindow("String_Node_Str");
  mwindow.setCssClassName(ModalWindow.CSS_CLASS_GRAY);
  mwindow.setInitialHeight(MODAL_WIN_HEIGHT);
  mwindow.setInitialWidth(MODAL_WIN_WIDTH);
  mwindow.setCookieName("String_Node_Str");
  add(mwindow);
  final WebMarkupContainer container=new WebMarkupContainer("String_Node_Str");
  container.setOutputMarkupId(true);
  add(container);
  setWindowClosedCallback(mwindow,container);
  final List<IColumn> columns=new ArrayList<IColumn>();
  columns.add(new PropertyColumn(new ResourceModel("String_Node_Str"),"String_Node_Str","String_Node_Str"));
  columns.add(new PropertyColumn(new ResourceModel("String_Node_Str"),"String_Node_Str","String_Node_Str"));
  columns.add(new PropertyColumn(new ResourceModel("String_Node_Str"),"String_Node_Str","String_Node_Str"));
  columns.add(new AbstractColumn<PolicyTO>(new ResourceModel("String_Node_Str")){
    private static final long serialVersionUID=2054811145491901166L;
    @Override public void populateItem(    final Item<ICellPopulator<PolicyTO>> cellItem,    final String componentId,    final IModel<PolicyTO> model){
      final PolicyTO accountPolicyTO=model.getObject();
      AjaxLink editLink=new IndicatingAjaxLink("String_Node_Str"){
        private static final long serialVersionUID=-7978723352517770644L;
        @Override public void onClick(        AjaxRequestTarget target){
          mwindow.setPageCreator(new ModalWindow.PageCreator(){
            private static final long serialVersionUID=-7834632442532690940L;
            @Override public Page createPage(){
              final PolicyModalPage page=new PolicyModalPage(mwindow,accountPolicyTO);
              return page;
            }
          }
);
          mwindow.show(target);
        }
      }
;
      final EditLinkPanel panel=new EditLinkPanel(componentId,model);
      panel.add(editLink);
      MetaDataRoleAuthorizationStrategy.authorize(panel,ENABLE,xmlRolesReader.getAllAllowedRoles("String_Node_Str","String_Node_Str"));
      cellItem.add(panel);
    }
  }
);
  columns.add(new AbstractColumn<PolicyTO>(new ResourceModel("String_Node_Str")){
    private static final long serialVersionUID=2054811145491901166L;
    @Override public void populateItem(    final Item<ICellPopulator<PolicyTO>> cellItem,    final String componentId,    final IModel<PolicyTO> model){
      final PolicyTO accountPolicyTO=model.getObject();
      AjaxLink deleteLink=new IndicatingDeleteOnConfirmAjaxLink("String_Node_Str"){
        private static final long serialVersionUID=-7978723352517770644L;
        @Override public void onClick(        final AjaxRequestTarget target){
          try {
            policyRestClient.delete(accountPolicyTO.getId());
            info(getString("String_Node_Str"));
          }
 catch (          SyncopeClientCompositeErrorException e) {
            error(getString("String_Node_Str"));
            LOG.error("String_Node_Str",new Object[]{accountPolicyTO.getId(),accountPolicyTO.getDescription()},e);
          }
          target.add(container);
          target.add(getPage().get("String_Node_Str"));
        }
      }
;
      final DeleteLinkPanel panel=new DeleteLinkPanel(componentId,model);
      panel.add(deleteLink);
      MetaDataRoleAuthorizationStrategy.authorize(panel,ENABLE,xmlRolesReader.getAllAllowedRoles("String_Node_Str","String_Node_Str"));
      cellItem.add(panel);
    }
  }
);
  final AjaxFallbackDefaultDataTable table=new AjaxFallbackDefaultDataTable("String_Node_Str",columns,new PolicyDataProvider(),paginatorRows);
  container.add(table);
  final IndicatingAjaxLink createButton=new IndicatingAjaxLink("String_Node_Str"){
    private static final long serialVersionUID=-7978723352517770644L;
    @Override public void onClick(    final AjaxRequestTarget target){
      mwindow.setPageCreator(new ModalWindow.PageCreator(){
        private static final long serialVersionUID=-7834632442532690940L;
        @Override public Page createPage(){
          final PolicyModalPage page=new PolicyModalPage(mwindow,getPolicyTOInstance(policyType));
          return page;
        }
      }
);
      mwindow.show(target);
    }
  }
;
  add(createButton);
  MetaDataRoleAuthorizationStrategy.authorize(createButton,ENABLE,xmlRolesReader.getAllAllowedRoles("String_Node_Str","String_Node_Str"));
  final Form paginatorForm=new Form("String_Node_Str");
  final DropDownChoice rowsChooser=new DropDownChoice("String_Node_Str",new PropertyModel(this,"String_Node_Str"),prefMan.getPaginatorChoices());
  rowsChooser.add(new AjaxFormComponentUpdatingBehavior("String_Node_Str"){
    private static final long serialVersionUID=-1107858522700306810L;
    @Override protected void onUpdate(    final AjaxRequestTarget target){
      prefMan.set(getWebRequest(),(WebResponse)getResponse(),Constants.PREF_POLICY_PAGINATOR_ROWS,String.valueOf(paginatorRows));
      table.setItemsPerPage(paginatorRows);
      target.add(container);
    }
  }
);
  paginatorForm.add(rowsChooser);
  add(paginatorForm);
}

Fixed version (ground truth):
public PoliciesPanel(final String id,final PolicyType policyType){
  super(id);
  this.policyType=policyType;
  final ModalWindow mwindow=new ModalWindow("String_Node_Str");
  mwindow.setCssClassName(ModalWindow.CSS_CLASS_GRAY);
  mwindow.setInitialHeight(MODAL_WIN_HEIGHT);
  mwindow.setInitialWidth(MODAL_WIN_WIDTH);
  mwindow.setCookieName("String_Node_Str");
  add(mwindow);
  final WebMarkupContainer container=new WebMarkupContainer("String_Node_Str");
  container.setOutputMarkupId(true);
  add(container);
  setWindowClosedCallback(mwindow,container);
  final List<IColumn> columns=new ArrayList<IColumn>();
  columns.add(new PropertyColumn(new ResourceModel("String_Node_Str"),"String_Node_Str","String_Node_Str"));
  columns.add(new PropertyColumn(new ResourceModel("String_Node_Str"),"String_Node_Str","String_Node_Str"));
  columns.add(new AbstractColumn<PolicyTO>(new ResourceModel("String_Node_Str")){
    private static final long serialVersionUID=8263694778917279290L;
    @Override public void populateItem(    final Item<ICellPopulator<PolicyTO>> cellItem,    final String componentId,    final IModel<PolicyTO> model){
      cellItem.add(new Label(componentId,getString(model.getObject().getType().name())));
    }
  }
);
  columns.add(new AbstractColumn<PolicyTO>(new ResourceModel("String_Node_Str")){
    private static final long serialVersionUID=2054811145491901166L;
    @Override public void populateItem(    final Item<ICellPopulator<PolicyTO>> cellItem,    final String componentId,    final IModel<PolicyTO> model){
      final PolicyTO accountPolicyTO=model.getObject();
      AjaxLink editLink=new IndicatingAjaxLink("String_Node_Str"){
        private static final long serialVersionUID=-7978723352517770644L;
        @Override public void onClick(        final AjaxRequestTarget target){
          mwindow.setPageCreator(new ModalWindow.PageCreator(){
            private static final long serialVersionUID=-7834632442532690940L;
            @Override public Page createPage(){
              final PolicyModalPage page=new PolicyModalPage(mwindow,accountPolicyTO);
              return page;
            }
          }
);
          mwindow.show(target);
        }
      }
;
      final EditLinkPanel panel=new EditLinkPanel(componentId,model);
      panel.add(editLink);
      MetaDataRoleAuthorizationStrategy.authorize(panel,ENABLE,xmlRolesReader.getAllAllowedRoles("String_Node_Str","String_Node_Str"));
      cellItem.add(panel);
    }
  }
);
  columns.add(new AbstractColumn<PolicyTO>(new ResourceModel("String_Node_Str")){
    private static final long serialVersionUID=2054811145491901166L;
    @Override public void populateItem(    final Item<ICellPopulator<PolicyTO>> cellItem,    final String componentId,    final IModel<PolicyTO> model){
      final PolicyTO accountPolicyTO=model.getObject();
      AjaxLink deleteLink=new IndicatingDeleteOnConfirmAjaxLink("String_Node_Str"){
        private static final long serialVersionUID=-7978723352517770644L;
        @Override public void onClick(        final AjaxRequestTarget target){
          try {
            policyRestClient.delete(accountPolicyTO.getId());
            info(getString("String_Node_Str"));
          }
 catch (          SyncopeClientCompositeErrorException e) {
            error(getString("String_Node_Str"));
            LOG.error("String_Node_Str",new Object[]{accountPolicyTO.getId(),accountPolicyTO.getDescription()},e);
          }
          target.add(container);
          target.add(getPage().get("String_Node_Str"));
        }
      }
;
      final DeleteLinkPanel panel=new DeleteLinkPanel(componentId,model);
      panel.add(deleteLink);
      MetaDataRoleAuthorizationStrategy.authorize(panel,ENABLE,xmlRolesReader.getAllAllowedRoles("String_Node_Str","String_Node_Str"));
      cellItem.add(panel);
    }
  }
);
  final AjaxFallbackDefaultDataTable table=new AjaxFallbackDefaultDataTable("String_Node_Str",columns,new PolicyDataProvider(),paginatorRows);
  container.add(table);
  final IndicatingAjaxLink createButton=new IndicatingAjaxLink("String_Node_Str"){
    private static final long serialVersionUID=-7978723352517770644L;
    @Override public void onClick(    final AjaxRequestTarget target){
      mwindow.setPageCreator(new ModalWindow.PageCreator(){
        private static final long serialVersionUID=-7834632442532690940L;
        @Override public Page createPage(){
          final PolicyModalPage page=new PolicyModalPage(mwindow,getPolicyTOInstance(policyType));
          return page;
        }
      }
);
      mwindow.show(target);
    }
  }
;
  add(createButton);
  MetaDataRoleAuthorizationStrategy.authorize(createButton,ENABLE,xmlRolesReader.getAllAllowedRoles("String_Node_Str","String_Node_Str"));
  final Form paginatorForm=new Form("String_Node_Str");
  final DropDownChoice rowsChooser=new DropDownChoice("String_Node_Str",new PropertyModel(this,"String_Node_Str"),prefMan.getPaginatorChoices());
  rowsChooser.add(new AjaxFormComponentUpdatingBehavior("String_Node_Str"){
    private static final long serialVersionUID=-1107858522700306810L;
    @Override protected void onUpdate(    final AjaxRequestTarget target){
      prefMan.set(getWebRequest(),(WebResponse)getResponse(),Constants.PREF_POLICY_PAGINATOR_ROWS,String.valueOf(paginatorRows));
      table.setItemsPerPage(paginatorRows);
      target.add(container);
    }
  }
);
  paginatorForm.add(rowsChooser);
  add(paginatorForm);
}