Program: 97950
Project: 97950
Buggy source:
@Test public void testIntegerColumnSlice() throws UnsupportedEncodingException {
  NoSqlSession session=mgr.getSession();
  String colFamily="String_Node_Str";
  DboDatabaseMeta meta=mgr.find(DboDatabaseMeta.class,DboDatabaseMeta.META_DB_ROWKEY);
  DboColumnMeta idMeta=new DboColumnMeta();
  idMeta.setup("String_Node_Str",null,String.class,false,null);
  mgr.put(idMeta);
  DboTableMeta tableMeta=new DboTableMeta();
  tableMeta.setColumnFamily(colFamily);
  tableMeta.setColNameType(long.class);
  tableMeta.setRowKeyMeta(idMeta);
  mgr.put(tableMeta);
  meta.addMetaClassDbo(tableMeta);
  mgr.put(meta);
  mgr.flush();
  byte[] rowKey="String_Node_Str".getBytes("String_Node_Str");
  List<Column> columns=new ArrayList<Column>();
  columns.add(new Column(toIntBytes(500),new byte[0]));
  columns.add(new Column(toIntBytes(20),new byte[0]));
  columns.add(new Column(toIntBytes(200),new byte[0]));
  columns.add(new Column(toIntBytes(10),new byte[0]));
  columns.add(new Column(toIntBytes(60),new byte[0]));
  columns.add(new Column(toIntBytes(700),new byte[0]));
  columns.add(new Column(toIntBytes(500023432430L),new byte[0]));
  columns.add(new Column(toIntBytes(550),new byte[0]));
  columns.add(new Column(toIntBytes(340),new byte[0]));
  columns.add(new Column(toIntBytes(40),new byte[0]));
  columns.add(new Column(toIntBytes(-40),new byte[0]));
  columns.add(new Column(toIntBytes(-200),new byte[0]));
  columns.add(new Column(toIntBytes(-500),new byte[0]));
  columns.add(new Column(toIntBytes(new BigInteger("String_Node_Str")),new byte[0]));
  columns.add(new Column(toIntBytes(new BigInteger("String_Node_Str")),new byte[0]));
  columns.add(new Column(toIntBytes(new BigInteger("String_Node_Str")),new byte[0]));
  columns.add(new Column(toIntBytes(new BigInteger("String_Node_Str")),new byte[0]));
  session.persist(colFamily,rowKey,columns);
  session.flush();
  Iterable<Column> results=session.columnRangeScan(colFamily,rowKey,toIntBytes(-250),toIntBytes(50),2);
  int counter=0;
  for (  Column col : results) {
    if (counter == 0)     Assert.assertEquals(-200L,toLong(col.getName()).longValue());
    counter++;
  }
  Assert.assertEquals(7,counter);
}

Fixed version (ground truth):
@Test public void testIntegerColumnSlice() throws UnsupportedEncodingException {
  NoSqlSession session=mgr.getSession();
  String colFamily="String_Node_Str";
  DboDatabaseMeta meta=mgr.find(DboDatabaseMeta.class,DboDatabaseMeta.META_DB_ROWKEY);
  DboColumnMeta idMeta=new DboColumnMeta();
  idMeta.setup("String_Node_Str",null,String.class,false,null);
  DboTableMeta tableMeta=new DboTableMeta();
  tableMeta.setColumnFamily(colFamily);
  tableMeta.setColNameType(long.class);
  tableMeta.setRowKeyMeta(idMeta);
  mgr.put(idMeta);
  mgr.put(tableMeta);
  meta.addMetaClassDbo(tableMeta);
  mgr.put(meta);
  mgr.flush();
  byte[] rowKey="String_Node_Str".getBytes("String_Node_Str");
  List<Column> columns=new ArrayList<Column>();
  columns.add(new Column(toIntBytes(500),new byte[0]));
  columns.add(new Column(toIntBytes(20),new byte[0]));
  columns.add(new Column(toIntBytes(200),new byte[0]));
  columns.add(new Column(toIntBytes(10),new byte[0]));
  columns.add(new Column(toIntBytes(60),new byte[0]));
  columns.add(new Column(toIntBytes(700),new byte[0]));
  columns.add(new Column(toIntBytes(500023432430L),new byte[0]));
  columns.add(new Column(toIntBytes(550),new byte[0]));
  columns.add(new Column(toIntBytes(340),new byte[0]));
  columns.add(new Column(toIntBytes(40),new byte[0]));
  columns.add(new Column(toIntBytes(-40),new byte[0]));
  columns.add(new Column(toIntBytes(-200),new byte[0]));
  columns.add(new Column(toIntBytes(-500),new byte[0]));
  columns.add(new Column(toIntBytes(new BigInteger("String_Node_Str")),new byte[0]));
  columns.add(new Column(toIntBytes(new BigInteger("String_Node_Str")),new byte[0]));
  columns.add(new Column(toIntBytes(new BigInteger("String_Node_Str")),new byte[0]));
  columns.add(new Column(toIntBytes(new BigInteger("String_Node_Str")),new byte[0]));
  session.persist(colFamily,rowKey,columns);
  session.flush();
  Iterable<Column> results=session.columnRangeScan(colFamily,rowKey,toIntBytes(-250),toIntBytes(50),2);
  int counter=0;
  for (  Column col : results) {
    if (counter == 0)     Assert.assertEquals(-200L,toLong(col.getName()).longValue());
    counter++;
  }
  Assert.assertEquals(7,counter);
}