Program: 35425
Project: 35425
Buggy source:
private void loadElement(){
  GetGlobalContactExportSettings settingsCommand=new GetGlobalContactExportSettings(auth().getOrganizationId(),true);
  dispatch.execute(settingsCommand,new CommandResultHandler<GlobalContactExportSettingsDTO>(){
    @Override public void onCommandFailure(    Throwable caught){
      N10N.warn(I18N.CONSTANTS.globalExportConfiguration(),I18N.CONSTANTS.serverError());
    }
    @Override public void onCommandSuccess(    GlobalContactExportSettingsDTO result){
      if (result.getExportFormat() != null) {
switch (result.getExportFormat()) {
case XLS:
          view.getExcelChoice().setValue(true);
        break;
case ODS:
      view.getCalcChoice().setValue(true);
    break;
}
}
view.getModelsStore().add(result.getContactModelsDTO());
view.getModelsStore().commitChanges();
if (((ExportContactsSettingView)view).exportScheduleMap.get(result.getAutoExportFrequency()) != null || ((ExportContactsSettingView)view).monthScheduleMap.get(result.getAutoExportFrequency()) != null || ((ExportContactsSettingView)view).weekScheduleMap.get(result.getAutoExportFrequency()) != null) {
if (result.getAutoExportFrequency() >= 31 && result.getAutoExportFrequency() <= 58) {
  view.getExportSchedulesBox().setValue(((ExportContactsSettingView)view).exportScheduleMap.get(31));
  view.getExportMonthlySchedulesBox().show();
  view.getExportMonthlySchedulesBox().setValue(((ExportContactsSettingView)view).monthScheduleMap.get(result.getAutoExportFrequency()));
}
 else if (result.getAutoExportFrequency() >= 61 && result.getAutoExportFrequency() <= 67) {
  view.getExportSchedulesBox().setValue(((ExportContactsSettingView)view).exportScheduleMap.get(61));
  view.getExportWeeklySchedulesBox().show();
  view.getExportWeeklySchedulesBox().setValue(((ExportContactsSettingView)view).weekScheduleMap.get(result.getAutoExportFrequency()));
}
 else {
  view.getExportSchedulesBox().setValue(((ExportContactsSettingView)view).exportScheduleMap.get(result.getAutoExportFrequency()));
}
}
if (((ExportContactsSettingView)view).deleteScheduleMap.get(result.getAutoDeleteFrequency()) != null) {
view.getDeleteSchedulesBox().setValue(((ExportContactsSettingView)view).deleteScheduleMap.get(result.getAutoDeleteFrequency()));
}
}
}
,new LoadingMask(view.getPanel(),I18N.CONSTANTS.loading()));
}

Fixed version (ground truth):
private void loadElement(){
  GetGlobalContactExportSettings settingsCommand=new GetGlobalContactExportSettings(auth().getOrganizationId(),true);
  dispatch.execute(settingsCommand,new CommandResultHandler<GlobalContactExportSettingsDTO>(){
    @Override public void onCommandFailure(    Throwable caught){
      N10N.warn(I18N.CONSTANTS.globalContactsExportConfiguration(),I18N.CONSTANTS.serverError());
    }
    @Override public void onCommandSuccess(    GlobalContactExportSettingsDTO result){
      if (result.getExportFormat() != null) {
switch (result.getExportFormat()) {
case XLS:
          view.getExcelChoice().setValue(true);
        break;
case ODS:
      view.getCalcChoice().setValue(true);
    break;
}
}
view.getModelsStore().add(result.getContactModelsDTO());
view.getModelsStore().commitChanges();
if (((ExportContactsSettingView)view).exportScheduleMap.get(result.getAutoExportFrequency()) != null || ((ExportContactsSettingView)view).monthScheduleMap.get(result.getAutoExportFrequency()) != null || ((ExportContactsSettingView)view).weekScheduleMap.get(result.getAutoExportFrequency()) != null) {
if (result.getAutoExportFrequency() >= 31 && result.getAutoExportFrequency() <= 58) {
  view.getExportSchedulesBox().setValue(((ExportContactsSettingView)view).exportScheduleMap.get(31));
  view.getExportMonthlySchedulesBox().show();
  view.getExportMonthlySchedulesBox().setValue(((ExportContactsSettingView)view).monthScheduleMap.get(result.getAutoExportFrequency()));
}
 else if (result.getAutoExportFrequency() >= 61 && result.getAutoExportFrequency() <= 67) {
  view.getExportSchedulesBox().setValue(((ExportContactsSettingView)view).exportScheduleMap.get(61));
  view.getExportWeeklySchedulesBox().show();
  view.getExportWeeklySchedulesBox().setValue(((ExportContactsSettingView)view).weekScheduleMap.get(result.getAutoExportFrequency()));
}
 else {
  view.getExportSchedulesBox().setValue(((ExportContactsSettingView)view).exportScheduleMap.get(result.getAutoExportFrequency()));
}
}
if (((ExportContactsSettingView)view).deleteScheduleMap.get(result.getAutoDeleteFrequency()) != null) {
view.getDeleteSchedulesBox().setValue(((ExportContactsSettingView)view).deleteScheduleMap.get(result.getAutoDeleteFrequency()));
}
}
}
,new LoadingMask(view.getPanel(),I18N.CONSTANTS.loading()));
}