Program: 31229
Project: 31229
Buggy source:
public CopyHelper compile(RecordMetadata from,RecordMetadata to){
  asm.clear();
  asm.setupPool();
  int thisClassIndex=asm.poolClass(asm.poolUtf8("String_Node_Str"));
  int interfaceClassIndex=asm.poolClass(asm.poolUtf8("String_Node_Str"));
  int recordClassIndex=asm.poolClass(asm.poolUtf8("String_Node_Str"));
  int writerClassIndex=asm.poolClass(asm.poolUtf8("String_Node_Str"));
  int rGetInt=asm.poolInterfaceMethod(recordClassIndex,asm.poolNameAndType(asm.poolUtf8("String_Node_Str"),asm.poolUtf8("String_Node_Str")));
  int rIntLong=asm.poolUtf8("String_Node_Str");
  int rGetLong=asm.poolInterfaceMethod(recordClassIndex,asm.poolNameAndType(asm.poolUtf8("String_Node_Str"),rIntLong));
  int rGetDate=asm.poolInterfaceMethod(recordClassIndex,asm.poolNameAndType(asm.poolUtf8("String_Node_Str"),rIntLong));
  int rGetByte=asm.poolInterfaceMethod(recordClassIndex,asm.poolNameAndType(asm.poolUtf8("String_Node_Str"),asm.poolUtf8("String_Node_Str")));
  int rGetShort=asm.poolInterfaceMethod(recordClassIndex,asm.poolNameAndType(asm.poolUtf8("String_Node_Str"),asm.poolUtf8("String_Node_Str")));
  int rGetBool=asm.poolInterfaceMethod(recordClassIndex,asm.poolNameAndType(asm.poolUtf8("String_Node_Str"),asm.poolUtf8("String_Node_Str")));
  int rGetFloat=asm.poolInterfaceMethod(recordClassIndex,asm.poolNameAndType(asm.poolUtf8("String_Node_Str"),asm.poolUtf8("String_Node_Str")));
  int rGetDouble=asm.poolInterfaceMethod(recordClassIndex,asm.poolNameAndType(asm.poolUtf8("String_Node_Str"),asm.poolUtf8("String_Node_Str")));
  int rGetSym=asm.poolInterfaceMethod(recordClassIndex,asm.poolNameAndType(asm.poolUtf8("String_Node_Str"),asm.poolUtf8("String_Node_Str")));
  int rGetStr=asm.poolInterfaceMethod(recordClassIndex,asm.poolNameAndType(asm.poolUtf8("String_Node_Str"),asm.poolUtf8("String_Node_Str")));
  int rGetBin=asm.poolInterfaceMethod(recordClassIndex,asm.poolNameAndType(asm.poolUtf8("String_Node_Str"),asm.poolUtf8("String_Node_Str")));
  int wPutInt=asm.poolInterfaceMethod(writerClassIndex,asm.poolNameAndType(asm.poolUtf8("String_Node_Str"),asm.poolUtf8("String_Node_Str")));
  int wIntLong=asm.poolUtf8("String_Node_Str");
  int wPutLong=asm.poolInterfaceMethod(writerClassIndex,asm.poolNameAndType(asm.poolUtf8("String_Node_Str"),wIntLong));
  int wPutDate=asm.poolInterfaceMethod(writerClassIndex,asm.poolNameAndType(asm.poolUtf8("String_Node_Str"),wIntLong));
  int wPutByte=asm.poolInterfaceMethod(writerClassIndex,asm.poolNameAndType(asm.poolUtf8("String_Node_Str"),asm.poolUtf8("String_Node_Str")));
  int wPutShort=asm.poolInterfaceMethod(writerClassIndex,asm.poolNameAndType(asm.poolUtf8("String_Node_Str"),asm.poolUtf8("String_Node_Str")));
  int wPutBool=asm.poolInterfaceMethod(writerClassIndex,asm.poolNameAndType(asm.poolUtf8("String_Node_Str"),asm.poolUtf8("String_Node_Str")));
  int wPutFloat=asm.poolInterfaceMethod(writerClassIndex,asm.poolNameAndType(asm.poolUtf8("String_Node_Str"),asm.poolUtf8("String_Node_Str")));
  int wPutDouble=asm.poolInterfaceMethod(writerClassIndex,asm.poolNameAndType(asm.poolUtf8("String_Node_Str"),asm.poolUtf8("String_Node_Str")));
  int wPutSym=asm.poolInterfaceMethod(writerClassIndex,asm.poolNameAndType(asm.poolUtf8("String_Node_Str"),asm.poolUtf8("String_Node_Str")));
  int wPutStr=asm.poolInterfaceMethod(writerClassIndex,asm.poolNameAndType(asm.poolUtf8("String_Node_Str"),asm.poolUtf8("String_Node_Str")));
  int wPutBin=asm.poolInterfaceMethod(writerClassIndex,asm.poolNameAndType(asm.poolUtf8("String_Node_Str"),asm.poolUtf8("String_Node_Str")));
  int copyNameIndex=asm.poolUtf8("String_Node_Str");
  int copySigIndex=asm.poolUtf8("String_Node_Str");
  asm.finishPool();
  asm.defineClass(1,thisClassIndex);
  asm.putShort(1);
  asm.putShort(interfaceClassIndex);
  asm.putShort(0);
  asm.putShort(2);
  asm.defineDefaultConstructor();
  asm.startMethod(0x01,copyNameIndex,copySigIndex,4,3);
  int n=from.getColumnCount();
  for (int i=0; i < n; i++) {
    asm.put(BytecodeAssembler.aload_2);
    asm.putConstant(i);
    asm.put(BytecodeAssembler.aload_1);
    asm.putConstant(i);
switch (from.getColumnQuick(i).getType()) {
case ColumnType.INT:
      asm.invokeInterface(rGetInt,1);
switch (to.getColumnQuick(i).getType()) {
case ColumnType.LONG:
      asm.put(BytecodeAssembler.i2l);
    asm.invokeInterface(wPutLong,3);
  break;
case ColumnType.DATE:
asm.put(BytecodeAssembler.i2l);
asm.invokeInterface(wPutDate,3);
break;
case ColumnType.SHORT:
asm.put(BytecodeAssembler.i2s);
asm.invokeInterface(wPutShort,2);
break;
case ColumnType.BYTE:
asm.put(BytecodeAssembler.i2b);
asm.invokeInterface(wPutByte,2);
break;
case ColumnType.FLOAT:
asm.put(BytecodeAssembler.i2f);
asm.invokeInterface(wPutFloat,2);
break;
case ColumnType.DOUBLE:
asm.put(BytecodeAssembler.i2d);
asm.invokeInterface(wPutDouble,3);
break;
default :
asm.invokeInterface(wPutInt,2);
break;
}
break;
case ColumnType.LONG:
asm.invokeInterface(rGetLong,1);
switch (to.getColumnQuick(i).getType()) {
case ColumnType.INT:
asm.put(BytecodeAssembler.l2i);
asm.invokeInterface(wPutInt,2);
break;
case ColumnType.DATE:
asm.invokeInterface(wPutDate,3);
break;
case ColumnType.SHORT:
asm.put(BytecodeAssembler.l2i);
asm.put(BytecodeAssembler.i2s);
asm.invokeInterface(wPutShort,2);
break;
case ColumnType.BYTE:
asm.put(BytecodeAssembler.l2i);
asm.put(BytecodeAssembler.i2b);
asm.invokeInterface(wPutByte,2);
break;
case ColumnType.FLOAT:
asm.put(BytecodeAssembler.l2f);
asm.invokeInterface(wPutFloat,2);
break;
case ColumnType.DOUBLE:
asm.put(BytecodeAssembler.l2d);
asm.invokeInterface(wPutDouble,3);
break;
default :
asm.invokeInterface(wPutLong,3);
break;
}
break;
case ColumnType.DATE:
asm.invokeInterface(rGetDate,1);
switch (to.getColumnQuick(i).getType()) {
case ColumnType.INT:
asm.put(BytecodeAssembler.l2i);
asm.invokeInterface(wPutInt,2);
break;
case ColumnType.LONG:
asm.invokeInterface(wPutLong,3);
break;
case ColumnType.SHORT:
asm.put(BytecodeAssembler.l2i);
asm.put(BytecodeAssembler.i2s);
asm.invokeInterface(wPutShort,2);
break;
case ColumnType.BYTE:
asm.put(BytecodeAssembler.l2i);
asm.put(BytecodeAssembler.i2b);
asm.invokeInterface(wPutByte,2);
break;
case ColumnType.FLOAT:
asm.put(BytecodeAssembler.l2f);
asm.invokeInterface(wPutFloat,2);
break;
case ColumnType.DOUBLE:
asm.put(BytecodeAssembler.l2d);
asm.invokeInterface(wPutDouble,3);
break;
default :
asm.invokeInterface(wPutDate,3);
break;
}
break;
case ColumnType.BYTE:
asm.invokeInterface(rGetByte,1);
switch (to.getColumnQuick(i).getType()) {
case ColumnType.INT:
asm.invokeInterface(wPutInt,2);
break;
case ColumnType.LONG:
asm.put(BytecodeAssembler.i2l);
asm.invokeInterface(wPutLong,3);
break;
case ColumnType.DATE:
asm.put(BytecodeAssembler.i2l);
asm.invokeInterface(wPutDate,3);
break;
case ColumnType.SHORT:
asm.put(BytecodeAssembler.i2s);
asm.invokeInterface(wPutShort,2);
break;
case ColumnType.FLOAT:
asm.put(BytecodeAssembler.i2f);
asm.invokeInterface(wPutFloat,2);
break;
case ColumnType.DOUBLE:
asm.put(BytecodeAssembler.i2d);
asm.invokeInterface(wPutDouble,3);
break;
default :
asm.invokeInterface(wPutByte,2);
break;
}
break;
case ColumnType.SHORT:
asm.invokeInterface(rGetShort,1);
switch (to.getColumnQuick(i).getType()) {
case ColumnType.INT:
asm.invokeInterface(wPutInt,2);
break;
case ColumnType.LONG:
asm.put(BytecodeAssembler.i2l);
asm.invokeInterface(wPutLong,3);
break;
case ColumnType.DATE:
asm.put(BytecodeAssembler.i2l);
asm.invokeInterface(wPutDate,3);
break;
case ColumnType.BYTE:
asm.put(BytecodeAssembler.i2b);
asm.invokeInterface(wPutByte,2);
break;
case ColumnType.FLOAT:
asm.put(BytecodeAssembler.i2f);
asm.invokeInterface(wPutFloat,2);
break;
case ColumnType.DOUBLE:
asm.put(BytecodeAssembler.i2d);
asm.invokeInterface(wPutDouble,3);
break;
default :
asm.invokeInterface(wPutShort,2);
break;
}
break;
case ColumnType.BOOLEAN:
asm.invokeInterface(rGetBool,1);
asm.invokeInterface(wPutBool,2);
break;
case ColumnType.FLOAT:
asm.invokeInterface(rGetFloat,1);
switch (to.getColumnQuick(i).getType()) {
case ColumnType.INT:
asm.put(BytecodeAssembler.f2i);
asm.invokeInterface(wPutInt,2);
break;
case ColumnType.LONG:
asm.put(BytecodeAssembler.f2l);
asm.invokeInterface(wPutLong,3);
break;
case ColumnType.DATE:
asm.put(BytecodeAssembler.f2l);
asm.invokeInterface(wPutDate,3);
break;
case ColumnType.SHORT:
asm.put(BytecodeAssembler.f2i);
asm.put(BytecodeAssembler.i2s);
asm.invokeInterface(wPutShort,2);
break;
case ColumnType.BYTE:
asm.put(BytecodeAssembler.f2i);
asm.put(BytecodeAssembler.i2b);
asm.invokeInterface(wPutByte,2);
break;
case ColumnType.DOUBLE:
asm.put(BytecodeAssembler.f2d);
asm.invokeInterface(wPutDouble,3);
break;
default :
asm.invokeInterface(wPutFloat,2);
break;
}
break;
case ColumnType.DOUBLE:
asm.invokeInterface(rGetDouble,1);
switch (to.getColumnQuick(i).getType()) {
case ColumnType.INT:
asm.put(BytecodeAssembler.d2i);
asm.invokeInterface(wPutInt,2);
break;
case ColumnType.LONG:
asm.put(BytecodeAssembler.d2l);
asm.invokeInterface(wPutLong,3);
break;
case ColumnType.DATE:
asm.put(BytecodeAssembler.d2l);
asm.invokeInterface(wPutDate,3);
break;
case ColumnType.SHORT:
asm.put(BytecodeAssembler.d2i);
asm.put(BytecodeAssembler.i2s);
asm.invokeInterface(wPutShort,2);
break;
case ColumnType.BYTE:
asm.put(BytecodeAssembler.d2i);
asm.put(BytecodeAssembler.i2b);
asm.invokeInterface(wPutByte,2);
break;
case ColumnType.FLOAT:
asm.put(BytecodeAssembler.d2f);
asm.invokeInterface(wPutFloat,2);
break;
default :
asm.invokeInterface(wPutDouble,3);
break;
}
break;
case ColumnType.SYMBOL:
asm.invokeInterface(rGetSym,1);
switch (to.getColumnQuick(i).getType()) {
case ColumnType.STRING:
asm.invokeInterface(wPutStr,2);
break;
default :
asm.invokeInterface(wPutSym,2);
break;
}
break;
case ColumnType.STRING:
asm.invokeInterface(rGetStr,1);
switch (to.getColumnQuick(i).getType()) {
case ColumnType.SYMBOL:
asm.invokeInterface(wPutSym,2);
break;
default :
asm.invokeInterface(wPutStr,2);
break;
}
break;
case ColumnType.BINARY:
asm.invokeInterface(rGetBin,1);
asm.invokeInterface(wPutBin,2);
break;
default :
break;
}
}
asm.put(BytecodeAssembler.return_);
asm.endMethodCode();
asm.putShort(0);
asm.putShort(0);
asm.endMethod();
asm.putShort(0);
try {
return (CopyHelper)asm.loadClass(ComparatorCompiler.class).newInstance();
}
 catch (Exception e) {
throw new JournalRuntimeException("String_Node_Str",e);
}
}

