Program: 101107
Project: 101107
Buggy source:
public void initSEOForm(PageMetadataModel pageModel) throws Exception {
  if (pageModel != null) {
    description=pageModel.getDescription();
    keywords=pageModel.getKeywords();
    frequency=pageModel.getFrequency();
    if (pageModel.getPriority() >= 0)     priority=String.valueOf(pageModel.getPriority());
    if (pageModel.getRobotsContent() != null && pageModel.getRobotsContent().length() > 0) {
      index=pageModel.getRobotsContent().split("String_Node_Str")[0];
      follow=pageModel.getRobotsContent().split("String_Node_Str")[1];
    }
    sitemap=pageModel.getSitemap();
  }
  ExoContainer container=ExoContainerContext.getCurrentContainer();
  SEOService seoService=(SEOService)container.getComponentInstanceOfType(SEOService.class);
  UIFormTextAreaInput uiDescription=new UIFormTextAreaInput(DESCRIPTION,DESCRIPTION,null);
  uiDescription.setValue(description);
  addUIFormInput(uiDescription);
  UIFormTextAreaInput uiKeywords=new UIFormTextAreaInput(KEYWORDS,KEYWORDS,null);
  uiKeywords.setValue(keywords);
  addUIFormInput(uiKeywords);
  if (!onContent) {
    List<SelectItemOption<String>> robotIndexItemOptions=new ArrayList<SelectItemOption<String>>();
    String robotsindexOptions=seoService.getRobotsIndexOptions();
    String robotsfollowOptions=seoService.getRobotsFollowOptions();
    String frequencyOptions=seoService.getFrequencyOptions();
    if (robotsindexOptions != null && robotsindexOptions.length() > 0) {
      String[] arrOptions=robotsindexOptions.split("String_Node_Str");
      for (int i=0; i < arrOptions.length; i++) {
        robotIndexItemOptions.add(new SelectItemOption<String>((arrOptions[i])));
      }
    }
    UIFormSelectBox robots_index=new UIFormSelectBox(ROBOTS_INDEX,null,robotIndexItemOptions);
    if (index != null && index.length() > 0)     robots_index.setValue(index);
 else     robots_index.setValue(ROBOTS_INDEX);
    addUIFormInput(robots_index);
    List<SelectItemOption<String>> robotFollowItemOptions=new ArrayList<SelectItemOption<String>>();
    if (robotsfollowOptions != null && robotsfollowOptions.length() > 0) {
      String[] arrOptions=robotsfollowOptions.split("String_Node_Str");
      for (int i=0; i < arrOptions.length; i++) {
        robotFollowItemOptions.add(new SelectItemOption<String>((arrOptions[i])));
      }
    }
    UIFormSelectBox robots_follow=new UIFormSelectBox(ROBOTS_FOLLOW,null,robotFollowItemOptions);
    if (follow != null && follow.length() > 0)     robots_follow.setValue(follow);
 else     robots_follow.setValue(ROBOTS_FOLLOW);
    addUIFormInput(robots_follow);
    UICheckBoxInput visibleSitemapCheckbox=new UICheckBoxInput(SITEMAP,SITEMAP,null);
    visibleSitemapCheckbox.setChecked(sitemap);
    addUIFormInput(visibleSitemapCheckbox);
    UIFormStringInput uiPrority=new UIFormStringInput(PRIORITY,null);
    if (priority == null || priority.length() == 0) {
      WebuiRequestContext rc=WebuiRequestContext.getCurrentInstance();
      priority=rc.getApplicationResourceBundle().getString("String_Node_Str");
    }
    uiPrority.setValue(priority);
    addUIFormInput(uiPrority.addValidator(FloatNumberValidator.class));
    List<SelectItemOption<String>> frequencyItemOptions=new ArrayList<SelectItemOption<String>>();
    if (frequencyOptions != null && frequencyOptions.length() > 0) {
      String[] arrOptions=frequencyOptions.split("String_Node_Str");
      for (int i=0; i < arrOptions.length; i++) {
        frequencyItemOptions.add(new SelectItemOption<String>(arrOptions[i],(arrOptions[i])));
      }
    }
    UIFormSelectBox frequencySelectbox=new UIFormSelectBox(FREQUENCY,null,frequencyItemOptions);
    if (frequency != null && frequency.length() > 0)     frequencySelectbox.setValue(frequency);
 else     frequencySelectbox.setValue(FREQUENCY_DEFAULT_VALUE);
    addUIFormInput(frequencySelectbox);
  }
}

