Program: 35638
Project: 35638
Buggy source:
@Inject public AdminOneModelView(UserLocalCache cache,Dispatcher dispatcher){
  this.dispatcher=dispatcher;
  this.cache=cache;
  final HBoxLayout hPanelLayout=new HBoxLayout();
  hPanelLayout.setHBoxLayoutAlign(HBoxLayout.HBoxLayoutAlign.STRETCH);
  topPanel=new ContentPanel(hPanelLayout);
  topPanel.setHeaderVisible(false);
  topPanel.setWidth(1200);
  topPanel.setBorders(true);
  topLeftFormPanel=new FormPanel();
  topLeftFormPanel.setWidth(300);
  topLeftFormPanel.setHeaderVisible(false);
  topCenterFormPanel=new FormPanel();
  topCenterFormPanel.setWidth(300);
  topCenterFormPanel.setHeaderVisible(false);
  topRightFormPanel=new FormPanel();
  topRightFormPanel.setWidth(600);
  topRightFormPanel.setHeaderVisible(false);
  name=new TextField<String>();
  name.disable();
  name.setAllowBlank(false);
  name.setFieldLabel(I18N.CONSTANTS.adminProjectModelsName());
  statusList=new SimpleComboBox<String>();
  statusList.disable();
  statusList.setFieldLabel(I18N.CONSTANTS.adminProjectModelsStatus());
  statusList.setAllowBlank(false);
  statusList.setTriggerAction(TriggerAction.ALL);
  List<String> values=new ArrayList<String>();
  for (  ProjectModelStatus e : ProjectModelStatus.values()) {
    if (!ProjectModelStatus.USED.equals(e))     values.add(ProjectModelStatus.getName(e));
  }
  statusList.add(values);
  statusList.addListener(Events.Select,new Listener<BaseEvent>(){
    @Override public void handleEvent(    BaseEvent be){
      if (statusList.getValue() != null && !ProjectModelStatus.getName(ProjectModelStatus.DRAFT).equals(statusList.getValue().getValue())) {
        if (isProject) {
          MessageBox.confirm(I18N.MESSAGES.adminModelStatusChangeBox(),I18N.MESSAGES.adminModelStatusChange(ProjectModelStatus.getName(currentProjectModel.getStatus()),statusList.getValue().getValue()),new Listener<MessageBoxEvent>(){
            @Override public void handleEvent(            MessageBoxEvent be){
              if (Dialog.NO.equals(be.getButtonClicked().getItemId())) {
                statusList.setSimpleValue(ProjectModelStatus.getName(currentProjectModel.getStatus()));
              }
            }
          }
);
        }
 else {
          MessageBox.confirm(I18N.MESSAGES.adminModelStatusChangeBox(),I18N.MESSAGES.adminModelStatusChange(ProjectModelStatus.getName(currentOrgUnitModel.getStatus()),statusList.getValue().getValue()),new Listener<MessageBoxEvent>(){
            @Override public void handleEvent(            MessageBoxEvent be){
              if (Dialog.YES.equals(be.getButtonClicked().getItemId())) {
                statusList.setSimpleValue(ProjectModelStatus.getName(currentOrgUnitModel.getStatus()));
              }
            }
          }
);
        }
      }
    }
  }
);
  radioGroup=new RadioGroup("String_Node_Str");
  ngoRadio=new Radio();
  ngoRadio.setFireChangeEventOnSetValue(true);
  ngoRadio.setValue(true);
  ngoRadio.setFieldLabel(ProjectModelType.getName(ProjectModelType.NGO));
  ngoRadio.addStyleName("String_Node_Str");
  final WidgetComponent ngoIcon=new WidgetComponent(FundingIconProvider.getProjectTypeIcon(ProjectModelType.NGO,IconSize.SMALL).createImage());
  ngoIcon.addStyleName("String_Node_Str");
  final Label ngoLabel=new Label(ProjectModelType.getName(ProjectModelType.NGO));
  ngoLabel.addStyleName("String_Node_Str");
  ngoLabel.addStyleName("String_Node_Str");
  ngoLabel.addClickHandler(new ClickHandler(){
    @Override public void onClick(    ClickEvent event){
      currentModelType=ProjectModelType.NGO;
      ngoRadio.setValue(true);
      fundingRadio.setValue(false);
      partnerRadio.setValue(false);
    }
  }
);
  fundingRadio=new Radio();
  fundingRadio.setFireChangeEventOnSetValue(true);
  fundingRadio.setFieldLabel(ProjectModelType.getName(ProjectModelType.FUNDING));
  fundingRadio.addStyleName("String_Node_Str");
  final WidgetComponent fundingIcon=new WidgetComponent(FundingIconProvider.getProjectTypeIcon(ProjectModelType.FUNDING,IconSize.SMALL).createImage());
  fundingIcon.addStyleName("String_Node_Str");
  final Label fundingLabel=new Label(ProjectModelType.getName(ProjectModelType.FUNDING));
  fundingLabel.addStyleName("String_Node_Str");
  fundingLabel.addStyleName("String_Node_Str");
  fundingLabel.addClickHandler(new ClickHandler(){
    @Override public void onClick(    ClickEvent event){
      ngoRadio.setValue(false);
      fundingRadio.setValue(true);
      currentModelType=ProjectModelType.FUNDING;
      partnerRadio.setValue(false);
    }
  }
);
  partnerRadio=new Radio();
  partnerRadio.setFireChangeEventOnSetValue(true);
  partnerRadio.setFieldLabel(ProjectModelType.getName(ProjectModelType.LOCAL_PARTNER));
  partnerRadio.addStyleName("String_Node_Str");
  final WidgetComponent partnerIcon=new WidgetComponent(FundingIconProvider.getProjectTypeIcon(ProjectModelType.LOCAL_PARTNER,IconSize.SMALL).createImage());
  partnerIcon.addStyleName("String_Node_Str");
  final Label partnerLabel=new Label(ProjectModelType.getName(ProjectModelType.LOCAL_PARTNER));
  partnerLabel.addStyleName("String_Node_Str");
  partnerLabel.addStyleName("String_Node_Str");
  partnerLabel.addClickHandler(new ClickHandler(){
    @Override public void onClick(    ClickEvent event){
      ngoRadio.setValue(false);
      fundingRadio.setValue(false);
      partnerRadio.setValue(true);
      currentModelType=ProjectModelType.LOCAL_PARTNER;
    }
  }
);
  radioGroup.add(ngoRadio);
  radioGroup.add(fundingRadio);
  radioGroup.add(partnerRadio);
  ngoGrid=new Grid(1,3);
  ngoGrid.setVisible(false);
  ngoGrid.setBorderWidth(0);
  ngoGrid.setWidget(0,0,ngoIcon);
  ngoGrid.setWidget(0,1,ngoRadio);
  ngoGrid.setWidget(0,2,AdminUtil.createGridText(ProjectModelType.getName(ProjectModelType.NGO)));
  topCenterFormPanel.add(ngoGrid);
  fundingGrid=new Grid(1,3);
  fundingGrid.setVisible(false);
  fundingGrid.setBorderWidth(0);
  fundingGrid.setWidget(0,0,fundingIcon);
  fundingGrid.setWidget(0,1,fundingRadio);
  fundingGrid.setWidget(0,2,AdminUtil.createGridText(ProjectModelType.getName(ProjectModelType.FUNDING)));
  topCenterFormPanel.add(fundingGrid);
  partnerGrid=new Grid(1,3);
  partnerGrid.setVisible(false);
  partnerGrid.setBorderWidth(0);
  partnerGrid.setWidget(0,0,partnerIcon);
  partnerGrid.setWidget(0,1,partnerRadio);
  partnerGrid.setWidget(0,2,AdminUtil.createGridText(ProjectModelType.getName(ProjectModelType.LOCAL_PARTNER)));
  topCenterFormPanel.add(partnerGrid);
  titleField=new TextField<String>();
  titleField.setFieldLabel(I18N.CONSTANTS.adminOrgUnitsModelTitle());
  titleField.setAllowBlank(false);
  titleField.hide();
  topLeftFormPanel.add(name);
  topLeftFormPanel.add(titleField);
  topLeftFormPanel.add(statusList);
  hasBudgetCheckBox=new CheckBox();
  hasBudgetCheckBox.hide();
  hasBudgetCheckBox.setBoxLabel(I18N.CONSTANTS.adminOrgUnitsModelHasBudget());
  hasBudgetCheckBox.setFieldLabel("String_Node_Str");
  hasBudgetCheckBox.setLabelSeparator("String_Node_Str");
  hasBudgetCheckBox.setValue(false);
  topCenterFormPanel.add(hasBudgetCheckBox);
  canContainProjectsCheckBox=new CheckBox();
  canContainProjectsCheckBox.hide();
  canContainProjectsCheckBox.setBoxLabel(I18N.CONSTANTS.adminOrgUnitsModelContainProjects());
  canContainProjectsCheckBox.setFieldLabel("String_Node_Str");
  canContainProjectsCheckBox.setLabelSeparator("String_Node_Str");
  canContainProjectsCheckBox.setValue(false);
  topCenterFormPanel.add(canContainProjectsCheckBox);
  for (  final ProjectModelType type : ProjectModelType.values()) {
    getRadioFilter(type).addListener(Events.Change,new Listener<FieldEvent>(){
      @Override public void handleEvent(      FieldEvent be){
        if (Boolean.TRUE.equals(be.getValue())) {
          currentModelType=type;
        }
      }
    }
);
  }
  final BorderLayoutData topLayoutData=new BorderLayoutData(LayoutRegion.NORTH,150);
  topLayoutData.setCollapsible(true);
  topLayoutData.setMargins(new Margins(BORDER / 2,0,BORDER / 2,0));
  final BorderLayout borderLayout=new BorderLayout();
  setLayout(borderLayout);
  tabPanelParameters=new TabPanel();
  tabPanelParameters.setPlain(true);
  panelSelectedTab=new LayoutContainer(new BorderLayout());
  panelSelectedTab.setBorders(false);
  panelSelectedTab.addStyleName("String_Node_Str");
  final BorderLayoutData centerData=new BorderLayoutData(LayoutRegion.CENTER);
  centerData.setMargins(new Margins(0,0,4,4));
  saveButton=new Button(I18N.CONSTANTS.save());
  saveButton.disable();
  saveButton.addListener(Events.OnClick,new Listener<ButtonEvent>(){
    @Override public void handleEvent(    ButtonEvent be){
      updateModel();
    }
  }
);
  topRightFormPanel.add(saveButton);
  topPanel.add(topLeftFormPanel,new HBoxLayoutData(0,4,0,4));
  topPanel.add(topCenterFormPanel,new HBoxLayoutData(0,4,0,4));
  topPanel.add(topRightFormPanel,new HBoxLayoutData(0,4,0,4));
  add(tabPanelParameters,centerData);
  add(topPanel,topLayoutData);
}

