Program: 90667
Project: 90667
Buggy source:
/** 
 * @param includeSource TODO
 * @param compact
 * @param includeContext TODO
 * @throws IOException
 * @throws JsonParseException
 * @throws JsonMappingException
 */
private void testAllFeatures(final boolean includeSource,final boolean compact,final boolean includeContext) throws IOException, JsonParseException, JsonMappingException {
  final Log4jLogEvent expected=LogEventFixtures.createLogEvent();
  final XMLLayout layout=XMLLayout.createLayout(Boolean.toString(includeSource),Boolean.toString(includeContext),"String_Node_Str",Boolean.toString(compact),"String_Node_Str");
  final String str=layout.toSerializable(expected);
  assertEquals(str,!compact,str.contains("String_Node_Str"));
  assertEquals(str,includeSource,str.contains("String_Node_Str"));
  assertEquals(str,includeContext,str.contains("String_Node_Str"));
  final Log4jLogEvent actual=new Log4jXmlObjectMapper().readValue(str,Log4jLogEvent.class);
  LogEventFixtures.assertEqualLogEvents(expected,actual,includeSource,includeContext);
  if (includeContext) {
    this.checkElement("String_Node_Str","String_Node_Str",compact,str);
    this.checkElement("String_Node_Str","String_Node_Str",compact,str);
  }
  assertNull(actual.getThrown());
  assertTrue(str,str.contains("String_Node_Str"));
  assertTrue(str,str.contains("String_Node_Str"));
  assertTrue(str,str.contains("String_Node_Str"));
  assertTrue(str,str.contains("String_Node_Str"));
  assertTrue(str,str.contains("String_Node_Str"));
  assertTrue(str,str.contains("String_Node_Str"));
  assertTrue(str,str.contains("String_Node_Str"));
  this.checkAttributeName("String_Node_Str",compact,str);
  this.checkAttributeName("String_Node_Str",compact,str);
  this.checkAttributeName("String_Node_Str",compact,str);
  this.checkAttributeName("String_Node_Str",compact,str);
  this.checkElementName("String_Node_Str",compact,str,true,true);
  this.checkAttributeName("String_Node_Str",compact,str);
  this.checkElementName("String_Node_Str",compact,str,false,true);
  this.checkElementName("String_Node_Str",compact,str,false,true);
  this.checkElementName("String_Node_Str",compact,str,true,true);
  this.checkElementName("String_Node_Str",compact,str,true,true);
  this.checkAttributeName("String_Node_Str",compact,str);
  this.checkAttributeName("String_Node_Str",compact,str);
  this.checkAttributeName("String_Node_Str",compact,str);
  this.checkAttributeName("String_Node_Str",compact,str);
  this.checkAttributeName("String_Node_Str",compact,str);
  this.checkAttributeName("String_Node_Str",compact,str);
  this.checkAttributeName("String_Node_Str",compact,str);
  this.checkAttributeName("String_Node_Str",compact,str);
  this.checkAttributeName("String_Node_Str",compact,str);
  this.checkAttributeName("String_Node_Str",compact,str);
  this.checkElementName("String_Node_Str",compact,str,false,true);
  this.checkElementName("String_Node_Str",compact,str,false,true);
  this.checkAttributeName("String_Node_Str",compact,str);
  this.checkAttributeName("String_Node_Str",compact,str);
  if (includeContext) {
    this.checkElementName("String_Node_Str",compact,str,false,true);
  }
  this.checkElementName("String_Node_Str",compact,str,false,true);
  if (includeSource) {
    this.checkElementName("String_Node_Str",compact,str,true,false);
  }
  this.checkAttribute("String_Node_Str","String_Node_Str",compact,str);
  this.checkAttribute("String_Node_Str","String_Node_Str",compact,str);
}

Fixed version (ground truth):
/** 
 * @param includeSource TODO
 * @param compact
 * @param includeContext TODO
 * @throws IOException
 * @throws JsonParseException
 * @throws JsonMappingException
 */
private void testAllFeatures(final boolean includeSource,final boolean compact,final boolean includeContext) throws IOException, JsonParseException, JsonMappingException {
  final Log4jLogEvent expected=LogEventFixtures.createLogEvent();
  final XMLLayout layout=XMLLayout.createLayout(Boolean.toString(includeSource),Boolean.toString(includeContext),"String_Node_Str",Boolean.toString(compact),"String_Node_Str");
  final String str=layout.toSerializable(expected);
  assertEquals(str,!compact,str.contains("String_Node_Str"));
  assertEquals(str,includeSource,str.contains("String_Node_Str"));
  assertEquals(str,includeContext,str.contains("String_Node_Str"));
  final Log4jLogEvent actual=new Log4jXmlObjectMapper().readValue(str,Log4jLogEvent.class);
  LogEventFixtures.assertEqualLogEvents(expected,actual,includeSource,includeContext);
  if (includeContext) {
    this.checkElement("String_Node_Str","String_Node_Str",compact,str);
    this.checkElement("String_Node_Str","String_Node_Str",compact,str);
  }
  assertNull(actual.getThrown());
  assertTrue(str,str.contains("String_Node_Str"));
  assertTrue(str,str.contains("String_Node_Str"));
  assertTrue(str,str.contains("String_Node_Str"));
  assertTrue(str,str.contains("String_Node_Str"));
  assertTrue(str,str.contains("String_Node_Str"));
  assertTrue(str,str.contains("String_Node_Str"));
  assertTrue(str,str.contains("String_Node_Str"));
  this.checkAttributeName("String_Node_Str",compact,str);
  this.checkAttributeName("String_Node_Str",compact,str);
  this.checkAttributeName("String_Node_Str",compact,str);
  this.checkAttributeName("String_Node_Str",compact,str);
  this.checkElementName("String_Node_Str",compact,str,true,true);
  this.checkAttributeName("String_Node_Str",compact,str);
  this.checkElementName("String_Node_Str",compact,str,false,true);
  this.checkElementName("String_Node_Str",compact,str,false,true);
  this.checkElementName("String_Node_Str",compact,str,true,true);
  this.checkElementName("String_Node_Str",compact,str,true,true);
  this.checkAttributeName("String_Node_Str",compact,str);
  this.checkAttributeName("String_Node_Str",compact,str);
  this.checkAttributeName("String_Node_Str",compact,str);
  this.checkAttributeName("String_Node_Str",compact,str);
  this.checkAttributeName("String_Node_Str",compact,str);
  this.checkAttributeName("String_Node_Str",compact,str);
  this.checkAttributeName("String_Node_Str",compact,str);
  this.checkAttributeName("String_Node_Str",compact,str);
  this.checkAttributeName("String_Node_Str",compact,str);
  this.checkAttributeName("String_Node_Str",compact,str);
  this.checkElementName("String_Node_Str",compact,str,false,true);
  if (Throwables.isSuppressedAvailable()) {
    this.checkElementName("String_Node_Str",compact,str,false,true);
  }
  this.checkAttributeName("String_Node_Str",compact,str);
  this.checkAttributeName("String_Node_Str",compact,str);
  if (includeContext) {
    this.checkElementName("String_Node_Str",compact,str,false,true);
  }
  this.checkElementName("String_Node_Str",compact,str,false,true);
  if (includeSource) {
    this.checkElementName("String_Node_Str",compact,str,true,false);
  }
  this.checkAttribute("String_Node_Str","String_Node_Str",compact,str);
  this.checkAttribute("String_Node_Str","String_Node_Str",compact,str);
}