Program: 4814
Project: 4814
Buggy source:
@Test public void testFlatten(){
  ControlDag cdag=new ControlDag(ImmutableSet.of(new Connection("String_Node_Str","String_Node_Str"),new Connection("String_Node_Str","String_Node_Str"),new Connection("String_Node_Str","String_Node_Str"),new Connection("String_Node_Str","String_Node_Str")));
  cdag.flatten();
  ControlDag expected=new ControlDag(ImmutableSet.of(new Connection("String_Node_Str","String_Node_Str"),new Connection("String_Node_Str","String_Node_Str"),new Connection("String_Node_Str","String_Node_Str"),new Connection("String_Node_Str","String_Node_Str"),new Connection("String_Node_Str","String_Node_Str"),new Connection("String_Node_Str","String_Node_Str"),new Connection("String_Node_Str","String_Node_Str"),new Connection("String_Node_Str","String_Node_Str")));
  Assert.assertEquals(expected,cdag);
  cdag=new ControlDag(ImmutableSet.of(new Connection("String_Node_Str","String_Node_Str"),new Connection("String_Node_Str","String_Node_Str"),new Connection("String_Node_Str","String_Node_Str"),new Connection("String_Node_Str","String_Node_Str"),new Connection("String_Node_Str","String_Node_Str"),new Connection("String_Node_Str","String_Node_Str")));
  cdag.flatten();
  expected=new ControlDag(ImmutableSet.of(new Connection("String_Node_Str","String_Node_Str"),new Connection("String_Node_Str","String_Node_Str"),new Connection("String_Node_Str","String_Node_Str"),new Connection("String_Node_Str","String_Node_Str"),new Connection("String_Node_Str","String_Node_Str"),new Connection("String_Node_Str","String_Node_Str"),new Connection("String_Node_Str","String_Node_Str"),new Connection("String_Node_Str","String_Node_Str"),new Connection("String_Node_Str","String_Node_Str")));
  Assert.assertEquals(expected,cdag);
}

Fixed version (ground truth):
@Test public void testFlatten(){
  ControlDag cdag=new ControlDag(ImmutableSet.of(new Connection("String_Node_Str","String_Node_Str"),new Connection("String_Node_Str","String_Node_Str"),new Connection("String_Node_Str","String_Node_Str"),new Connection("String_Node_Str","String_Node_Str")));
  cdag.flatten();
  ControlDag expected=new ControlDag(ImmutableSet.of(new Connection("String_Node_Str","String_Node_Str"),new Connection("String_Node_Str","String_Node_Str"),new Connection("String_Node_Str","String_Node_Str"),new Connection("String_Node_Str","String_Node_Str"),new Connection("String_Node_Str","String_Node_Str"),new Connection("String_Node_Str","String_Node_Str"),new Connection("String_Node_Str","String_Node_Str"),new Connection("String_Node_Str","String_Node_Str")));
  Assert.assertEquals(expected,cdag);
  cdag=new ControlDag(ImmutableSet.of(new Connection("String_Node_Str","String_Node_Str"),new Connection("String_Node_Str","String_Node_Str"),new Connection("String_Node_Str","String_Node_Str"),new Connection("String_Node_Str","String_Node_Str"),new Connection("String_Node_Str","String_Node_Str"),new Connection("String_Node_Str","String_Node_Str")));
  cdag.flatten();
  expected=new ControlDag(ImmutableSet.of(new Connection("String_Node_Str","String_Node_Str"),new Connection("String_Node_Str","String_Node_Str"),new Connection("String_Node_Str","String_Node_Str"),new Connection("String_Node_Str","String_Node_Str"),new Connection("String_Node_Str","String_Node_Str"),new Connection("String_Node_Str","String_Node_Str"),new Connection("String_Node_Str","String_Node_Str"),new Connection("String_Node_Str","String_Node_Str"),new Connection("String_Node_Str","String_Node_Str")));
  Assert.assertEquals(expected,cdag);
  cdag=new ControlDag(ImmutableSet.of(new Connection("String_Node_Str","String_Node_Str"),new Connection("String_Node_Str","String_Node_Str"),new Connection("String_Node_Str","String_Node_Str"),new Connection("String_Node_Str","String_Node_Str"),new Connection("String_Node_Str","String_Node_Str"),new Connection("String_Node_Str","String_Node_Str")));
  cdag.flatten();
  expected=new ControlDag(ImmutableSet.of(new Connection("String_Node_Str","String_Node_Str"),new Connection("String_Node_Str","String_Node_Str"),new Connection("String_Node_Str","String_Node_Str"),new Connection("String_Node_Str","String_Node_Str"),new Connection("String_Node_Str","String_Node_Str"),new Connection("String_Node_Str","String_Node_Str"),new Connection("String_Node_Str","String_Node_Str"),new Connection("String_Node_Str","String_Node_Str")));
  Assert.assertEquals(expected,cdag);
}