Program: 60237
Project: 60237
Buggy source:
private void assertBasicXmlEscaper(CharEscaper xmlEscaper,boolean shouldEscapeQuotes){
  assertEquals("String_Node_Str",xmlEscaper.escape("String_Node_Str"));
  assertEquals("String_Node_Str",xmlEscaper.escape("String_Node_Str"));
  assertEquals("String_Node_Str",xmlEscaper.escape("String_Node_Str"));
  assertEquals("String_Node_Str",xmlEscaper.escape("String_Node_Str"));
  assertEquals("String_Node_Str",xmlEscaper.escape("String_Node_Str"));
  String s="String_Node_Str" + "String_Node_Str" + "String_Node_Str"+ "String_Node_Str";
  assertEquals(s,xmlEscaper.escape(s));
  for (char ch=0; ch < 0x20; ch++) {
    if (ch == '\t' || ch == '\n' || ch == '\r') {
      assertUnescaped(xmlEscaper,ch);
    }
 else {
      assertEscaping(xmlEscaper,"String_Node_Str",ch);
    }
  }
  for (char ch=0x20; ch <= 0xFFFD; ch++) {
    if (ch == '&') {
      assertEscaping(xmlEscaper,"String_Node_Str",ch);
    }
 else     if (ch == '<') {
      assertEscaping(xmlEscaper,"String_Node_Str",ch);
    }
 else     if (ch == '>') {
      assertEscaping(xmlEscaper,"String_Node_Str",ch);
    }
 else     if (shouldEscapeQuotes && ch == '\'') {
      assertEscaping(xmlEscaper,"String_Node_Str",ch);
    }
 else     if (shouldEscapeQuotes && ch == '"') {
      assertEscaping(xmlEscaper,"String_Node_Str",ch);
    }
 else {
      String input=String.valueOf(ch);
      String escaped=xmlEscaper.escape(input);
      assertEquals("String_Node_Str" + Integer.toString(ch,16) + "String_Node_Str",input,escaped);
    }
  }
  assertUnescaped(xmlEscaper,'\uFFFE');
  assertUnescaped(xmlEscaper,'\uFFFF');
}

Fixed version (ground truth):
private void assertBasicXmlEscaper(CharEscaper xmlEscaper,boolean shouldEscapeQuotes,boolean shouldEscapeWhitespaceChars){
  assertEquals("String_Node_Str",xmlEscaper.escape("String_Node_Str"));
  assertEquals("String_Node_Str",xmlEscaper.escape("String_Node_Str"));
  assertEquals("String_Node_Str",xmlEscaper.escape("String_Node_Str"));
  assertEquals("String_Node_Str",xmlEscaper.escape("String_Node_Str"));
  assertEquals("String_Node_Str",xmlEscaper.escape("String_Node_Str"));
  String s="String_Node_Str" + "String_Node_Str" + "String_Node_Str"+ "String_Node_Str";
  assertEquals(s,xmlEscaper.escape(s));
  for (char ch=0; ch < 0x20; ch++) {
    if (ch == '\t' || ch == '\n' || ch == '\r') {
      if (shouldEscapeWhitespaceChars) {
        assertEscaping(xmlEscaper,"String_Node_Str" + Integer.toHexString(ch).toUpperCase() + "String_Node_Str",ch);
      }
 else {
        assertUnescaped(xmlEscaper,ch);
      }
    }
 else {
      assertEscaping(xmlEscaper,"String_Node_Str",ch);
    }
  }
  for (char ch=0x20; ch <= 0xFFFD; ch++) {
    if (ch == '&') {
      assertEscaping(xmlEscaper,"String_Node_Str",ch);
    }
 else     if (ch == '<') {
      assertEscaping(xmlEscaper,"String_Node_Str",ch);
    }
 else     if (ch == '>') {
      assertEscaping(xmlEscaper,"String_Node_Str",ch);
    }
 else     if (shouldEscapeQuotes && ch == '\'') {
      assertEscaping(xmlEscaper,"String_Node_Str",ch);
    }
 else     if (shouldEscapeQuotes && ch == '"') {
      assertEscaping(xmlEscaper,"String_Node_Str",ch);
    }
 else {
      String input=String.valueOf(ch);
      String escaped=xmlEscaper.escape(input);
      assertEquals("String_Node_Str" + Integer.toString(ch,16) + "String_Node_Str",input,escaped);
    }
  }
  assertUnescaped(xmlEscaper,'\uFFFE');
  assertUnescaped(xmlEscaper,'\uFFFF');
}