Program: 133590
Project: 133590
Buggy source:
/** 
 * Checks that connections can be removed, at which point they can no longer be queried from the table.
 */
@Test public void checkRemoveConnection(){
  List<Entry> row;
  String name;
  String host="String_Node_Str";
  assertEquals(0,table.addRow());
  assertEquals(1,table.addRow());
  assertNotNull(table.getConnection("String_Node_Str"));
  assertNotNull(table.getConnection("String_Node_Str"));
  table.deleteRow(0);
  assertNull(table.getConnection("String_Node_Str"));
  assertNotNull(table.getConnection("String_Node_Str"));
  assertEquals(1,table.numberOfRows());
  assertFalse(table.getConnectionNames().contains("String_Node_Str"));
  assertTrue(table.getConnectionNames().contains("String_Node_Str"));
  name="String_Node_Str";
  row=table.getRow(0);
  assertNotNull(row);
  assertFalse(row.isEmpty());
  assertEquals(4,row.size());
  assertEquals(name,row.get(0).getValue());
  assertEquals(DEFAULT_HOST,row.get(1).getValue());
  assertEquals(DEFAULT_PORT,row.get(2).getValue());
  assertEquals(DEFAULT_PATH,row.get(3).getValue());
  assertEquals(row,table.getConnection(name));
  row.get(1).setValue(host);
  name="String_Node_Str";
  assertEquals(1,table.addRow());
  row=table.getRow(1);
  assertNotNull(row);
  assertFalse(row.isEmpty());
  assertEquals(4,row.size());
  assertEquals(name,row.get(0).getValue());
  assertEquals(DEFAULT_HOST,row.get(1).getValue());
  assertEquals(DEFAULT_PORT,row.get(2).getValue());
  assertEquals(DEFAULT_PATH,row.get(3).getValue());
  assertEquals(row,table.getConnection(name));
  name="String_Node_Str";
  row=table.getRow(0);
  assertNotNull(row);
  assertFalse(row.isEmpty());
  assertEquals(4,row.size());
  assertEquals(name,row.get(0).getValue());
  assertEquals(host,row.get(1).getValue());
  assertEquals(DEFAULT_PORT,row.get(2).getValue());
  assertEquals(DEFAULT_PATH,row.get(3).getValue());
  assertEquals(row,table.getConnection(name));
  assertEquals(2,table.numberOfRows());
  assertTrue(table.getConnectionNames().contains("String_Node_Str"));
  assertTrue(table.getConnectionNames().contains("String_Node_Str"));
  return;
}

Fixed version (ground truth):
/** 
 * Checks that connections can be removed, at which point they can no longer be queried from the table.
 */
@Test public void checkRemoveConnection(){
  List<Entry> row;
  String name;
  String host="String_Node_Str";
  assertEquals(0,table.addRow());
  assertEquals(1,table.addRow());
  assertEquals(2,table.addRow());
  assertNotNull(table.getConnection("String_Node_Str"));
  assertNotNull(table.getConnection("String_Node_Str"));
  assertNotNull(table.getConnection("String_Node_Str"));
  table.deleteRow(0);
  assertNull(table.getConnection("String_Node_Str"));
  assertNotNull(table.getConnection("String_Node_Str"));
  assertNotNull(table.getConnection("String_Node_Str"));
  assertEquals(2,table.numberOfRows());
  assertFalse(table.getConnectionNames().contains("String_Node_Str"));
  assertTrue(table.getConnectionNames().contains("String_Node_Str"));
  assertTrue(table.getConnectionNames().contains("String_Node_Str"));
  name="String_Node_Str";
  row=table.getRow(0);
  assertNotNull(row);
  assertFalse(row.isEmpty());
  assertEquals(4,row.size());
  assertEquals(name,row.get(0).getValue());
  assertEquals(DEFAULT_HOST,row.get(1).getValue());
  assertEquals(DEFAULT_PORT,row.get(2).getValue());
  assertEquals(DEFAULT_PATH,row.get(3).getValue());
  assertEquals(row,table.getConnection(name));
  name="String_Node_Str";
  row=table.getRow(1);
  assertNotNull(row);
  assertFalse(row.isEmpty());
  assertEquals(4,row.size());
  assertEquals(name,row.get(0).getValue());
  assertEquals(DEFAULT_HOST,row.get(1).getValue());
  assertEquals(DEFAULT_PORT,row.get(2).getValue());
  assertEquals(DEFAULT_PATH,row.get(3).getValue());
  assertEquals(row,table.getConnection(name));
  row.get(1).setValue(host);
  name="String_Node_Str";
  assertEquals(2,table.addRow());
  row=table.getRow(2);
  assertNotNull(row);
  assertFalse(row.isEmpty());
  assertEquals(4,row.size());
  assertEquals(name,row.get(0).getValue());
  assertEquals(DEFAULT_HOST,row.get(1).getValue());
  assertEquals(DEFAULT_PORT,row.get(2).getValue());
  assertEquals(DEFAULT_PATH,row.get(3).getValue());
  assertEquals(row,table.getConnection(name));
  name="String_Node_Str";
  row=table.getRow(0);
  assertNotNull(row);
  assertFalse(row.isEmpty());
  assertEquals(4,row.size());
  assertEquals(name,row.get(0).getValue());
  assertEquals(DEFAULT_HOST,row.get(1).getValue());
  assertEquals(DEFAULT_PORT,row.get(2).getValue());
  assertEquals(DEFAULT_PATH,row.get(3).getValue());
  assertEquals(row,table.getConnection(name));
  name="String_Node_Str";
  row=table.getRow(1);
  assertNotNull(row);
  assertFalse(row.isEmpty());
  assertEquals(4,row.size());
  assertEquals(name,row.get(0).getValue());
  assertEquals(host,row.get(1).getValue());
  assertEquals(DEFAULT_PORT,row.get(2).getValue());
  assertEquals(DEFAULT_PATH,row.get(3).getValue());
  assertEquals(row,table.getConnection(name));
  assertEquals(3,table.numberOfRows());
  assertTrue(table.getConnectionNames().contains("String_Node_Str"));
  assertTrue(table.getConnectionNames().contains("String_Node_Str"));
  assertTrue(table.getConnectionNames().contains("String_Node_Str"));
  return;
}