Program: 97414
Project: 97414
Buggy source:
public static Collection<Branch> createTestBranches() throws OseeCoreException {
  Collection<Branch> branches=new ArrayList<Branch>();
  Branch root=new Branch(GUID.create(),ROOT_BRANCH_NAME,BranchType.SYSTEM_ROOT,BranchState.COMMITTED,false);
  Branch parent=new Branch(GUID.create(),"String_Node_Str",BranchType.SYSTEM_ROOT,BranchState.CREATED,false);
  parent.setParentBranch(root);
  Branch child1=new Branch(GUID.create(),"String_Node_Str",BranchType.SYSTEM_ROOT,BranchState.MODIFIED,false);
  child1.setParentBranch(parent);
  child1.setArchived(true);
  child1.setBranchState(BranchState.DELETED);
  Branch child2=new Branch(GUID.create(),"String_Node_Str",BranchType.WORKING,BranchState.DELETED,true);
  child2.setParentBranch(parent);
  Branch child3=new Branch(GUID.create(),"String_Node_Str",BranchType.SYSTEM_ROOT,BranchState.CREATED,false);
  child3.setBranchType(BranchType.MERGE);
  child3.setParentBranch(parent);
  Branch grandChild1=new Branch(GUID.create(),"String_Node_Str",BranchType.MERGE,BranchState.UNKNOWN,false);
  grandChild1.setBranchState(BranchState.DELETED);
  grandChild1.setArchived(true);
  grandChild1.setParentBranch(child1);
  Branch grandChild2=new Branch(GUID.create(),"String_Node_Str",BranchType.SYSTEM_ROOT,BranchState.MODIFIED,false);
  grandChild2.setParentBranch(child1);
  Branch grandChild3=new Branch(GUID.create(),"String_Node_Str",BranchType.WORKING,BranchState.DELETED,true);
  grandChild3.setParentBranch(child2);
  branches.add(child2);
  branches.add(grandChild2);
  branches.add(grandChild3);
  branches.add(child1);
  branches.add(root);
  branches.add(child3);
  branches.add(grandChild1);
  branches.add(parent);
  return branches;
}

Fixed version (ground truth):
public static Collection<Branch> createTestBranches() throws OseeCoreException {
  Collection<Branch> branches=new ArrayList<Branch>();
  Branch root=new Branch(GUID.create(),ROOT_BRANCH_NAME,BranchType.SYSTEM_ROOT,BranchState.COMMITTED,false);
  Branch parent=new Branch(GUID.create(),"String_Node_Str",BranchType.SYSTEM_ROOT,BranchState.CREATED,false);
  parent.setParentBranch(root);
  Branch child1=new Branch(GUID.create(),"String_Node_Str",BranchType.SYSTEM_ROOT,BranchState.MODIFIED,false);
  child1.setParentBranch(parent);
  child1.setArchived(true);
  child1.setBranchState(BranchState.DELETED);
  Branch child2=new Branch(GUID.create(),"String_Node_Str",BranchType.WORKING,BranchState.DELETED,true);
  child2.setParentBranch(parent);
  Branch child3=new Branch(GUID.create(),"String_Node_Str",BranchType.SYSTEM_ROOT,BranchState.CREATED,false);
  child3.setBranchType(BranchType.MERGE);
  child3.setParentBranch(parent);
  Branch grandChild1=new Branch(GUID.create(),"String_Node_Str",BranchType.MERGE,BranchState.DELETED,false);
  grandChild1.setArchived(true);
  grandChild1.setParentBranch(child1);
  Branch grandChild2=new Branch(GUID.create(),"String_Node_Str",BranchType.SYSTEM_ROOT,BranchState.MODIFIED,false);
  grandChild2.setParentBranch(child1);
  Branch grandChild3=new Branch(GUID.create(),"String_Node_Str",BranchType.WORKING,BranchState.DELETED,true);
  grandChild3.setParentBranch(child2);
  branches.add(child2);
  branches.add(grandChild2);
  branches.add(grandChild3);
  branches.add(child1);
  branches.add(root);
  branches.add(child3);
  branches.add(grandChild1);
  branches.add(parent);
  return branches;
}