Program: 17403
Project: 17403
Buggy source:
@Test public void testDelete() throws Exception {
  ConnectionManager cm=getConnectionManager();
  CKeyspaceDefinition definition=JsonUtil.objectFromJsonResource(CKeyspaceDefinition.class,this.getClass().getClassLoader(),"String_Node_Str");
  assertNotNull(definition);
  cm.buildKeyspace(definition,true);
  cm.setDefaultKeyspace(definition);
  ObjectMapper om=cm.getObjectMapper(definition.getName());
  Map<String,Object> testObject=JsonUtil.rhombusMapFromJsonMap(TestHelpers.getTestObject(0),definition.getDefinitions().get("String_Node_Str"));
  UUID key=om.insert("String_Node_Str",testObject);
  Map<String,Object> dbObject=om.getByKey("String_Node_Str",key);
  for (  String dbKey : dbObject.keySet()) {
    if (!dbKey.equals("String_Node_Str")) {
      assertEquals(testObject.get(dbKey),dbObject.get(dbKey));
    }
  }
  Criteria criteria=TestHelpers.getTestCriteria(0);
  long foreignKey=((Long)criteria.getIndexKeys().get("String_Node_Str")).longValue();
  criteria.getIndexKeys().put("String_Node_Str",foreignKey);
  List<Map<String,Object>> dbObjects=om.list("String_Node_Str",criteria);
  assertEquals(1,dbObjects.size());
  for (  Map<String,Object> result : dbObjects) {
    assertEquals(foreignKey,result.get("String_Node_Str"));
  }
  om.delete("String_Node_Str",key);
  assertEquals(null,om.getByKey("String_Node_Str",key));
  assertEquals(0,om.list("String_Node_Str",criteria).size());
  testObject.put("String_Node_Str",null);
  UUID key3=om.insert("String_Node_Str",testObject);
  dbObject=om.getByKey("String_Node_Str",key3);
  for (  String dbKey : dbObject.keySet()) {
    if (!dbKey.equals("String_Node_Str")) {
      assertEquals(testObject.get(dbKey),dbObject.get(dbKey));
    }
  }
}

Fixed version (ground truth):
@Test public void testDelete() throws Exception {
  ConnectionManager cm=getConnectionManager();
  CKeyspaceDefinition definition=JsonUtil.objectFromJsonResource(CKeyspaceDefinition.class,this.getClass().getClassLoader(),"String_Node_Str");
  assertNotNull(definition);
  cm.buildKeyspace(definition,true);
  cm.setDefaultKeyspace(definition);
  ObjectMapper om=cm.getObjectMapper(definition.getName());
  Map<String,Object> testObject=JsonUtil.rhombusMapFromJsonMap(TestHelpers.getTestObject(0),definition.getDefinitions().get("String_Node_Str"));
  UUID key=om.insert("String_Node_Str",testObject);
  Map<String,Object> dbObject=om.getByKey("String_Node_Str",key);
  for (  String dbKey : dbObject.keySet()) {
    if (!dbKey.equals("String_Node_Str")) {
      assertEquals(testObject.get(dbKey),dbObject.get(dbKey));
    }
  }
  Criteria criteria=TestHelpers.getTestCriteria(0);
  long foreignKey=((Long)criteria.getIndexKeys().get("String_Node_Str")).longValue();
  criteria.getIndexKeys().put("String_Node_Str",foreignKey);
  List<Map<String,Object>> dbObjects=om.list("String_Node_Str",criteria);
  assertEquals(1,dbObjects.size());
  for (  Map<String,Object> result : dbObjects) {
    assertEquals(foreignKey,result.get("String_Node_Str"));
  }
  om.delete("String_Node_Str",key);
  assertEquals(null,om.getByKey("String_Node_Str",key));
  assertEquals(0,om.list("String_Node_Str",criteria).size());
  testObject.put("String_Node_Str",null);
  UUID key3=om.insert("String_Node_Str",testObject);
  dbObject=om.getByKey("String_Node_Str",key3);
  for (  String dbKey : dbObject.keySet()) {
    if (!dbKey.equals("String_Node_Str")) {
      assertEquals(testObject.get(dbKey),dbObject.get(dbKey));
    }
  }
  om.delete("String_Node_Str",key3);
  assertEquals(null,om.getByKey("String_Node_Str",key3));
}