Program: 7660
Project: 7660
Buggy source:
@Test public void testQueueSpecificationGenWithToyApp() throws Exception {
  ApplicationSpecification appSpec=new ToyApp().configure();
  ApplicationSpecificationAdapter adapter=ApplicationSpecificationAdapter.create(new ReflectionSchemaGenerator());
  ApplicationSpecification newSpec=adapter.fromJson(adapter.toJson(appSpec));
  QueueSpecificationGenerator generator=new SimpleQueueSpecificationGenerator(Id.Application.from(TEST_ACCOUNT_ID,newSpec.getName()));
  table=generator.create(newSpec.getFlows().values().iterator().next());
  dumpConnectionQueue(table);
  Assert.assertTrue(containsQueue(get(FlowletConnection.Type.STREAM,"String_Node_Str","String_Node_Str"),"String_Node_Str" + TEST_ACCOUNT_ID.getId() + "String_Node_Str"));
  Assert.assertTrue(containsQueue(get(FlowletConnection.Type.STREAM,"String_Node_Str","String_Node_Str"),"String_Node_Str" + TEST_ACCOUNT_ID.getId() + "String_Node_Str"));
  Assert.assertTrue(containsQueue(get(FlowletConnection.Type.FLOWLET,"String_Node_Str","String_Node_Str"),"String_Node_Str"));
  Assert.assertTrue(containsQueue(get(FlowletConnection.Type.FLOWLET,"String_Node_Str","String_Node_Str"),"String_Node_Str"));
  Assert.assertTrue(containsQueue(get(FlowletConnection.Type.FLOWLET,"String_Node_Str","String_Node_Str"),"String_Node_Str"));
  Assert.assertTrue(containsQueue(get(FlowletConnection.Type.FLOWLET,"String_Node_Str","String_Node_Str"),"String_Node_Str"));
  Assert.assertTrue(containsQueue(get(FlowletConnection.Type.FLOWLET,"String_Node_Str","String_Node_Str"),"String_Node_Str"));
  Assert.assertTrue(containsQueue(get(FlowletConnection.Type.FLOWLET,"String_Node_Str","String_Node_Str"),"String_Node_Str"));
  Assert.assertTrue(containsQueue(get(FlowletConnection.Type.FLOWLET,"String_Node_Str","String_Node_Str"),"String_Node_Str"));
  Assert.assertTrue(containsQueue(get(FlowletConnection.Type.FLOWLET,"String_Node_Str","String_Node_Str"),"String_Node_Str"));
}

Fixed version (ground truth):
@Test public void testQueueSpecificationGenWithToyApp() throws Exception {
  ApplicationSpecification appSpec=new ToyApp().configure();
  ApplicationSpecificationAdapter adapter=ApplicationSpecificationAdapter.create(new ReflectionSchemaGenerator());
  ApplicationSpecification newSpec=adapter.fromJson(adapter.toJson(appSpec));
  QueueSpecificationGenerator generator=new SimpleQueueSpecificationGenerator(Id.Application.from(TEST_ACCOUNT_ID,newSpec.getName()));
  table=generator.create(newSpec.getFlows().values().iterator().next());
  dumpConnectionQueue(table);
  Assert.assertTrue(containsQueue(get(FlowletConnection.Type.STREAM,"String_Node_Str","String_Node_Str"),"String_Node_Str"));
  Assert.assertTrue(containsQueue(get(FlowletConnection.Type.STREAM,"String_Node_Str","String_Node_Str"),"String_Node_Str"));
  Assert.assertTrue(containsQueue(get(FlowletConnection.Type.FLOWLET,"String_Node_Str","String_Node_Str"),"String_Node_Str"));
  Assert.assertTrue(containsQueue(get(FlowletConnection.Type.FLOWLET,"String_Node_Str","String_Node_Str"),"String_Node_Str"));
  Assert.assertTrue(containsQueue(get(FlowletConnection.Type.FLOWLET,"String_Node_Str","String_Node_Str"),"String_Node_Str"));
  Assert.assertTrue(containsQueue(get(FlowletConnection.Type.FLOWLET,"String_Node_Str","String_Node_Str"),"String_Node_Str"));
  Assert.assertTrue(containsQueue(get(FlowletConnection.Type.FLOWLET,"String_Node_Str","String_Node_Str"),"String_Node_Str"));
  Assert.assertTrue(containsQueue(get(FlowletConnection.Type.FLOWLET,"String_Node_Str","String_Node_Str"),"String_Node_Str"));
  Assert.assertTrue(containsQueue(get(FlowletConnection.Type.FLOWLET,"String_Node_Str","String_Node_Str"),"String_Node_Str"));
  Assert.assertTrue(containsQueue(get(FlowletConnection.Type.FLOWLET,"String_Node_Str","String_Node_Str"),"String_Node_Str"));
}