Program: 39254
Project: 39254
Buggy source:
@Test public final void shouldReturnListOfNodesInTheSameOrderAsTheyAppearOnTheTree() throws Exception {
  EntityTreeNode l1_b1_a11=mockEntityTreeNode(null,1,"String_Node_Str");
  EntityTreeNode l1_b1_a10=mockEntityTreeNode(Lists.newArrayList(l1_b1_a11),1,"String_Node_Str");
  EntityTreeNode l1_b1_a9=mockEntityTreeNode(Lists.newArrayList(l1_b1_a10),1,"String_Node_Str");
  EntityTreeNode l1_b1_a8=mockEntityTreeNode(Lists.newArrayList(l1_b1_a9),1,"String_Node_Str");
  EntityTreeNode l1_b1_a7=mockEntityTreeNode(Lists.newArrayList(l1_b1_a8),1,"String_Node_Str");
  EntityTreeNode l1_b1_a6=mockEntityTreeNode(Lists.newArrayList(l1_b1_a7),1,"String_Node_Str");
  EntityTreeNode l1_b1_a5=mockEntityTreeNode(Lists.newArrayList(l1_b1_a6),1,"String_Node_Str");
  EntityTreeNode l1_b1_a4=mockEntityTreeNode(Lists.newArrayList(l1_b1_a5),1,"String_Node_Str");
  EntityTreeNode l1_b1_a3=mockEntityTreeNode(Lists.newArrayList(l1_b1_a4),1,"String_Node_Str");
  EntityTreeNode l1_b1_a2=mockEntityTreeNode(Lists.newArrayList(l1_b1_a3),1,"String_Node_Str");
  EntityTreeNode l1_b1_a1=mockEntityTreeNode(Lists.newArrayList(l1_b1_a2),1,"String_Node_Str");
  EntityTreeNode l1_b1_b1=mockEntityTreeNode(null,2,"String_Node_Str");
  EntityTreeNode l1_a1=mockEntityTreeNode(null,1,"String_Node_Str");
  EntityTreeNode l1_b1=mockEntityTreeNode(Lists.newLinkedList(Lists.newArrayList(l1_b1_b1,l1_b1_a1)),2,"String_Node_Str");
  EntityTreeNode root=mockEntityTreeNode(Lists.newLinkedList(Lists.newArrayList(l1_a1,l1_b1)),1,"String_Node_Str");
  given(tree.getRoot()).willReturn(root);
  given(tree.isEmpty()).willReturn(false);
  List<Entity> nodesList=entityTreeUtils.getSortedEntities(tree);
  Assert.assertEquals(15,nodesList.size());
  Assert.assertEquals("String_Node_Str",nodesList.get(0).getField("String_Node_Str"));
  Assert.assertEquals("String_Node_Str",nodesList.get(1).getField("String_Node_Str"));
  Assert.assertEquals("String_Node_Str",nodesList.get(2).getField("String_Node_Str"));
  Assert.assertEquals("String_Node_Str",nodesList.get(3).getField("String_Node_Str"));
  Assert.assertEquals("String_Node_Str",nodesList.get(4).getField("String_Node_Str"));
  Assert.assertEquals("String_Node_Str",nodesList.get(5).getField("String_Node_Str"));
  Assert.assertEquals("String_Node_Str",nodesList.get(6).getField("String_Node_Str"));
  Assert.assertEquals("String_Node_Str",nodesList.get(7).getField("String_Node_Str"));
  Assert.assertEquals("String_Node_Str",nodesList.get(8).getField("String_Node_Str"));
  Assert.assertEquals("String_Node_Str",nodesList.get(9).getField("String_Node_Str"));
  Assert.assertEquals("String_Node_Str",nodesList.get(10).getField("String_Node_Str"));
  Assert.assertEquals("String_Node_Str",nodesList.get(11).getField("String_Node_Str"));
  Assert.assertEquals("String_Node_Str",nodesList.get(12).getField("String_Node_Str"));
  Assert.assertEquals("String_Node_Str",nodesList.get(13).getField("String_Node_Str"));
  Assert.assertEquals("String_Node_Str",nodesList.get(14).getField("String_Node_Str"));
}

