Program: 102481
Project: 102481
Buggy source:
public void invokeGetBindingBean(Object bean) throws Exception {
  super.invokeGetBindingBean(bean);
  TreeNode pageNode=(TreeNode)bean;
  String icon=pageNode.getIcon();
  if (icon == null || icon.length() < 0)   icon="String_Node_Str";
  getChild(UIFormInputIconSelector.class).setSelectedIcon(icon);
  getUIStringInput(LABEL).setValue(pageNode.getLabel());
  Map<Locale,Described.State> i18nizedLabels=pageNode.getI18nizedLabels();
  if (i18nizedLabels != null) {
    for (    Locale key : i18nizedLabels.keySet()) {
      String locale=key.getCountry() != "String_Node_Str" ? key.getLanguage() + "String_Node_Str" + key.getCountry() : key.getLanguage();
      cachedLabels.put(locale,i18nizedLabels.get(key));
    }
  }
  if (cachedLabels.get(selectedLocale) != null) {
    getUIStringInput(I18N_LABEL).setValue(cachedLabels.get(selectedLocale).getName());
  }
  if (pageNode.getVisibility() == Visibility.SYSTEM) {
    UIFormInputSet uiSettingSet=getChildById("String_Node_Str");
    uiSettingSet.removeChildById(VISIBLE);
    uiSettingSet.removeChildById(SHOW_PUBLICATION_DATE);
    uiSettingSet.removeChildById(START_PUBLICATION_DATE);
    uiSettingSet.removeChildById(END_PUBLICATION_DATE);
  }
 else {
    Visibility visibility=pageNode.getVisibility();
    boolean isVisible=visibility == null || EnumSet.of(Visibility.DISPLAYED,Visibility.TEMPORAL).contains(visibility);
    getUICheckBoxInput(VISIBLE).setChecked(isVisible);
    getUICheckBoxInput(SHOW_PUBLICATION_DATE).setChecked(Visibility.TEMPORAL.equals(visibility));
    setShowCheckPublicationDate(isVisible);
    Calendar cal=Calendar.getInstance();
    if (pageNode.getStartPublicationTime() != -1) {
      cal.setTime(new Date(pageNode.getStartPublicationTime()));
      getUIFormDateTimeInput(START_PUBLICATION_DATE).setCalendar(cal);
    }
 else     getUIFormDateTimeInput(START_PUBLICATION_DATE).setValue(null);
    if (pageNode.getEndPublicationTime() != -1) {
      cal.setTime(new Date(pageNode.getEndPublicationTime()));
      getUIFormDateTimeInput(END_PUBLICATION_DATE).setCalendar(cal);
    }
 else     getUIFormDateTimeInput(END_PUBLICATION_DATE).setValue(null);
  }
  boolean isExtendedMode=true;
  if (pageNode.getNode().getLabel() != null && pageNode.getNode().getLabel().trim().length() > 0) {
    isExtendedMode=false;
  }
  getUICheckBoxInput(SWITCH_MODE).setChecked(isExtendedMode);
  this.switchLabelMode(isExtendedMode);
}

Fixed version (ground truth):
public void invokeGetBindingBean(Object bean) throws Exception {
  super.invokeGetBindingBean(bean);
  TreeNode pageNode=(TreeNode)bean;
  String icon=pageNode.getIcon();
  if (icon == null || icon.length() < 0)   icon="String_Node_Str";
  getChild(UIFormInputIconSelector.class).setSelectedIcon(icon);
  getUIStringInput(LABEL).setValue(pageNode.getLabel());
  Map<Locale,Described.State> i18nizedLabels=pageNode.getI18nizedLabels();
  if (i18nizedLabels != null) {
    for (    Locale key : i18nizedLabels.keySet()) {
      String locale=!("String_Node_Str".equals(key.getCountry())) ? key.getLanguage() + "String_Node_Str" + key.getCountry() : key.getLanguage();
      cachedLabels.put(locale,i18nizedLabels.get(key));
    }
  }
  if (cachedLabels.get(selectedLocale) != null) {
    getUIStringInput(I18N_LABEL).setValue(cachedLabels.get(selectedLocale).getName());
  }
  if (pageNode.getVisibility() == Visibility.SYSTEM) {
    UIFormInputSet uiSettingSet=getChildById("String_Node_Str");
    uiSettingSet.removeChildById(VISIBLE);
    uiSettingSet.removeChildById(SHOW_PUBLICATION_DATE);
    uiSettingSet.removeChildById(START_PUBLICATION_DATE);
    uiSettingSet.removeChildById(END_PUBLICATION_DATE);
  }
 else {
    Visibility visibility=pageNode.getVisibility();
    boolean isVisible=visibility == null || EnumSet.of(Visibility.DISPLAYED,Visibility.TEMPORAL).contains(visibility);
    getUICheckBoxInput(VISIBLE).setChecked(isVisible);
    getUICheckBoxInput(SHOW_PUBLICATION_DATE).setChecked(Visibility.TEMPORAL.equals(visibility));
    setShowCheckPublicationDate(isVisible);
    Calendar cal=Calendar.getInstance();
    if (pageNode.getStartPublicationTime() != -1) {
      cal.setTime(new Date(pageNode.getStartPublicationTime()));
      getUIFormDateTimeInput(START_PUBLICATION_DATE).setCalendar(cal);
    }
 else     getUIFormDateTimeInput(START_PUBLICATION_DATE).setValue(null);
    if (pageNode.getEndPublicationTime() != -1) {
      cal.setTime(new Date(pageNode.getEndPublicationTime()));
      getUIFormDateTimeInput(END_PUBLICATION_DATE).setCalendar(cal);
    }
 else     getUIFormDateTimeInput(END_PUBLICATION_DATE).setValue(null);
  }
  boolean isExtendedMode=true;
  if (pageNode.getNode().getLabel() != null && pageNode.getNode().getLabel().trim().length() > 0) {
    isExtendedMode=false;
  }
  getUICheckBoxInput(SWITCH_MODE).setChecked(isExtendedMode);
  this.switchLabelMode(isExtendedMode);
}