Program: 89632
Project: 89632
Buggy source:
/** 
 * Test header. 
 */
public void testGenerateHeader() throws Exception {
  JspWriterMockup out=new JspWriterMockup();
  ServletRequest confRequest=makeHttpServletRequest("String_Node_Str");
  PageContext pageContext=new WebinterfaceTestCase.TestPageContext(confRequest,out,new Locale("String_Node_Str"));
  HTMLUtils.generateHeader("String_Node_Str",pageContext);
  String result=out.sw.toString();
  StringAsserts.assertStringContains("String_Node_Str","String_Node_Str",result);
  for (  SiteSection ss : SiteSection.getSections()) {
    JspWriterMockup jwm=new JspWriterMockup();
    ss.generateNavigationTree(jwm,"String_Node_Str",new Locale("String_Node_Str"));
    String tree=jwm.sw.toString();
    StringAsserts.assertStringContains("String_Node_Str",tree,result);
  }
  int i=0;
  StringTree<String> webinterfaceSettings=Settings.getTree(CommonSettings.WEBINTERFACE_SETTINGS);
  for (  StringTree<String> language : webinterfaceSettings.getSubTrees(CommonSettings.WEBINTERFACE_LANGUAGE)) {
    String locale=language.getValue(CommonSettings.WEBINTERFACE_LANGUAGE_LOCALE);
    String name=language.getValue(CommonSettings.WEBINTERFACE_LANGUAGE_NAME);
    StringAsserts.assertStringContains("String_Node_Str","String_Node_Str" + locale,result);
    StringAsserts.assertStringContains("String_Node_Str","String_Node_Str" + HTMLUtils.encodeAndEscapeHTML(name),result);
  }
  out=new JspWriterMockup();
  confRequest=makeHttpServletRequest("String_Node_Str");
  pageContext=new WebinterfaceTestCase.TestPageContext(confRequest,out,new Locale("String_Node_Str"));
  HTMLUtils.generateHeader(pageContext);
  result=out.sw.toString();
  StringAsserts.assertStringContains("String_Node_Str","String_Node_Str",result);
  out=new JspWriterMockup();
  pageContext=new WebinterfaceTestCase.TestPageContext(confRequest,out,new Locale("String_Node_Str"));
  HTMLUtils.generateHeader(pageContext);
  result=out.sw.toString();
  StringAsserts.assertStringContains("String_Node_Str","String_Node_Str",result);
}

Fixed version (ground truth):
/** 
 * Test header. 
 */
public void testGenerateHeader() throws Exception {
  JspWriterMockup out=new JspWriterMockup();
  ServletRequest confRequest=makeHttpServletRequest("String_Node_Str");
  PageContext pageContext=new WebinterfaceTestCase.TestPageContext(confRequest,out,new Locale("String_Node_Str"));
  HTMLUtils.generateHeader("String_Node_Str",pageContext);
  String result=out.sw.toString();
  StringAsserts.assertStringContains("String_Node_Str","String_Node_Str",result);
  for (  SiteSection ss : SiteSection.getSections()) {
    JspWriterMockup jwm=new JspWriterMockup();
    ss.generateNavigationTree(jwm,"String_Node_Str",new Locale("String_Node_Str"));
    String tree=jwm.sw.toString();
    StringAsserts.assertStringContains("String_Node_Str",tree,result);
  }
  StringTree<String> webinterfaceSettings=Settings.getTree(CommonSettings.WEBINTERFACE_SETTINGS);
  for (  StringTree<String> language : webinterfaceSettings.getSubTrees(CommonSettings.WEBINTERFACE_LANGUAGE)) {
    String locale=language.getValue(CommonSettings.WEBINTERFACE_LANGUAGE_LOCALE);
    String name=language.getValue(CommonSettings.WEBINTERFACE_LANGUAGE_NAME);
    StringAsserts.assertStringContains("String_Node_Str","String_Node_Str" + locale,result);
    StringAsserts.assertStringContains("String_Node_Str","String_Node_Str" + HTMLUtils.encodeAndEscapeHTML(name),result);
  }
  out=new JspWriterMockup();
  confRequest=makeHttpServletRequest("String_Node_Str");
  pageContext=new WebinterfaceTestCase.TestPageContext(confRequest,out,new Locale("String_Node_Str"));
  HTMLUtils.generateHeader(pageContext);
  result=out.sw.toString();
  StringAsserts.assertStringContains("String_Node_Str","String_Node_Str",result);
  out=new JspWriterMockup();
  pageContext=new WebinterfaceTestCase.TestPageContext(confRequest,out,new Locale("String_Node_Str"));
  HTMLUtils.generateHeader(pageContext);
  result=out.sw.toString();
  StringAsserts.assertStringContains("String_Node_Str","String_Node_Str",result);
}