Fixed version (ground truth):
public void initSEOForm(PageMetadataModel pageModel) throws Exception {
  if (pageModel != null) {
    description=pageModel.getDescription();
    keywords=pageModel.getKeywords();
    frequency=pageModel.getFrequency();
    if (pageModel.getPriority() >= 0)     priority=String.valueOf(pageModel.getPriority());
    if (pageModel.getRobotsContent() != null && pageModel.getRobotsContent().length() > 0) {
      index=pageModel.getRobotsContent().split("String_Node_Str")[0];
      follow=pageModel.getRobotsContent().split("String_Node_Str")[1];
    }
    sitemap=pageModel.getSitemap();
  }
  ExoContainer container=ExoContainerContext.getCurrentContainer();
  SEOService seoService=(SEOService)container.getComponentInstanceOfType(SEOService.class);
  UIFormTextAreaInput uiDescription=new UIFormTextAreaInput(DESCRIPTION,DESCRIPTION,null);
  uiDescription.setValue(description);
  addUIFormInput(uiDescription);
  UIFormTextAreaInput uiKeywords=new UIFormTextAreaInput(KEYWORDS,KEYWORDS,null);
  uiKeywords.setValue(keywords);
  addUIFormInput(uiKeywords);
  if (!onContent) {
    List<SelectItemOption<String>> robotIndexItemOptions=new ArrayList<SelectItemOption<String>>();
    List<String> robotsindexOptions=seoService.getRobotsIndexOptions();
    List<String> robotsfollowOptions=seoService.getRobotsFollowOptions();
    List<String> frequencyOptions=seoService.getFrequencyOptions();
    if (robotsindexOptions != null && robotsindexOptions.size() > 0) {
      for (int i=0; i < robotsindexOptions.size(); i++) {
        robotIndexItemOptions.add(new SelectItemOption<String>((robotsindexOptions.get(i).toString())));
      }
    }
    UIFormSelectBox robots_index=new UIFormSelectBox(ROBOTS_INDEX,null,robotIndexItemOptions);
    if (index != null && index.length() > 0)     robots_index.setValue(index);
 else     robots_index.setValue(ROBOTS_INDEX);
    addUIFormInput(robots_index);
    List<SelectItemOption<String>> robotFollowItemOptions=new ArrayList<SelectItemOption<String>>();
    if (robotsfollowOptions != null && robotsfollowOptions.size() > 0) {
      for (int i=0; i < robotsfollowOptions.size(); i++) {
        robotFollowItemOptions.add(new SelectItemOption<String>((robotsfollowOptions.get(i).toString())));
      }
    }
    UIFormSelectBox robots_follow=new UIFormSelectBox(ROBOTS_FOLLOW,null,robotFollowItemOptions);
    if (follow != null && follow.length() > 0)     robots_follow.setValue(follow);
 else     robots_follow.setValue(ROBOTS_FOLLOW);
    addUIFormInput(robots_follow);
    UICheckBoxInput visibleSitemapCheckbox=new UICheckBoxInput(SITEMAP,SITEMAP,null);
    visibleSitemapCheckbox.setChecked(sitemap);
    addUIFormInput(visibleSitemapCheckbox);
    UIFormStringInput uiPrority=new UIFormStringInput(PRIORITY,null);
    if (priority == null || priority.length() == 0) {
      WebuiRequestContext rc=WebuiRequestContext.getCurrentInstance();
      priority=rc.getApplicationResourceBundle().getString("String_Node_Str");
    }
    uiPrority.setValue(priority);
    addUIFormInput(uiPrority.addValidator(FloatNumberValidator.class));
    List<SelectItemOption<String>> frequencyItemOptions=new ArrayList<SelectItemOption<String>>();
    if (frequencyOptions != null && frequencyOptions.size() > 0) {
      for (int i=0; i < frequencyOptions.size(); i++) {
        frequencyItemOptions.add(new SelectItemOption<String>(frequencyOptions.get(i).toString(),(frequencyOptions.get(i).toString())));
      }
    }
    UIFormSelectBox frequencySelectbox=new UIFormSelectBox(FREQUENCY,null,frequencyItemOptions);
    if (frequency != null && frequency.length() > 0)     frequencySelectbox.setValue(frequency);
 else     frequencySelectbox.setValue(FREQUENCY_DEFAULT_VALUE);
    addUIFormInput(frequencySelectbox);
  }
}