Fixed version (ground truth):
@Test public final void shouldReturnListOfNodesInTheSameOrderAsTheyAppearOnTheTree() throws Exception {
  EntityTreeNode l1b1a11=mockEntityTreeNode(null,1,"String_Node_Str");
  EntityTreeNode l1b1a10=mockEntityTreeNode(Lists.newArrayList(l1b1a11),1,"String_Node_Str");
  EntityTreeNode l1b1a9=mockEntityTreeNode(Lists.newArrayList(l1b1a10),1,"String_Node_Str");
  EntityTreeNode l1b1a8=mockEntityTreeNode(Lists.newArrayList(l1b1a9),1,"String_Node_Str");
  EntityTreeNode l1b1a7=mockEntityTreeNode(Lists.newArrayList(l1b1a8),1,"String_Node_Str");
  EntityTreeNode l1b1a6=mockEntityTreeNode(Lists.newArrayList(l1b1a7),1,"String_Node_Str");
  EntityTreeNode l1b1a5=mockEntityTreeNode(Lists.newArrayList(l1b1a6),1,"String_Node_Str");
  EntityTreeNode l1b1a4=mockEntityTreeNode(Lists.newArrayList(l1b1a5),1,"String_Node_Str");
  EntityTreeNode l1b1a3=mockEntityTreeNode(Lists.newArrayList(l1b1a4),1,"String_Node_Str");
  EntityTreeNode l1b1a2=mockEntityTreeNode(Lists.newArrayList(l1b1a3),1,"String_Node_Str");
  EntityTreeNode l1b1a1=mockEntityTreeNode(Lists.newArrayList(l1b1a2),1,"String_Node_Str");
  EntityTreeNode l1b1b1=mockEntityTreeNode(null,2,"String_Node_Str");
  EntityTreeNode l1a1=mockEntityTreeNode(null,1,"String_Node_Str");
  EntityTreeNode l1b1=mockEntityTreeNode(Lists.newLinkedList(Lists.newArrayList(l1b1b1,l1b1a1)),2,"String_Node_Str");
  EntityTreeNode root=mockEntityTreeNode(Lists.newLinkedList(Lists.newArrayList(l1a1,l1b1)),1,"String_Node_Str");
  given(tree.getRoot()).willReturn(root);
  given(tree.isEmpty()).willReturn(false);
  List<Entity> nodesList=entityTreeUtils.getSortedEntities(tree);
  Assert.assertEquals(15,nodesList.size());
  Assert.assertEquals("String_Node_Str",nodesList.get(0).getField("String_Node_Str"));
  Assert.assertEquals("String_Node_Str",nodesList.get(1).getField("String_Node_Str"));
  Assert.assertEquals("String_Node_Str",nodesList.get(2).getField("String_Node_Str"));
  Assert.assertEquals("String_Node_Str",nodesList.get(3).getField("String_Node_Str"));
  Assert.assertEquals("String_Node_Str",nodesList.get(4).getField("String_Node_Str"));
  Assert.assertEquals("String_Node_Str",nodesList.get(5).getField("String_Node_Str"));
  Assert.assertEquals("String_Node_Str",nodesList.get(6).getField("String_Node_Str"));
  Assert.assertEquals("String_Node_Str",nodesList.get(7).getField("String_Node_Str"));
  Assert.assertEquals("String_Node_Str",nodesList.get(8).getField("String_Node_Str"));
  Assert.assertEquals("String_Node_Str",nodesList.get(9).getField("String_Node_Str"));
  Assert.assertEquals("String_Node_Str",nodesList.get(10).getField("String_Node_Str"));
  Assert.assertEquals("String_Node_Str",nodesList.get(11).getField("String_Node_Str"));
  Assert.assertEquals("String_Node_Str",nodesList.get(12).getField("String_Node_Str"));
  Assert.assertEquals("String_Node_Str",nodesList.get(13).getField("String_Node_Str"));
  Assert.assertEquals("String_Node_Str",nodesList.get(14).getField("String_Node_Str"));
}