Program: 60972
Project: 60972
Buggy source:
public STaskModalPage(final ModalWindow window,final SyncTaskTO taskTO){
  super(window,taskTO);
  final IModel<List<String>> allResources=new LoadableDetachableModel<List<String>>(){
    private static final long serialVersionUID=5275935387613157437L;
    @Override protected List<String> load(){
      final List<String> resourceNames=new ArrayList<String>();
      for (      ResourceTO resourceTO : resourceRestClient.getAllResources()) {
        resourceNames.add(resourceTO.getName());
      }
      return resourceNames;
    }
  }
;
  final IModel<Map<Long,String>> allRoles=new LoadableDetachableModel<Map<Long,String>>(){
    private static final long serialVersionUID=-2012833443695917883L;
    @Override protected Map<Long,String> load(){
      final Map<Long,String> allRoles=new HashMap<Long,String>();
      List<RoleTO> roles=roleRestClient.getAllRoles();
      if (roles != null) {
        for (        RoleTO role : roles) {
          allRoles.put(role.getId(),role.getName());
        }
      }
      return allRoles;
    }
  }
;
  final AjaxDropDownChoicePanel<String> resource=new AjaxDropDownChoicePanel<String>("String_Node_Str",getString("String_Node_Str"),new PropertyModel(taskTO,"String_Node_Str"),false);
  resource.setChoices(allResources.getObject());
  resource.setChoiceRenderer(new SelectChoiceRenderer());
  resource.addRequiredLabel();
  resource.setEnabled(taskTO.getId() == 0);
  resource.setStyleShet("String_Node_Str");
  profile.add(resource);
  final AjaxCheckBoxPanel updates=new AjaxCheckBoxPanel("String_Node_Str",getString("String_Node_Str"),new PropertyModel<Boolean>(taskTO,"String_Node_Str"),false);
  profile.add(updates);
  final AjaxPalettePanel defaultResources=new AjaxPalettePanel("String_Node_Str",new PropertyModel(taskTO,"String_Node_Str"),new ListModel<String>(allResources.getObject()));
  form.add(defaultResources);
  final AjaxPalettePanel<Long> defaultRoles=new AjaxPalettePanel<Long>("String_Node_Str",new PropertyModel(taskTO,"String_Node_Str"),new ListModel<Long>(new ArrayList<Long>(allRoles.getObject().keySet())),new ChoiceRenderer<Long>(){
    private static final long serialVersionUID=8463000788871139550L;
    @Override public String getDisplayValue(    Long id){
      return allRoles.getObject().get(id);
    }
    @Override public String getIdValue(    Long id,    int index){
      return id.toString();
    }
  }
);
  form.add(defaultRoles);
}

Fixed version (ground truth):
public STaskModalPage(final ModalWindow window,final SyncTaskTO taskTO){
  super(window,taskTO);
  final IModel<List<String>> allResources=new LoadableDetachableModel<List<String>>(){
    private static final long serialVersionUID=5275935387613157437L;
    @Override protected List<String> load(){
      final List<String> resourceNames=new ArrayList<String>();
      for (      ResourceTO resourceTO : resourceRestClient.getAllResources()) {
        resourceNames.add(resourceTO.getName());
      }
      return resourceNames;
    }
  }
;
  final IModel<Map<Long,String>> allRoles=new LoadableDetachableModel<Map<Long,String>>(){
    private static final long serialVersionUID=-2012833443695917883L;
    @Override protected Map<Long,String> load(){
      final Map<Long,String> allRoles=new HashMap<Long,String>();
      List<RoleTO> roles=roleRestClient.getAllRoles();
      if (roles != null) {
        for (        RoleTO role : roles) {
          allRoles.put(role.getId(),role.getName());
        }
      }
      return allRoles;
    }
  }
;
  final AjaxDropDownChoicePanel<String> resource=new AjaxDropDownChoicePanel<String>("String_Node_Str",getString("String_Node_Str"),new PropertyModel(taskTO,"String_Node_Str"),false);
  resource.setChoices(allResources.getObject());
  resource.setChoiceRenderer(new SelectChoiceRenderer());
  resource.addRequiredLabel();
  resource.setEnabled(taskTO.getId() == 0);
  resource.setStyleShet("String_Node_Str");
  profile.add(resource);
  final AjaxCheckBoxPanel creates=new AjaxCheckBoxPanel("String_Node_Str",getString("String_Node_Str"),new PropertyModel<Boolean>(taskTO,"String_Node_Str"),false);
  profile.add(creates);
  final AjaxCheckBoxPanel updates=new AjaxCheckBoxPanel("String_Node_Str",getString("String_Node_Str"),new PropertyModel<Boolean>(taskTO,"String_Node_Str"),false);
  profile.add(updates);
  final AjaxCheckBoxPanel deletes=new AjaxCheckBoxPanel("String_Node_Str",getString("String_Node_Str"),new PropertyModel<Boolean>(taskTO,"String_Node_Str"),false);
  profile.add(deletes);
  final AjaxPalettePanel defaultResources=new AjaxPalettePanel("String_Node_Str",new PropertyModel(taskTO,"String_Node_Str"),new ListModel<String>(allResources.getObject()));
  form.add(defaultResources);
  final AjaxPalettePanel<Long> defaultRoles=new AjaxPalettePanel<Long>("String_Node_Str",new PropertyModel(taskTO,"String_Node_Str"),new ListModel<Long>(new ArrayList<Long>(allRoles.getObject().keySet())),new ChoiceRenderer<Long>(){
    private static final long serialVersionUID=8463000788871139550L;
    @Override public String getDisplayValue(    Long id){
      return allRoles.getObject().get(id);
    }
    @Override public String getIdValue(    Long id,    int index){
      return id.toString();
    }
  }
);
  form.add(defaultRoles);
}