Program: 35633
Project: 35633
Buggy source:
@Override public void initModelView(Object model){
  if (model instanceof ProjectModelDTO) {
    ngoGrid.setVisible(true);
    fundingGrid.setVisible(true);
    partnerGrid.setVisible(true);
    fundingGrid.setVisible(true);
    partnerGrid.setVisible(true);
    name.enable();
    statusList.enable();
    saveButton.enable();
    ngoGrid.setVisible(true);
    fundingGrid.setVisible(true);
    partnerGrid.setVisible(true);
    radioGroup.setFireChangeEventOnSetValue(true);
    isProject=true;
    currentProjectModel=(ProjectModelDTO)model;
    if (currentProjectModel != null) {
      name.setValue(currentProjectModel.getName());
      statusList.setSimpleValue(ProjectModelStatus.getName(currentProjectModel.getStatus()));
      Log.debug("String_Node_Str" + ProjectModelStatus.getName(currentProjectModel.getStatus()));
      currentProjectModel.getStatus();
      ProjectModelType type=currentProjectModel.getVisibility(cache.getOrganizationCache().getOrganization().getId());
switch (type) {
case NGO:
        ngoRadio.setValue(true);
      fundingRadio.setValue(false);
    partnerRadio.setValue(false);
  currentModelType=ProjectModelType.NGO;
break;
case FUNDING:
ngoRadio.setValue(false);
fundingRadio.setValue(true);
partnerRadio.setValue(false);
currentModelType=ProjectModelType.FUNDING;
break;
case LOCAL_PARTNER:
ngoRadio.setValue(false);
fundingRadio.setValue(false);
partnerRadio.setValue(true);
currentModelType=ProjectModelType.LOCAL_PARTNER;
break;
}
}
}
 else if (model instanceof OrgUnitModelDTO) {
isProject=false;
titleField.show();
hasBudgetCheckBox.show();
canContainProjectsCheckBox.show();
titleField.disable();
hasBudgetCheckBox.disable();
canContainProjectsCheckBox.disable();
statusList.enable();
radioGroup.setFireChangeEventOnSetValue(true);
saveButton.enable();
titleField.enable();
hasBudgetCheckBox.enable();
canContainProjectsCheckBox.enable();
currentOrgUnitModel=(OrgUnitModelDTO)model;
if (currentOrgUnitModel != null) {
name.setValue(currentOrgUnitModel.getName());
statusList.setSimpleValue(ProjectModelStatus.getName(currentOrgUnitModel.getStatus()));
titleField.setValue(currentOrgUnitModel.getTitle());
hasBudgetCheckBox.setValue(currentOrgUnitModel.getHasBudget());
canContainProjectsCheckBox.setValue(currentOrgUnitModel.getCanContainProjects());
Log.debug("String_Node_Str" + currentOrgUnitModel.getName() + "String_Node_Str"+ ProjectModelStatus.getName(currentOrgUnitModel.getStatus()));
}
}
}

Fixed version (ground truth):
@Override public void initModelView(Object model){
  if (model instanceof ProjectModelDTO) {
    ngoGrid.setVisible(true);
    fundingGrid.setVisible(true);
    partnerGrid.setVisible(true);
    fundingGrid.setVisible(true);
    partnerGrid.setVisible(true);
    name.enable();
    statusList.enable();
    saveButton.enable();
    ngoGrid.setVisible(true);
    fundingGrid.setVisible(true);
    partnerGrid.setVisible(true);
    radioGroup.setFireChangeEventOnSetValue(true);
    isProject=true;
    currentProjectModel=(ProjectModelDTO)model;
    if (currentProjectModel != null) {
      name.setValue(currentProjectModel.getName());
      statusList.setSimpleValue(ProjectModelStatus.getName(currentProjectModel.getStatus()));
      Log.debug("String_Node_Str" + ProjectModelStatus.getName(currentProjectModel.getStatus()));
      currentProjectModel.getStatus();
      ProjectModelType type=currentProjectModel.getVisibility(cache.getOrganizationCache().getOrganization().getId());
switch (type) {
case NGO:
        ngoRadio.setValue(true);
      fundingRadio.setValue(false);
    partnerRadio.setValue(false);
  currentModelType=ProjectModelType.NGO;
break;
case FUNDING:
ngoRadio.setValue(false);
fundingRadio.setValue(true);
partnerRadio.setValue(false);
currentModelType=ProjectModelType.FUNDING;
break;
case LOCAL_PARTNER:
ngoRadio.setValue(false);
fundingRadio.setValue(false);
partnerRadio.setValue(true);
currentModelType=ProjectModelType.LOCAL_PARTNER;
break;
}
}
}
 else if (model instanceof OrgUnitModelDTO) {
isProject=false;
titleField.show();
hasBudgetCheckBox.show();
canContainProjectsCheckBox.show();
titleField.disable();
hasBudgetCheckBox.disable();
canContainProjectsCheckBox.disable();
name.enable();
statusList.enable();
radioGroup.setFireChangeEventOnSetValue(true);
saveButton.enable();
titleField.enable();
hasBudgetCheckBox.enable();
canContainProjectsCheckBox.enable();
currentOrgUnitModel=(OrgUnitModelDTO)model;
if (currentOrgUnitModel != null) {
name.setValue(currentOrgUnitModel.getName());
statusList.setSimpleValue(ProjectModelStatus.getName(currentOrgUnitModel.getStatus()));
titleField.setValue(currentOrgUnitModel.getTitle());
hasBudgetCheckBox.setValue(currentOrgUnitModel.getHasBudget());
canContainProjectsCheckBox.setValue(currentOrgUnitModel.getCanContainProjects());
Log.debug("String_Node_Str" + currentOrgUnitModel.getName() + "String_Node_Str"+ ProjectModelStatus.getName(currentOrgUnitModel.getStatus()));
}
}
}