Fixed version (ground truth):
public CopyHelper compile(RecordMetadata from,RecordMetadata to){
  int tsIndex=to.getTimestampIndex();
  asm.clear();
  asm.setupPool();
  int thisClassIndex=asm.poolClass(asm.poolUtf8("String_Node_Str"));
  int interfaceClassIndex=asm.poolClass(asm.poolUtf8("String_Node_Str"));
  int recordClassIndex=asm.poolClass(asm.poolUtf8("String_Node_Str"));
  int writerClassIndex=asm.poolClass(asm.poolUtf8("String_Node_Str"));
  int rGetInt=asm.poolInterfaceMethod(recordClassIndex,asm.poolNameAndType(asm.poolUtf8("String_Node_Str"),asm.poolUtf8("String_Node_Str")));
  int rIntLong=asm.poolUtf8("String_Node_Str");
  int rGetLong=asm.poolInterfaceMethod(recordClassIndex,asm.poolNameAndType(asm.poolUtf8("String_Node_Str"),rIntLong));
  int rGetDate=asm.poolInterfaceMethod(recordClassIndex,asm.poolNameAndType(asm.poolUtf8("String_Node_Str"),rIntLong));
  int rGetByte=asm.poolInterfaceMethod(recordClassIndex,asm.poolNameAndType(asm.poolUtf8("String_Node_Str"),asm.poolUtf8("String_Node_Str")));
  int rGetShort=asm.poolInterfaceMethod(recordClassIndex,asm.poolNameAndType(asm.poolUtf8("String_Node_Str"),asm.poolUtf8("String_Node_Str")));
  int rGetBool=asm.poolInterfaceMethod(recordClassIndex,asm.poolNameAndType(asm.poolUtf8("String_Node_Str"),asm.poolUtf8("String_Node_Str")));
  int rGetFloat=asm.poolInterfaceMethod(recordClassIndex,asm.poolNameAndType(asm.poolUtf8("String_Node_Str"),asm.poolUtf8("String_Node_Str")));
  int rGetDouble=asm.poolInterfaceMethod(recordClassIndex,asm.poolNameAndType(asm.poolUtf8("String_Node_Str"),asm.poolUtf8("String_Node_Str")));
  int rGetSym=asm.poolInterfaceMethod(recordClassIndex,asm.poolNameAndType(asm.poolUtf8("String_Node_Str"),asm.poolUtf8("String_Node_Str")));
  int rGetStr=asm.poolInterfaceMethod(recordClassIndex,asm.poolNameAndType(asm.poolUtf8("String_Node_Str"),asm.poolUtf8("String_Node_Str")));
  int rGetBin=asm.poolInterfaceMethod(recordClassIndex,asm.poolNameAndType(asm.poolUtf8("String_Node_Str"),asm.poolUtf8("String_Node_Str")));
  int wPutInt=asm.poolInterfaceMethod(writerClassIndex,asm.poolNameAndType(asm.poolUtf8("String_Node_Str"),asm.poolUtf8("String_Node_Str")));
  int wIntLong=asm.poolUtf8("String_Node_Str");
  int wPutLong=asm.poolInterfaceMethod(writerClassIndex,asm.poolNameAndType(asm.poolUtf8("String_Node_Str"),wIntLong));
  int wPutDate=asm.poolInterfaceMethod(writerClassIndex,asm.poolNameAndType(asm.poolUtf8("String_Node_Str"),wIntLong));
  int wPutByte=asm.poolInterfaceMethod(writerClassIndex,asm.poolNameAndType(asm.poolUtf8("String_Node_Str"),asm.poolUtf8("String_Node_Str")));
  int wPutShort=asm.poolInterfaceMethod(writerClassIndex,asm.poolNameAndType(asm.poolUtf8("String_Node_Str"),asm.poolUtf8("String_Node_Str")));
  int wPutBool=asm.poolInterfaceMethod(writerClassIndex,asm.poolNameAndType(asm.poolUtf8("String_Node_Str"),asm.poolUtf8("String_Node_Str")));
  int wPutFloat=asm.poolInterfaceMethod(writerClassIndex,asm.poolNameAndType(asm.poolUtf8("String_Node_Str"),asm.poolUtf8("String_Node_Str")));
  int wPutDouble=asm.poolInterfaceMethod(writerClassIndex,asm.poolNameAndType(asm.poolUtf8("String_Node_Str"),asm.poolUtf8("String_Node_Str")));
  int wPutSym=asm.poolInterfaceMethod(writerClassIndex,asm.poolNameAndType(asm.poolUtf8("String_Node_Str"),asm.poolUtf8("String_Node_Str")));
  int wPutStr=asm.poolInterfaceMethod(writerClassIndex,asm.poolNameAndType(asm.poolUtf8("String_Node_Str"),asm.poolUtf8("String_Node_Str")));
  int wPutBin=asm.poolInterfaceMethod(writerClassIndex,asm.poolNameAndType(asm.poolUtf8("String_Node_Str"),asm.poolUtf8("String_Node_Str")));
  int copyNameIndex=asm.poolUtf8("String_Node_Str");
  int copySigIndex=asm.poolUtf8("String_Node_Str");
  asm.finishPool();
  asm.defineClass(1,thisClassIndex);
  asm.putShort(1);
  asm.putShort(interfaceClassIndex);
  asm.putShort(0);
  asm.putShort(2);
  asm.defineDefaultConstructor();
  asm.startMethod(0x01,copyNameIndex,copySigIndex,4,3);
  int n=from.getColumnCount();
  for (int i=0; i < n; i++) {
    if (i == tsIndex) {
      continue;
    }
    asm.put(BytecodeAssembler.aload_2);
    asm.putConstant(i);
    asm.put(BytecodeAssembler.aload_1);
    asm.putConstant(i);
switch (from.getColumnQuick(i).getType()) {
case ColumnType.INT:
      asm.invokeInterface(rGetInt,1);
switch (to.getColumnQuick(i).getType()) {
case ColumnType.LONG:
      asm.put(BytecodeAssembler.i2l);
    asm.invokeInterface(wPutLong,3);
  break;
case ColumnType.DATE:
asm.put(BytecodeAssembler.i2l);
asm.invokeInterface(wPutDate,3);
break;
case ColumnType.SHORT:
asm.put(BytecodeAssembler.i2s);
asm.invokeInterface(wPutShort,2);
break;
case ColumnType.BYTE:
asm.put(BytecodeAssembler.i2b);
asm.invokeInterface(wPutByte,2);
break;
case ColumnType.FLOAT:
asm.put(BytecodeAssembler.i2f);
asm.invokeInterface(wPutFloat,2);
break;
case ColumnType.DOUBLE:
asm.put(BytecodeAssembler.i2d);
asm.invokeInterface(wPutDouble,3);
break;
default :
asm.invokeInterface(wPutInt,2);
break;
}
break;
case ColumnType.LONG:
asm.invokeInterface(rGetLong,1);
switch (to.getColumnQuick(i).getType()) {
case ColumnType.INT:
asm.put(BytecodeAssembler.l2i);
asm.invokeInterface(wPutInt,2);
break;
case ColumnType.DATE:
asm.invokeInterface(wPutDate,3);
break;
case ColumnType.SHORT:
asm.put(BytecodeAssembler.l2i);
asm.put(BytecodeAssembler.i2s);
asm.invokeInterface(wPutShort,2);
break;
case ColumnType.BYTE:
asm.put(BytecodeAssembler.l2i);
asm.put(BytecodeAssembler.i2b);
asm.invokeInterface(wPutByte,2);
break;
case ColumnType.FLOAT:
asm.put(BytecodeAssembler.l2f);
asm.invokeInterface(wPutFloat,2);
break;
case ColumnType.DOUBLE:
asm.put(BytecodeAssembler.l2d);
asm.invokeInterface(wPutDouble,3);
break;
default :
asm.invokeInterface(wPutLong,3);
break;
}
break;
case ColumnType.DATE:
asm.invokeInterface(rGetDate,1);
switch (to.getColumnQuick(i).getType()) {
case ColumnType.INT:
asm.put(BytecodeAssembler.l2i);
asm.invokeInterface(wPutInt,2);
break;
case ColumnType.LONG:
asm.invokeInterface(wPutLong,3);
break;
case ColumnType.SHORT:
asm.put(BytecodeAssembler.l2i);
asm.put(BytecodeAssembler.i2s);
asm.invokeInterface(wPutShort,2);
break;
case ColumnType.BYTE:
asm.put(BytecodeAssembler.l2i);
asm.put(BytecodeAssembler.i2b);
asm.invokeInterface(wPutByte,2);
break;
case ColumnType.FLOAT:
asm.put(BytecodeAssembler.l2f);
asm.invokeInterface(wPutFloat,2);
break;
case ColumnType.DOUBLE:
asm.put(BytecodeAssembler.l2d);
asm.invokeInterface(wPutDouble,3);
break;
default :
asm.invokeInterface(wPutDate,3);
break;
}
break;
case ColumnType.BYTE:
asm.invokeInterface(rGetByte,1);
switch (to.getColumnQuick(i).getType()) {
case ColumnType.INT:
asm.invokeInterface(wPutInt,2);
break;
case ColumnType.LONG:
asm.put(BytecodeAssembler.i2l);
asm.invokeInterface(wPutLong,3);
break;
case ColumnType.DATE:
asm.put(BytecodeAssembler.i2l);
asm.invokeInterface(wPutDate,3);
break;
case ColumnType.SHORT:
asm.put(BytecodeAssembler.i2s);
asm.invokeInterface(wPutShort,2);
break;
case ColumnType.FLOAT:
asm.put(BytecodeAssembler.i2f);
asm.invokeInterface(wPutFloat,2);
break;
case ColumnType.DOUBLE:
asm.put(BytecodeAssembler.i2d);
asm.invokeInterface(wPutDouble,3);
break;
default :
asm.invokeInterface(wPutByte,2);
break;
}
break;
case ColumnType.SHORT:
asm.invokeInterface(rGetShort,1);
switch (to.getColumnQuick(i).getType()) {
case ColumnType.INT:
asm.invokeInterface(wPutInt,2);
break;
case ColumnType.LONG:
asm.put(BytecodeAssembler.i2l);
asm.invokeInterface(wPutLong,3);
break;
case ColumnType.DATE:
asm.put(BytecodeAssembler.i2l);
asm.invokeInterface(wPutDate,3);
break;
case ColumnType.BYTE:
asm.put(BytecodeAssembler.i2b);
asm.invokeInterface(wPutByte,2);
break;
case ColumnType.FLOAT:
asm.put(BytecodeAssembler.i2f);
asm.invokeInterface(wPutFloat,2);
break;
case ColumnType.DOUBLE:
asm.put(BytecodeAssembler.i2d);
asm.invokeInterface(wPutDouble,3);
break;
default :
asm.invokeInterface(wPutShort,2);
break;
}
break;
case ColumnType.BOOLEAN:
asm.invokeInterface(rGetBool,1);
asm.invokeInterface(wPutBool,2);
break;
case ColumnType.FLOAT:
asm.invokeInterface(rGetFloat,1);
switch (to.getColumnQuick(i).getType()) {
case ColumnType.INT:
asm.put(BytecodeAssembler.f2i);
asm.invokeInterface(wPutInt,2);
break;
case ColumnType.LONG:
asm.put(BytecodeAssembler.f2l);
asm.invokeInterface(wPutLong,3);
break;
case ColumnType.DATE:
asm.put(BytecodeAssembler.f2l);
asm.invokeInterface(wPutDate,3);
break;
case ColumnType.SHORT:
asm.put(BytecodeAssembler.f2i);
asm.put(BytecodeAssembler.i2s);
asm.invokeInterface(wPutShort,2);
break;
case ColumnType.BYTE:
asm.put(BytecodeAssembler.f2i);
asm.put(BytecodeAssembler.i2b);
asm.invokeInterface(wPutByte,2);
break;
case ColumnType.DOUBLE:
asm.put(BytecodeAssembler.f2d);
asm.invokeInterface(wPutDouble,3);
break;
default :
asm.invokeInterface(wPutFloat,2);
break;
}
break;
case ColumnType.DOUBLE:
asm.invokeInterface(rGetDouble,1);
switch (to.getColumnQuick(i).getType()) {
case ColumnType.INT:
asm.put(BytecodeAssembler.d2i);
asm.invokeInterface(wPutInt,2);
break;
case ColumnType.LONG:
asm.put(BytecodeAssembler.d2l);
asm.invokeInterface(wPutLong,3);
break;
case ColumnType.DATE:
asm.put(BytecodeAssembler.d2l);
asm.invokeInterface(wPutDate,3);
break;
case ColumnType.SHORT:
asm.put(BytecodeAssembler.d2i);
asm.put(BytecodeAssembler.i2s);
asm.invokeInterface(wPutShort,2);
break;
case ColumnType.BYTE:
asm.put(BytecodeAssembler.d2i);
asm.put(BytecodeAssembler.i2b);
asm.invokeInterface(wPutByte,2);
break;
case ColumnType.FLOAT:
asm.put(BytecodeAssembler.d2f);
asm.invokeInterface(wPutFloat,2);
break;
default :
asm.invokeInterface(wPutDouble,3);
break;
}
break;
case ColumnType.SYMBOL:
asm.invokeInterface(rGetSym,1);
switch (to.getColumnQuick(i).getType()) {
case ColumnType.STRING:
asm.invokeInterface(wPutStr,2);
break;
default :
asm.invokeInterface(wPutSym,2);
break;
}
break;
case ColumnType.STRING:
asm.invokeInterface(rGetStr,1);
switch (to.getColumnQuick(i).getType()) {
case ColumnType.SYMBOL:
asm.invokeInterface(wPutSym,2);
break;
default :
asm.invokeInterface(wPutStr,2);
break;
}
break;
case ColumnType.BINARY:
asm.invokeInterface(rGetBin,1);
asm.invokeInterface(wPutBin,2);
break;
default :
break;
}
}
asm.put(BytecodeAssembler.return_);
asm.endMethodCode();
asm.putShort(0);
asm.putShort(0);
asm.endMethod();
asm.putShort(0);
try {
return (CopyHelper)asm.loadClass(ComparatorCompiler.class).newInstance();
}
 catch (Exception e) {
throw new JournalRuntimeException("String_Node_Str",e);
}
}