Fixed version (ground truth):
@Inject public AdminOneModelView(UserLocalCache cache,Dispatcher dispatcher){
  this.dispatcher=dispatcher;
  this.cache=cache;
  final HBoxLayout hPanelLayout=new HBoxLayout();
  hPanelLayout.setHBoxLayoutAlign(HBoxLayout.HBoxLayoutAlign.STRETCH);
  topPanel=new ContentPanel(hPanelLayout);
  topPanel.setHeaderVisible(false);
  topPanel.setWidth(1200);
  topPanel.setBorders(true);
  topLeftFormPanel=new FormPanel();
  topLeftFormPanel.setWidth(300);
  topLeftFormPanel.setHeaderVisible(false);
  topCenterFormPanel=new FormPanel();
  topCenterFormPanel.setWidth(300);
  topCenterFormPanel.setHeaderVisible(false);
  topRightFormPanel=new FormPanel();
  topRightFormPanel.setWidth(600);
  topRightFormPanel.setHeaderVisible(false);
  name=new TextField<String>();
  name.disable();
  name.setAllowBlank(false);
  name.setFieldLabel(I18N.CONSTANTS.adminProjectModelsName());
  statusList=new SimpleComboBox<String>();
  statusList.disable();
  statusList.setFieldLabel(I18N.CONSTANTS.adminProjectModelsStatus());
  statusList.setAllowBlank(false);
  statusList.setTriggerAction(TriggerAction.ALL);
  List<String> values=new ArrayList<String>();
  for (  ProjectModelStatus e : ProjectModelStatus.values()) {
    if (!ProjectModelStatus.USED.equals(e))     values.add(ProjectModelStatus.getName(e));
  }
  statusList.add(values);
  statusList.addListener(Events.Select,new Listener<BaseEvent>(){
    @Override public void handleEvent(    BaseEvent be){
      if (statusList.getValue() != null && !ProjectModelStatus.getName(ProjectModelStatus.DRAFT).equals(statusList.getValue().getValue())) {
        if (isProject) {
          MessageBox.confirm(I18N.MESSAGES.adminModelStatusChangeBox(),I18N.MESSAGES.adminModelStatusChange(ProjectModelStatus.getName(currentProjectModel.getStatus()),statusList.getValue().getValue()),new Listener<MessageBoxEvent>(){
            @Override public void handleEvent(            MessageBoxEvent be){
              if (Dialog.NO.equals(be.getButtonClicked().getItemId())) {
                statusList.setSimpleValue(ProjectModelStatus.getName(currentProjectModel.getStatus()));
              }
            }
          }
);
        }
 else {
          MessageBox.confirm(I18N.MESSAGES.adminModelStatusChangeBox(),I18N.MESSAGES.adminModelStatusChange(ProjectModelStatus.getName(currentOrgUnitModel.getStatus()),statusList.getValue().getValue()),new Listener<MessageBoxEvent>(){
            @Override public void handleEvent(            MessageBoxEvent be){
              if (Dialog.NO.equals(be.getButtonClicked().getItemId())) {
                statusList.setSimpleValue(ProjectModelStatus.getName(currentOrgUnitModel.getStatus()));
              }
            }
          }
);
        }
      }
    }
  }
);
  radioGroup=new RadioGroup("String_Node_Str");
  ngoRadio=new Radio();
  ngoRadio.setFireChangeEventOnSetValue(true);
  ngoRadio.setValue(true);
  ngoRadio.setFieldLabel(ProjectModelType.getName(ProjectModelType.NGO));
  ngoRadio.addStyleName("String_Node_Str");
  final WidgetComponent ngoIcon=new WidgetComponent(FundingIconProvider.getProjectTypeIcon(ProjectModelType.NGO,IconSize.SMALL).createImage());
  ngoIcon.addStyleName("String_Node_Str");
  final Label ngoLabel=new Label(ProjectModelType.getName(ProjectModelType.NGO));
  ngoLabel.addStyleName("String_Node_Str");
  ngoLabel.addStyleName("String_Node_Str");
  ngoLabel.addClickHandler(new ClickHandler(){
    @Override public void onClick(    ClickEvent event){
      currentModelType=ProjectModelType.NGO;
      ngoRadio.setValue(true);
      fundingRadio.setValue(false);
      partnerRadio.setValue(false);
    }
  }
);
  fundingRadio=new Radio();
  fundingRadio.setFireChangeEventOnSetValue(true);
  fundingRadio.setFieldLabel(ProjectModelType.getName(ProjectModelType.FUNDING));
  fundingRadio.addStyleName("String_Node_Str");
  final WidgetComponent fundingIcon=new WidgetComponent(FundingIconProvider.getProjectTypeIcon(ProjectModelType.FUNDING,IconSize.SMALL).createImage());
  fundingIcon.addStyleName("String_Node_Str");
  final Label fundingLabel=new Label(ProjectModelType.getName(ProjectModelType.FUNDING));
  fundingLabel.addStyleName("String_Node_Str");
  fundingLabel.addStyleName("String_Node_Str");
  fundingLabel.addClickHandler(new ClickHandler(){
    @Override public void onClick(    ClickEvent event){
      ngoRadio.setValue(false);
      fundingRadio.setValue(true);
      currentModelType=ProjectModelType.FUNDING;
      partnerRadio.setValue(false);
    }
  }
);
  partnerRadio=new Radio();
  partnerRadio.setFireChangeEventOnSetValue(true);
  partnerRadio.setFieldLabel(ProjectModelType.getName(ProjectModelType.LOCAL_PARTNER));
  partnerRadio.addStyleName("String_Node_Str");
  final WidgetComponent partnerIcon=new WidgetComponent(FundingIconProvider.getProjectTypeIcon(ProjectModelType.LOCAL_PARTNER,IconSize.SMALL).createImage());
  partnerIcon.addStyleName("String_Node_Str");
  final Label partnerLabel=new Label(ProjectModelType.getName(ProjectModelType.LOCAL_PARTNER));
  partnerLabel.addStyleName("String_Node_Str");
  partnerLabel.addStyleName("String_Node_Str");
  partnerLabel.addClickHandler(new ClickHandler(){
    @Override public void onClick(    ClickEvent event){
      ngoRadio.setValue(false);
      fundingRadio.setValue(false);
      partnerRadio.setValue(true);
      currentModelType=ProjectModelType.LOCAL_PARTNER;
    }
  }
);
  radioGroup.add(ngoRadio);
  radioGroup.add(fundingRadio);
  radioGroup.add(partnerRadio);
  ngoGrid=new Grid(1,3);
  ngoGrid.setVisible(false);
  ngoGrid.setBorderWidth(0);
  ngoGrid.setWidget(0,0,ngoIcon);
  ngoGrid.setWidget(0,1,ngoRadio);
  ngoGrid.setWidget(0,2,AdminUtil.createGridText(ProjectModelType.getName(ProjectModelType.NGO)));
  topCenterFormPanel.add(ngoGrid);
  fundingGrid=new Grid(1,3);
  fundingGrid.setVisible(false);
  fundingGrid.setBorderWidth(0);
  fundingGrid.setWidget(0,0,fundingIcon);
  fundingGrid.setWidget(0,1,fundingRadio);
  fundingGrid.setWidget(0,2,AdminUtil.createGridText(ProjectModelType.getName(ProjectModelType.FUNDING)));
  topCenterFormPanel.add(fundingGrid);
  partnerGrid=new Grid(1,3);
  partnerGrid.setVisible(false);
  partnerGrid.setBorderWidth(0);
  partnerGrid.setWidget(0,0,partnerIcon);
  partnerGrid.setWidget(0,1,partnerRadio);
  partnerGrid.setWidget(0,2,AdminUtil.createGridText(ProjectModelType.getName(ProjectModelType.LOCAL_PARTNER)));
  topCenterFormPanel.add(partnerGrid);
  titleField=new TextField<String>();
  titleField.setFieldLabel(I18N.CONSTANTS.adminOrgUnitsModelTitle());
  titleField.setAllowBlank(false);
  titleField.hide();
  topLeftFormPanel.add(name);
  topLeftFormPanel.add(titleField);
  topLeftFormPanel.add(statusList);
  hasBudgetCheckBox=new CheckBox();
  hasBudgetCheckBox.hide();
  hasBudgetCheckBox.setBoxLabel(I18N.CONSTANTS.adminOrgUnitsModelHasBudget());
  hasBudgetCheckBox.setFieldLabel("String_Node_Str");
  hasBudgetCheckBox.setLabelSeparator("String_Node_Str");
  hasBudgetCheckBox.setValue(false);
  topCenterFormPanel.add(hasBudgetCheckBox);
  canContainProjectsCheckBox=new CheckBox();
  canContainProjectsCheckBox.hide();
  canContainProjectsCheckBox.setBoxLabel(I18N.CONSTANTS.adminOrgUnitsModelContainProjects());
  canContainProjectsCheckBox.setFieldLabel("String_Node_Str");
  canContainProjectsCheckBox.setLabelSeparator("String_Node_Str");
  canContainProjectsCheckBox.setValue(false);
  topCenterFormPanel.add(canContainProjectsCheckBox);
  for (  final ProjectModelType type : ProjectModelType.values()) {
    getRadioFilter(type).addListener(Events.Change,new Listener<FieldEvent>(){
      @Override public void handleEvent(      FieldEvent be){
        if (Boolean.TRUE.equals(be.getValue())) {
          currentModelType=type;
        }
      }
    }
);
  }
  final BorderLayoutData topLayoutData=new BorderLayoutData(LayoutRegion.NORTH,150);
  topLayoutData.setCollapsible(true);
  topLayoutData.setMargins(new Margins(BORDER / 2,0,BORDER / 2,0));
  final BorderLayout borderLayout=new BorderLayout();
  setLayout(borderLayout);
  tabPanelParameters=new TabPanel();
  tabPanelParameters.setPlain(true);
  panelSelectedTab=new LayoutContainer(new BorderLayout());
  panelSelectedTab.setBorders(false);
  panelSelectedTab.addStyleName("String_Node_Str");
  final BorderLayoutData centerData=new BorderLayoutData(LayoutRegion.CENTER);
  centerData.setMargins(new Margins(0,0,4,4));
  saveButton=new Button(I18N.CONSTANTS.save());
  saveButton.disable();
  saveButton.addListener(Events.OnClick,new Listener<ButtonEvent>(){
    @Override public void handleEvent(    ButtonEvent be){
      updateModel();
    }
  }
);
  topRightFormPanel.add(saveButton);
  topPanel.add(topLeftFormPanel,new HBoxLayoutData(0,4,0,4));
  topPanel.add(topCenterFormPanel,new HBoxLayoutData(0,4,0,4));
  topPanel.add(topRightFormPanel,new HBoxLayoutData(0,4,0,4));
  add(tabPanelParameters,centerData);
  add(topPanel,topLayoutData);
}