Program: 17452
Project: 17452
Buggy source:
@Test public void testObjectMapper() throws Exception {
  logger.debug("String_Node_Str");
  ConnectionManager cm=getConnectionManager();
  String json=TestHelpers.readFileToString(this.getClass(),"String_Node_Str");
  CKeyspaceDefinition definition=CKeyspaceDefinition.fromJsonString(json);
  assertNotNull(definition);
  cm.buildKeyspace(definition,true);
  cm.setDefaultKeyspace(definition);
  ObjectMapper om=cm.getObjectMapper();
  Map<String,Object> testObject=TestHelpers.getTestObject(0);
  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));
    }
  }
  UUID key2=om.insert("String_Node_Str",TestHelpers.getTestObject(1));
  Criteria criteria=TestHelpers.getTestCriteria(0);
  List<Map<String,Object>> dbObjects=om.list("String_Node_Str",criteria);
  assertEquals(2,dbObjects.size());
  om.delete("String_Node_Str",key);
  dbObjects=om.list("String_Node_Str",criteria);
  assertEquals(1,dbObjects.size());
  Map<String,Object> testObject2=TestHelpers.getTestObject(2);
  UUID key3=om.update("String_Node_Str",key2,testObject2);
  Map<String,Object> dbObject2=om.getByKey("String_Node_Str",key3);
  for (  String dbKey : dbObject2.keySet()) {
    if (!dbKey.equals("String_Node_Str")) {
      assertEquals(testObject2.get(dbKey),dbObject2.get(dbKey));
    }
  }
  dbObjects=om.list("String_Node_Str",criteria);
  assertEquals(0,dbObjects.size());
  Criteria criteria2=TestHelpers.getTestCriteria(1);
  dbObjects=om.list("String_Node_Str",criteria2);
  assertEquals(1,dbObjects.size());
  cm.teardown();
}

Fixed version (ground truth):
@Test public void testObjectMapper() throws Exception {
  logger.debug("String_Node_Str");
  ConnectionManager cm=getConnectionManager();
  String json=TestHelpers.readFileToString(this.getClass(),"String_Node_Str");
  CKeyspaceDefinition definition=CKeyspaceDefinition.fromJsonString(json);
  assertNotNull(definition);
  cm.buildKeyspace(definition,true);
  cm.setDefaultKeyspace(definition);
  ObjectMapper om=cm.getObjectMapper();
  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));
    }
  }
  UUID key2=om.insert("String_Node_Str",JsonUtil.rhombusMapFromJsonMap(TestHelpers.getTestObject(1),definition.getDefinitions().get("String_Node_Str")));
  Criteria criteria=TestHelpers.getTestCriteria(0);
  criteria.getIndexKeys().put("String_Node_Str",((Integer)criteria.getIndexKeys().get("String_Node_Str")).longValue());
  List<Map<String,Object>> dbObjects=om.list("String_Node_Str",criteria);
  assertEquals(2,dbObjects.size());
  om.delete("String_Node_Str",key);
  dbObjects=om.list("String_Node_Str",criteria);
  assertEquals(1,dbObjects.size());
  Map<String,Object> testObject2=JsonUtil.rhombusMapFromJsonMap(TestHelpers.getTestObject(2),definition.getDefinitions().get("String_Node_Str"));
  UUID key3=om.update("String_Node_Str",key2,testObject2);
  Map<String,Object> dbObject2=om.getByKey("String_Node_Str",key3);
  for (  String dbKey : dbObject2.keySet()) {
    if (!dbKey.equals("String_Node_Str")) {
      assertEquals(testObject2.get(dbKey),dbObject2.get(dbKey));
    }
  }
  dbObjects=om.list("String_Node_Str",criteria);
  assertEquals(0,dbObjects.size());
  Criteria criteria2=TestHelpers.getTestCriteria(1);
  criteria2.getIndexKeys().put("String_Node_Str",((Integer)criteria2.getIndexKeys().get("String_Node_Str")).longValue());
  dbObjects=om.list("String_Node_Str",criteria2);
  assertEquals(1,dbObjects.size());
  cm.teardown();
}