Program: 97949
Project: 97949
Buggy source:
@Test public void testDecimalColumnSlice() 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(double.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(toDecBytes(5000.5),new byte[0]));
  columns.add(new Column(toDecBytes(20.333),new byte[0]));
  columns.add(new Column(toDecBytes(200.1111111111111),new byte[0]));
  columns.add(new Column(toDecBytes(10.9999999999999999999999999),new byte[0]));
  columns.add(new Column(toDecBytes(60.5),new byte[0]));
  columns.add(new Column(toDecBytes(700),new byte[0]));
  columns.add(new Column(toDecBytes(500023432430.44),new byte[0]));
  columns.add(new Column(toDecBytes(550.32),new byte[0]));
  columns.add(new Column(toDecBytes(340),new byte[0]));
  columns.add(new Column(toDecBytes(40.5),new byte[0]));
  columns.add(new Column(toDecBytes(-40.8888888888888888),new byte[0]));
  columns.add(new Column(toDecBytes(-200.23),new byte[0]));
  columns.add(new Column(toDecBytes(-500),new byte[0]));
  columns.add(new Column(toDecBytes(new BigDecimal("String_Node_Str")),new byte[0]));
  columns.add(new Column(toDecBytes(new BigDecimal("String_Node_Str")),new byte[0]));
  columns.add(new Column(toDecBytes(new BigDecimal("String_Node_Str")),new byte[0]));
  columns.add(new Column(toDecBytes(new BigDecimal("String_Node_Str")),new byte[0]));
  session.persist(colFamily,rowKey,columns);
  session.flush();
  Iterable<Column> results=session.columnRangeScan(colFamily,rowKey,toDecBytes(-250),toDecBytes(12),2);
  int counter=0;
  for (  Column col : results) {
    if (counter == 0) {
      byte[] data=col.getName();
      String hex=new String(Hex.encodeHex(data));
      Assert.assertEquals(-200.23,toDouble(col.getName()).doubleValue());
    }
    counter++;
  }
  Assert.assertEquals(5,counter);
}

Fixed version (ground truth):
@Test public void testDecimalColumnSlice() 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(double.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(toDecBytes(5000.5),new byte[0]));
  columns.add(new Column(toDecBytes(20.333),new byte[0]));
  columns.add(new Column(toDecBytes(200.1111111111111),new byte[0]));
  columns.add(new Column(toDecBytes(10.9999999999999999999999999),new byte[0]));
  columns.add(new Column(toDecBytes(60.5),new byte[0]));
  columns.add(new Column(toDecBytes(700),new byte[0]));
  columns.add(new Column(toDecBytes(500023432430.44),new byte[0]));
  columns.add(new Column(toDecBytes(550.32),new byte[0]));
  columns.add(new Column(toDecBytes(340),new byte[0]));
  columns.add(new Column(toDecBytes(40.5),new byte[0]));
  columns.add(new Column(toDecBytes(-40.8888888888888888),new byte[0]));
  columns.add(new Column(toDecBytes(-200.23),new byte[0]));
  columns.add(new Column(toDecBytes(-500),new byte[0]));
  columns.add(new Column(toDecBytes(new BigDecimal("String_Node_Str")),new byte[0]));
  columns.add(new Column(toDecBytes(new BigDecimal("String_Node_Str")),new byte[0]));
  columns.add(new Column(toDecBytes(new BigDecimal("String_Node_Str")),new byte[0]));
  columns.add(new Column(toDecBytes(new BigDecimal("String_Node_Str")),new byte[0]));
  session.persist(colFamily,rowKey,columns);
  session.flush();
  Iterable<Column> results=session.columnRangeScan(colFamily,rowKey,toDecBytes(-250),toDecBytes(12),2);
  int counter=0;
  for (  Column col : results) {
    if (counter == 0) {
      byte[] data=col.getName();
      String hex=new String(Hex.encodeHex(data));
      Assert.assertEquals(-200.23,toDouble(col.getName()).doubleValue());
    }
    counter++;
  }
  Assert.assertEquals(5,counter);
}