nus-yam/ex-repair huggingface dataset:
Program: 172711
Project: 172711
Buggy source:
public void T_createBinary_bytes_1() throws IOException {
  String str="String_Node_Str";
  byte[] bytes=str.getBytes("String_Node_Str");
  ColumnBinary columnBinary=ConstantColumnBinaryMaker.createColumnBinary(new BytesObj(bytes),"String_Node_Str",3);
  assertEquals(columnBinary.columnName,"String_Node_Str");
  assertEquals(columnBinary.rowCount,3);
  assertEquals(columnBinary.columnType,ColumnType.BYTES);
  ConstantColumnBinaryMaker maker=new ConstantColumnBinaryMaker();
  IColumn decodeColumn=maker.toColumn(columnBinary);
  assertEquals(decodeColumn.getColumnKeys().size(),0);
  assertEquals(decodeColumn.getColumnSize(),0);
  assertEquals(str,((PrimitiveObject)(decodeColumn.get(0).getRow())).getString());
  assertEquals(str,((PrimitiveObject)(decodeColumn.get(1).getRow())).getString());
  assertEquals(str,((PrimitiveObject)(decodeColumn.get(2).getRow())).getString());
  assertNull(decodeColumn.get(3).getRow());
}

Fixed version (ground truth):
@Test public void T_createBinary_bytes_1() throws IOException {
  String str="String_Node_Str";
  byte[] bytes=str.getBytes("String_Node_Str");
  ColumnBinary columnBinary=ConstantColumnBinaryMaker.createColumnBinary(new BytesObj(bytes),"String_Node_Str",3);
  assertEquals(columnBinary.columnName,"String_Node_Str");
  assertEquals(columnBinary.rowCount,3);
  assertEquals(columnBinary.columnType,ColumnType.BYTES);
  ConstantColumnBinaryMaker maker=new ConstantColumnBinaryMaker();
  IColumn decodeColumn=maker.toColumn(columnBinary);
  assertEquals(decodeColumn.getColumnKeys().size(),0);
  assertEquals(decodeColumn.getColumnSize(),0);
  assertEquals(str,((PrimitiveObject)(decodeColumn.get(0).getRow())).getString());
  assertEquals(str,((PrimitiveObject)(decodeColumn.get(1).getRow())).getString());
  assertEquals(str,((PrimitiveObject)(decodeColumn.get(2).getRow())).getString());
  assertNull(decodeColumn.get(3).getRow());
}
Program: 172712
Project: 172712
Buggy source:
public void T_createBinary_double_1() throws IOException {
  ColumnBinary columnBinary=ConstantColumnBinaryMaker.createColumnBinary(new DoubleObj((double)0.1),"String_Node_Str",3);
  assertEquals(columnBinary.columnName,"String_Node_Str");
  assertEquals(columnBinary.rowCount,3);
  assertEquals(columnBinary.columnType,ColumnType.DOUBLE);
  ConstantColumnBinaryMaker maker=new ConstantColumnBinaryMaker();
  IColumn decodeColumn=maker.toColumn(columnBinary);
  assertEquals(decodeColumn.getColumnKeys().size(),0);
  assertEquals(decodeColumn.getColumnSize(),0);
  assertEquals((double)0.1,((PrimitiveObject)(decodeColumn.get(0).getRow())).getDouble());
  assertEquals((double)0.1,((PrimitiveObject)(decodeColumn.get(1).getRow())).getDouble());
  assertEquals((double)0.1,((PrimitiveObject)(decodeColumn.get(2).getRow())).getDouble());
  assertNull(decodeColumn.get(3).getRow());
}

Fixed version (ground truth):
@Test public void T_createBinary_double_1() throws IOException {
  ColumnBinary columnBinary=ConstantColumnBinaryMaker.createColumnBinary(new DoubleObj((double)0.1),"String_Node_Str",3);
  assertEquals(columnBinary.columnName,"String_Node_Str");
  assertEquals(columnBinary.rowCount,3);
  assertEquals(columnBinary.columnType,ColumnType.DOUBLE);
  ConstantColumnBinaryMaker maker=new ConstantColumnBinaryMaker();
  IColumn decodeColumn=maker.toColumn(columnBinary);
  assertEquals(decodeColumn.getColumnKeys().size(),0);
  assertEquals(decodeColumn.getColumnSize(),0);
  assertEquals((double)0.1,((PrimitiveObject)(decodeColumn.get(0).getRow())).getDouble());
  assertEquals((double)0.1,((PrimitiveObject)(decodeColumn.get(1).getRow())).getDouble());
  assertEquals((double)0.1,((PrimitiveObject)(decodeColumn.get(2).getRow())).getDouble());
  assertNull(decodeColumn.get(3).getRow());
}
Program: 172713
Project: 172713
Buggy source:
@Override public Object getMapValueElement(final Object object,final Object key){
  if (object instanceof ColumnAndIndex) {
    ColumnAndIndex columnAndIndex=(ColumnAndIndex)object;
    IColumn childColumn=columnAndIndex.column.getColumn(key.toString());
    return getField.get(childColumn,columnAndIndex.index,columnAndIndex.columnIndex);
  }
 else {
    Map map=(Map)object;
    return map.get(key);
  }
}

Fixed version (ground truth):
@Override public Object getMapValueElement(final Object object,final Object key){
  if (object instanceof ColumnAndIndex) {
    ColumnAndIndex columnAndIndex=(ColumnAndIndex)object;
    IColumn childColumn=columnAndIndex.column.getColumn(key.toString());
    return getField.get(childColumn,columnAndIndex.index,columnAndIndex.columnIndex);
  }
 else {
    Map map=(Map)object;
    return map.get(key.toString());
  }
}
Program: 172714
Project: 172714
Buggy source:
@Override public boolean[] filter(final IFilter filter,final boolean[] filterArray) throws IOException {
  boolean[] searchResult=original.filter(filter,new boolean[original.size()]);
  if (searchResult == null) {
    return null;
  }
  for (int i=0; i < filterArray.length; i++) {
    if (searchResult[columnIndexArray[i]]) {
      filterArray[i]=true;
    }
  }
  return filterArray;
}

Fixed version (ground truth):
@Override public boolean[] filter(final IFilter filter,final boolean[] filterArray) throws IOException {
  boolean[] searchResult=original.filter(filter,new boolean[original.size()]);
  if (searchResult == null) {
    return null;
  }
  int index=0;
  for (; index < filterArray.length && columnIndexArray[index] < searchResult.length; index++) {
    if (searchResult[columnIndexArray[index]]) {
      filterArray[index]=true;
    }
  }
  for (; index < filterArray.length; index++) {
    filterArray[index]=true;
  }
  return filterArray;
}
Program: 172716
Project: 172716
Buggy source:
@Override public Object getMapValueElement(final Object object,final Object key){
  Map map=(Map)object;
  return map.get(key);
}

Fixed version (ground truth):
@Override public Object getMapValueElement(final Object object,final Object key){
  if (object instanceof ColumnAndIndex) {
    ColumnAndIndex columnAndIndex=(ColumnAndIndex)object;
    IColumn childColumn=columnAndIndex.column.getColumn(key.toString());
    return getField.get(childColumn,columnAndIndex.index,columnAndIndex.columnIndex);
  }
 else {
    Map map=(Map)object;
    return map.get(key);
  }
}
Program: 172717
Project: 172717
Buggy source:
@Override public boolean[] filter(final IFilter filter,final boolean[] filterArray) throws IOException {
switch (filter.getFilterType()) {
case NOT_NULL:
    for (int i=0; i < size(); i++) {
      if (dicIndexIntBuffer.get(i) != 0) {
        filterArray[i]=true;
      }
    }
  return filterArray;
case NULL:
for (int i=0; i < size(); i++) {
  if (dicIndexIntBuffer.get(i) == 0) {
    filterArray[i]=true;
  }
}
return filterArray;
default :
return index.filter(filter,filterArray);
}
}

Fixed version (ground truth):
@Override public boolean[] filter(final IFilter filter,final boolean[] filterArray) throws IOException {
switch (filter.getFilterType()) {
case NOT_NULL:
    if (columnType != ((INullFilter)filter).getTargetColumnType()) {
      return null;
    }
  for (int i=0; i < size(); i++) {
    if (dicIndexIntBuffer.get(i) != 0) {
      filterArray[i]=true;
    }
  }
return filterArray;
case NULL:
if (columnType != ((INullFilter)filter).getTargetColumnType()) {
return null;
}
for (int i=0; i < size(); i++) {
if (dicIndexIntBuffer.get(i) == 0) {
filterArray[i]=true;
}
}
return filterArray;
default :
return index.filter(filter,filterArray);
}
}
Program: 172718
Project: 172718
Buggy source:
@Override public boolean[] filter(final IFilter filter,final boolean[] filterArray) throws IOException {
switch (filter.getFilterType()) {
case NOT_NULL:
    return null;
case NULL:
  return new boolean[filterArray.length];
default :
return index.filter(filter,filterArray);
}
}

Fixed version (ground truth):
@Override public boolean[] filter(final IFilter filter,final boolean[] filterArray) throws IOException {
switch (filter.getFilterType()) {
case NOT_NULL:
    return null;
case NULL:
  if (columnType != ((INullFilter)filter).getTargetColumnType()) {
    return null;
  }
return new boolean[filterArray.length];
default :
return index.filter(filter,filterArray);
}
}
Program: 172719
Project: 172719
Buggy source:
public ConstantCellManager(final ColumnType columnType,final PrimitiveObject value,final int length){
  this.value=value;
  this.length=length;
  cell=new PrimitiveCell(columnType,value);
}

Fixed version (ground truth):
public ConstantCellManager(final ColumnType columnType,final PrimitiveObject value,final int length){
  this.columnType=columnType;
  this.value=value;
  this.length=length;
  cell=new PrimitiveCell(columnType,value);
}
Program: 172720
Project: 172720
Buggy source:
@Override public boolean[] filter(final IFilter filter,final boolean[] filterArray) throws IOException {
switch (filter.getFilterType()) {
case NOT_NULL:
    for (int i=0; i < cellArray.length; i++) {
      if (cellArray[i] != null) {
        filterArray[i]=true;
      }
    }
  return filterArray;
case NULL:
for (int i=0; i < cellArray.length; i++) {
  if (cellArray[i] == null) {
    filterArray[i]=true;
  }
}
return filterArray;
default :
return null;
}
}

Fixed version (ground truth):
@Override public boolean[] filter(final IFilter filter,final boolean[] filterArray) throws IOException {
switch (filter.getFilterType()) {
case NOT_NULL:
    return null;
case NULL:
  return null;
default :
return null;
}
}
Program: 172721
Project: 172721
Buggy source:
@Override public boolean[] filter(final IFilter filter,final boolean[] filterArray) throws IOException {
switch (filter.getFilterType()) {
case NOT_NULL:
    for (int i=0; i < buffer.length; i++) {
      if (buffer[i] != 2) {
        filterArray[i]=true;
      }
    }
  return filterArray;
case NULL:
for (int i=0; i < buffer.length; i++) {
  if (buffer[i] == 2) {
    filterArray[i]=true;
  }
}
return filterArray;
default :
return index.filter(filter,filterArray);
}
}

Fixed version (ground truth):
@Override public boolean[] filter(final IFilter filter,final boolean[] filterArray) throws IOException {
switch (filter.getFilterType()) {
case NOT_NULL:
    return null;
case NULL:
  return null;
default :
return index.filter(filter,filterArray);
}
}
Program: 172722
Project: 172722
Buggy source:
@Test public void T_filter_6() throws IOException {
  List<PrimitiveObject> dic=new ArrayList<PrimitiveObject>();
  dic.add(new StringObj("String_Node_Str"));
  dic.add(new StringObj("String_Node_Str"));
  dic.add(new StringObj("String_Node_Str"));
  dic.add(new StringObj("String_Node_Str"));
  dic.add(new StringObj("String_Node_Str"));
  IntBuffer buffer=IntBuffer.allocate(100);
  for (int i=0; i < 100; i++) {
    buffer.put(i % 5);
  }
  ICellIndex index=new BufferDirectSequentialStringCellIndex(new TestDicManager(dic),buffer);
  boolean[] result=index.filter(new NullFilter(),new boolean[100]);
  assertEquals(result,null);
}

Fixed version (ground truth):
@Test public void T_filter_6() throws IOException {
  List<PrimitiveObject> dic=new ArrayList<PrimitiveObject>();
  dic.add(new StringObj("String_Node_Str"));
  dic.add(new StringObj("String_Node_Str"));
  dic.add(new StringObj("String_Node_Str"));
  dic.add(new StringObj("String_Node_Str"));
  dic.add(new StringObj("String_Node_Str"));
  IntBuffer buffer=IntBuffer.allocate(100);
  for (int i=0; i < 100; i++) {
    buffer.put(i % 5);
  }
  ICellIndex index=new BufferDirectSequentialStringCellIndex(new TestDicManager(dic),buffer);
  boolean[] result=index.filter(new NullFilter(ColumnType.STRING),new boolean[100]);
  assertEquals(result,null);
}
Program: 172723
Project: 172723
Buggy source:
@Test public void T_filter_4() throws IOException {
  byte[] data=new byte[10];
  for (int i=0; i < 10; i++) {
    data[i]=(byte)(i % 2);
  }
  SequentialBooleanCellIndex index=new SequentialBooleanCellIndex(data);
  boolean[] result=index.filter(new NullFilter(),new boolean[10]);
  assertEquals(result,null);
}

Fixed version (ground truth):
@Test public void T_filter_4() throws IOException {
  byte[] data=new byte[10];
  for (int i=0; i < 10; i++) {
    data[i]=(byte)(i % 2);
  }
  SequentialBooleanCellIndex index=new SequentialBooleanCellIndex(data);
  boolean[] result=index.filter(new NullFilter(ColumnType.BOOLEAN),new boolean[10]);
  assertEquals(result,null);
}
Program: 172724
Project: 172724
Buggy source:
@Test(dataProvider="String_Node_Str") public void T_notnull_1(final IColumn column) throws IOException {
  int[] mustReadIndex={0,1,2,3,4,5,6,7,8,9,20,21,22,23,24,25,26,27,28,29};
  IFilter filter=new NotNullFilter();
  boolean[] filterResult=new boolean[30];
  filterResult=column.filter(filter,filterResult);
  if (filterResult == null) {
    assertTrue(true);
    return;
  }
  for (int i=0; i < mustReadIndex.length; i++) {
    assertTrue(filterResult[mustReadIndex[i]]);
  }
}

Fixed version (ground truth):
@Test(dataProvider="String_Node_Str") public void T_notnull_1(final IColumn column) throws IOException {
  int[] mustReadIndex={0,1,2,3,4,5,6,7,8,9,20,21,22,23,24,25,26,27,28,29};
  IFilter filter=new NotNullFilter(column.getColumnType());
  boolean[] filterResult=new boolean[30];
  filterResult=column.filter(filter,filterResult);
  if (filterResult == null) {
    assertTrue(true);
    return;
  }
  for (int i=0; i < mustReadIndex.length; i++) {
    assertTrue(filterResult[mustReadIndex[i]]);
  }
}
Program: 172725
Project: 172725
Buggy source:
@Test(dataProvider="String_Node_Str") public void T_null_1(final IColumn column) throws IOException {
  int[] mustReadIndex={10,11,12,13,14,15,16,17,18,19};
  IFilter filter=new NullFilter();
  boolean[] filterResult=new boolean[30];
  filterResult=column.filter(filter,filterResult);
  if (filterResult == null) {
    assertTrue(true);
    return;
  }
  for (int i=0; i < mustReadIndex.length; i++) {
    assertTrue(filterResult[mustReadIndex[i]]);
  }
}

Fixed version (ground truth):
@Test(dataProvider="String_Node_Str") public void T_null_1(final IColumn column) throws IOException {
  int[] mustReadIndex={10,11,12,13,14,15,16,17,18,19};
  IFilter filter=new NullFilter(column.getColumnType());
  boolean[] filterResult=new boolean[30];
  filterResult=column.filter(filter,filterResult);
  if (filterResult == null) {
    assertTrue(true);
    return;
  }
  for (int i=0; i < mustReadIndex.length; i++) {
    assertTrue(filterResult[mustReadIndex[i]]);
  }
}
Program: 172726
Project: 172726
Buggy source:
@Test public void getFilterType(){
  NotNullFilter target=new NotNullFilter();
  assertEquals(target.getFilterType(),FilterType.NOT_NULL);
}

Fixed version (ground truth):
@Test public void getFilterType(){
  NotNullFilter target=new NotNullFilter(ColumnType.NULL);
  assertEquals(target.getFilterType(),FilterType.NOT_NULL);
}
Program: 172727
Project: 172727
Buggy source:
@Test public void getFilterType(){
  NullFilter target=new NullFilter();
  assertEquals(target.getFilterType(),FilterType.NULL);
}

Fixed version (ground truth):
@Test public void getFilterType(){
  NullFilter target=new NullFilter(ColumnType.NULL);
  assertEquals(target.getFilterType(),FilterType.NULL);
}
Program: 172729
Project: 172729
Buggy source:
@Override public void loadInMemoryStorage(final ColumnBinary columnBinary,final IMemoryAllocator allocator) throws IOException {
  for (  ColumnBinary childColumnBinary : columnBinary.columnBinaryList) {
    IColumnBinaryMaker maker=FindColumnBinaryMaker.get(childColumnBinary.makerClassName);
    IMemoryAllocator childMemoryAllocator=allocator.getChild(childColumnBinary.columnName,childColumnBinary.columnType);
    maker.loadInMemoryStorage(childColumnBinary,childMemoryAllocator);
  }
  ICompressor compressor=FindCompressor.get(columnBinary.compressorClassName);
  byte[] decompressBuffer=compressor.decompress(columnBinary.binary,columnBinary.binaryStart,columnBinary.binaryLength);
  IntBuffer buffer=ByteBuffer.wrap(decompressBuffer).asIntBuffer();
  int length=buffer.capacity();
  int currentIndex=0;
  for (int i=0; i < length; i++) {
    int arrayLength=buffer.get();
    if (arrayLength != 0) {
      int start=currentIndex;
      allocator.setArrayIndex(i,start,arrayLength);
      currentIndex+=arrayLength;
    }
 else {
      allocator.setNull(i);
    }
  }
  allocator.setValueCount(length);
}

Fixed version (ground truth):
@Override public void loadInMemoryStorage(final ColumnBinary columnBinary,final IMemoryAllocator allocator) throws IOException {
  for (  ColumnBinary childColumnBinary : columnBinary.columnBinaryList) {
    IColumnBinaryMaker maker=FindColumnBinaryMaker.get(childColumnBinary.makerClassName);
    IMemoryAllocator childMemoryAllocator=allocator.getArrayChild(childColumnBinary.rowCount,childColumnBinary.columnType);
    maker.loadInMemoryStorage(childColumnBinary,childMemoryAllocator);
  }
  ICompressor compressor=FindCompressor.get(columnBinary.compressorClassName);
  byte[] decompressBuffer=compressor.decompress(columnBinary.binary,columnBinary.binaryStart,columnBinary.binaryLength);
  IntBuffer buffer=ByteBuffer.wrap(decompressBuffer).asIntBuffer();
  int length=buffer.capacity();
  int currentIndex=0;
  for (int i=0; i < length; i++) {
    int arrayLength=buffer.get();
    if (arrayLength != 0) {
      int start=currentIndex;
      allocator.setArrayIndex(i,start,arrayLength);
      currentIndex+=arrayLength;
    }
 else {
      allocator.setNull(i);
    }
  }
  allocator.setValueCount(length);
}
Program: 172730
Project: 172730
Buggy source:
@Override public void loadInMemoryStorage(final ColumnBinary columnBinary,final IMemoryAllocator allocator) throws IOException {
  ByteBuffer headerWrapBuffer=ByteBuffer.wrap(columnBinary.binary,columnBinary.binaryStart,columnBinary.binaryLength);
  int minCharLength=headerWrapBuffer.getInt();
  headerWrapBuffer.position(headerWrapBuffer.position() + minCharLength);
  int maxCharLength=headerWrapBuffer.getInt();
  headerWrapBuffer.position(headerWrapBuffer.position() + maxCharLength);
  int headerSize=Integer.BYTES + minCharLength + Integer.BYTES+ maxCharLength;
  ICompressor compressor=FindCompressor.get(columnBinary.compressorClassName);
  byte[] binary=compressor.decompress(columnBinary.binary,columnBinary.binaryStart + headerSize,columnBinary.binaryLength - headerSize);
  ByteBuffer wrapBuffer=ByteBuffer.wrap(binary,0,binary.length);
  int minLength=wrapBuffer.getInt();
  int maxLength=wrapBuffer.getInt();
  boolean hasNull=wrapBuffer.getInt() == 1;
  byte[] nullFlagBytes=new byte[columnBinary.rowCount];
  boolean[] isNullArray=new boolean[columnBinary.rowCount];
  if (hasNull) {
    for (int i=0; i < isNullArray.length; i++) {
      isNullArray[i]=wrapBuffer.get() != 0;
    }
  }
  ILengthMaker lengthMaker=chooseLengthMaker(hasNull,minLength,maxLength);
  int[] startArray=lengthMaker.getStartArray(wrapBuffer,columnBinary.rowCount);
  int binaryStart=wrapBuffer.position();
  allocator.setBytesAndLength(binary,binaryStart,binary.length - binaryStart,startArray,isNullArray);
  allocator.setValueCount(columnBinary.rowCount);
}

Fixed version (ground truth):
@Override public void loadInMemoryStorage(final ColumnBinary columnBinary,final IMemoryAllocator allocator) throws IOException {
  ByteBuffer headerWrapBuffer=ByteBuffer.wrap(columnBinary.binary,columnBinary.binaryStart,columnBinary.binaryLength);
  int minCharLength=headerWrapBuffer.getInt();
  headerWrapBuffer.position(headerWrapBuffer.position() + minCharLength);
  int maxCharLength=headerWrapBuffer.getInt();
  headerWrapBuffer.position(headerWrapBuffer.position() + maxCharLength);
  int headerSize=Integer.BYTES + minCharLength + Integer.BYTES+ maxCharLength;
  ICompressor compressor=FindCompressor.get(columnBinary.compressorClassName);
  byte[] binary=compressor.decompress(columnBinary.binary,columnBinary.binaryStart + headerSize,columnBinary.binaryLength - headerSize);
  ByteBuffer wrapBuffer=ByteBuffer.wrap(binary,0,binary.length);
  int minLength=wrapBuffer.getInt();
  int maxLength=wrapBuffer.getInt();
  boolean hasNull=wrapBuffer.getInt() == 1;
  byte[] nullFlagBytes=new byte[columnBinary.rowCount];
  if (hasNull) {
    wrapBuffer.get(nullFlagBytes);
  }
  ILengthMaker lengthMaker=chooseLengthMaker(hasNull,minLength,maxLength);
  int[] lengthArray=lengthMaker.getLengthArray(wrapBuffer,columnBinary.rowCount);
  int currentStart=wrapBuffer.position();
  for (int i=0; i < columnBinary.rowCount; i++) {
    if (nullFlagBytes[i] == 0) {
      allocator.setBytes(i,binary,currentStart,lengthArray[i]);
      currentStart+=lengthArray[i];
    }
 else {
      allocator.setNull(i);
    }
  }
  allocator.setValueCount(columnBinary.rowCount);
}
Program: 172731
Project: 172731
Buggy source:
@Override public int calcBinarySize(final IColumnAnalizeResult analizeResult){
  return 0;
}

Fixed version (ground truth):
@Override public int calcBinarySize(final IColumnAnalizeResult analizeResult){
  StringColumnAnalizeResult stringAnalizeResult=(StringColumnAnalizeResult)analizeResult;
  boolean hasNull=analizeResult.getNullCount() != 0;
  if (!hasNull && analizeResult.getUniqCount() == 1) {
    return stringAnalizeResult.getUniqUtf8ByteSize();
  }
  int nullBinaryLength=stringAnalizeResult.getColumnSize();
  if (!hasNull) {
    nullBinaryLength=0;
  }
  ILengthMaker lengthMaker=chooseLengthMaker(hasNull,stringAnalizeResult.getMinUtf8Bytes(),stringAnalizeResult.getMaxUtf8Bytes());
  return Integer.BYTES * 2 + Integer.BYTES + nullBinaryLength + lengthMaker.calcBinarySize(stringAnalizeResult.getColumnSize()) + stringAnalizeResult.getTotalUtf8ByteSize();
}
Program: 172732
Project: 172732
Buggy source:
private void create() throws IOException {
  if (isCreate) {
    return;
  }
  ICompressor compressor=FindCompressor.get(columnBinary.compressorClassName);
  byte[] binary=compressor.decompress(columnBinary.binary,binaryStart,binaryLength);
  ByteBuffer wrapBuffer=ByteBuffer.wrap(binary,0,binary.length);
  int minLength=wrapBuffer.getInt();
  int maxLength=wrapBuffer.getInt();
  boolean hasNull=wrapBuffer.getInt() == 1;
  byte[] nullFlagBytes=new byte[columnBinary.rowCount];
  if (hasNull) {
    wrapBuffer.get(nullFlagBytes);
  }
  ILengthMaker lengthMaker=chooseLengthMaker(hasNull,minLength,maxLength);
  int[] lengthArray=lengthMaker.getLengthArray(wrapBuffer,columnBinary.rowCount);
  PrimitiveObject[] dicArray=new PrimitiveObject[columnBinary.rowCount];
  int currentStart=wrapBuffer.position();
  for (int i=0; i < columnBinary.rowCount; i++) {
    if (nullFlagBytes[i] == 0) {
      dicArray[i]=new UTF8BytesLinkObj(binary,currentStart,lengthArray[i]);
    }
    currentStart+=lengthArray[i];
  }
  column=new PrimitiveColumn(columnBinary.columnType,columnBinary.columnName);
  IDicManager dicManager=new RangeStringDicManager(dicArray);
  column.setCellManager(new BufferDirectCellManager(columnBinary.columnType,dicManager,columnBinary.rowCount));
  column.setIndex(new SequentialStringCellIndex(dicManager));
  isCreate=true;
}

Fixed version (ground truth):
private void create() throws IOException {
  if (isCreate) {
    return;
  }
  ICompressor compressor=FindCompressor.get(columnBinary.compressorClassName);
  byte[] binary=compressor.decompress(columnBinary.binary,binaryStart,binaryLength);
  ByteBuffer wrapBuffer=ByteBuffer.wrap(binary,0,binary.length);
  int minLength=wrapBuffer.getInt();
  int maxLength=wrapBuffer.getInt();
  boolean hasNull=wrapBuffer.getInt() == 1;
  byte[] nullFlagBytes=new byte[columnBinary.rowCount];
  if (hasNull) {
    wrapBuffer.get(nullFlagBytes);
  }
  ILengthMaker lengthMaker=chooseLengthMaker(hasNull,minLength,maxLength);
  int[] lengthArray=lengthMaker.getLengthArray(wrapBuffer,columnBinary.rowCount);
  PrimitiveObject[] dicArray=new PrimitiveObject[columnBinary.rowCount];
  int currentStart=wrapBuffer.position();
  for (int i=0; i < columnBinary.rowCount; i++) {
    if (nullFlagBytes[i] == 0) {
      dicArray[i]=new UTF8BytesLinkObj(binary,currentStart,lengthArray[i]);
      currentStart+=lengthArray[i];
    }
  }
  column=new PrimitiveColumn(columnBinary.columnType,columnBinary.columnName);
  IDicManager dicManager=new RangeStringDicManager(dicArray);
  column.setCellManager(new BufferDirectCellManager(columnBinary.columnType,dicManager,columnBinary.rowCount));
  column.setIndex(new SequentialStringCellIndex(dicManager));
  isCreate=true;
}
Program: 172733
Project: 172733
Buggy source:
public void appendRow(final List<ColumnBinary> binaryList,int spreadSize) throws IOException {
  if (!blockMaker.canAppend(binaryList)) {
    byte[] block=blockMaker.createFixedBlock();
    out.write(block,0,block.length);
  }
  blockMaker.append(spreadSize,binaryList);
}

Fixed version (ground truth):
public void appendRow(final List<ColumnBinary> binaryList,final int spreadSize) throws IOException {
  if (!blockMaker.canAppend(binaryList)) {
    byte[] block=blockMaker.createFixedBlock();
    out.write(block,0,block.length);
  }
  blockMaker.append(spreadSize,binaryList);
}
Program: 172734
Project: 172734
Buggy source:
public ColumnBinary(final String makerClassName,final String compressorClassName,final String columnName,final ColumnType columnType,final int rowCount,final int rawDataSize,final int logicalDataSize,int cardinality,final byte[] binary,final int binaryStart,final int binaryLength,final List<ColumnBinary> columnBinaryList){
  this.makerClassName=makerClassName;
  this.compressorClassName=compressorClassName;
  this.columnName=columnName;
  this.columnType=columnType;
  this.rowCount=rowCount;
  this.rawDataSize=rawDataSize;
  this.logicalDataSize=logicalDataSize;
  this.cardinality=cardinality;
  this.binaryStart=binaryStart;
  this.binaryLength=binaryLength;
  this.binary=binary;
  this.columnBinaryList=columnBinaryList;
}

Fixed version (ground truth):
public ColumnBinary(final String makerClassName,final String compressorClassName,final String columnName,final ColumnType columnType,final int rowCount,final int rawDataSize,final int logicalDataSize,final int cardinality,final byte[] binary,final int binaryStart,final int binaryLength,final List<ColumnBinary> columnBinaryList){
  this.makerClassName=makerClassName;
  this.compressorClassName=compressorClassName;
  this.columnName=columnName;
  this.columnType=columnType;
  this.rowCount=rowCount;
  this.rawDataSize=rawDataSize;
  this.logicalDataSize=logicalDataSize;
  this.cardinality=cardinality;
  this.binaryStart=binaryStart;
  this.binaryLength=binaryLength;
  this.binary=binary;
  this.columnBinaryList=columnBinaryList;
}
Program: 172735
Project: 172735
Buggy source:
public static String getShortCutName(final String className){
  String shortCutName=classNamePair.getPair2(className);
  if (shortCutName == null) {
    return className;
  }
  return shortCutName;
}

Fixed version (ground truth):
public static String getShortCutName(final String className){
  String shortCutName=CLASS_NAME_PAIR.getPair2(className);
  if (shortCutName == null) {
    return className;
  }
  return shortCutName;
}
Program: 172736
Project: 172736
Buggy source:
public static String getClassName(final String shortCutName){
  String className=classNamePair.getPair1(shortCutName);
  if (className == null) {
    return shortCutName;
  }
  return className;
}

Fixed version (ground truth):
public static String getClassName(final String shortCutName){
  String className=CLASS_NAME_PAIR.getPair1(shortCutName);
  if (className == null) {
    return shortCutName;
  }
  return className;
}
Program: 172737
Project: 172737
Buggy source:
public static IField get(final ColumnBinary columnBinary) throws IOException {
switch (columnBinary.columnType) {
case UNION:
    UnionField unionSchema=new UnionField(columnBinary.columnName);
  for (  ColumnBinary childBinary : columnBinary.columnBinaryList) {
    unionSchema.set(get(childBinary));
  }
return unionSchema;
case ARRAY:
ArrayContainerField arraySchema=new ArrayContainerField(columnBinary.columnName,get(columnBinary.columnBinaryList.get(0)));
return arraySchema;
case SPREAD:
StructContainerField structSchema=new StructContainerField(columnBinary.columnName);
for (ColumnBinary childBinary : columnBinary.columnBinaryList) {
structSchema.set(get(childBinary));
}
return structSchema;
case BOOLEAN:
return new BooleanField(columnBinary.columnName);
case BYTE:
return new ByteField(columnBinary.columnName);
case BYTES:
return new BytesField(columnBinary.columnName);
case DOUBLE:
return new DoubleField(columnBinary.columnName);
case FLOAT:
return new FloatField(columnBinary.columnName);
case INTEGER:
return new IntegerField(columnBinary.columnName);
case LONG:
return new LongField(columnBinary.columnName);
case SHORT:
return new ShortField(columnBinary.columnName);
case STRING:
return new StringField(columnBinary.columnName);
default :
return new NullField(columnBinary.columnName);
}
}

Fixed version (ground truth):
public static IField get(final ColumnBinary columnBinary) throws IOException {
switch (columnBinary.columnType) {
case UNION:
    UnionField unionSchema=new UnionField(columnBinary.columnName);
  for (  ColumnBinary childBinary : columnBinary.columnBinaryList) {
    unionSchema.set(get(childBinary));
  }
return unionSchema;
case ARRAY:
return new ArrayContainerField(columnBinary.columnName,get(columnBinary.columnBinaryList.get(0)));
case SPREAD:
StructContainerField structSchema=new StructContainerField(columnBinary.columnName);
for (ColumnBinary childBinary : columnBinary.columnBinaryList) {
structSchema.set(get(childBinary));
}
return structSchema;
case BOOLEAN:
return new BooleanField(columnBinary.columnName);
case BYTE:
return new ByteField(columnBinary.columnName);
case BYTES:
return new BytesField(columnBinary.columnName);
case DOUBLE:
return new DoubleField(columnBinary.columnName);
case FLOAT:
return new FloatField(columnBinary.columnName);
case INTEGER:
return new IntegerField(columnBinary.columnName);
case LONG:
return new LongField(columnBinary.columnName);
case SHORT:
return new ShortField(columnBinary.columnName);
case STRING:
return new StringField(columnBinary.columnName);
default :
return new NullField(columnBinary.columnName);
}
}
Program: 172738
Project: 172738
Buggy source:
@Override public void setPrimitiveObjectArray(final IExpressionIndex indexList,final int start,final int length,final IMemoryAllocator allocator){
  int loopEnd=(start + length);
  if (indexList.size() < loopEnd) {
    loopEnd=indexList.size();
  }
  int index=0;
  for (int i=start; i < loopEnd; i++, index++) {
    int targetIndex=indexList.get(i);
    if (indexSize <= targetIndex) {
      break;
    }
    int dicIndex=dicIndexIntBuffer.get(targetIndex);
    try {
      if (dicIndex != 0) {
        allocator.setPrimitiveObject(index,dicManager.get(dicIndex));
      }
 else {
        allocator.setNull(index);
      }
    }
 catch (    IOException e) {
      throw new UncheckedIOException(e);
    }
  }
  for (int i=index; i < length; i++) {
    allocator.setNull(i);
  }
}

Fixed version (ground truth):
@Override public void setPrimitiveObjectArray(final IExpressionIndex indexList,final int start,final int length,final IMemoryAllocator allocator){
  int loopEnd=(start + length);
  if (indexList.size() < loopEnd) {
    loopEnd=indexList.size();
  }
  int index=0;
  for (int i=start; i < loopEnd; i++, index++) {
    int targetIndex=indexList.get(i);
    if (indexSize <= targetIndex) {
      break;
    }
    int dicIndex=dicIndexIntBuffer.get(targetIndex);
    try {
      if (dicIndex == 0) {
        allocator.setNull(index);
      }
 else {
        allocator.setPrimitiveObject(index,dicManager.get(dicIndex));
      }
    }
 catch (    IOException e) {
      throw new UncheckedIOException(e);
    }
  }
  for (int i=index; i < length; i++) {
    allocator.setNull(i);
  }
}
Program: 172740
Project: 172740
Buggy source:
@Override public void setBlockIndexNode(final BlockIndexNode parentNode,final ColumnBinary columnBinary,final int spreadIndex) throws IOException {
  BlockIndexNode currentNode=parentNode.getChildNode(columnBinary.columnName);
  ByteBuffer wrapBuffer=ByteBuffer.wrap(columnBinary.binary,columnBinary.binaryStart,columnBinary.binaryLength);
switch (columnBinary.columnType) {
case BYTE:
    byte byteValue=wrapBuffer.get();
  currentNode.setBlockIndex(new ByteRangeBlockIndex(byteValue,byteValue));
break;
case SHORT:
short shortValue=wrapBuffer.getShort();
currentNode.setBlockIndex(new ShortRangeBlockIndex(shortValue,shortValue));
break;
case INTEGER:
int intValue=wrapBuffer.getInt();
currentNode.setBlockIndex(new IntegerRangeBlockIndex(intValue,intValue));
break;
case LONG:
long longValue=wrapBuffer.getLong();
currentNode.setBlockIndex(new LongRangeBlockIndex(longValue,longValue));
break;
case FLOAT:
float floatValue=wrapBuffer.getFloat();
currentNode.setBlockIndex(new FloatRangeBlockIndex(floatValue,floatValue));
break;
case DOUBLE:
double doubleValue=wrapBuffer.getDouble();
currentNode.setBlockIndex(new DoubleRangeBlockIndex(doubleValue,doubleValue));
break;
case STRING:
int stringLength=wrapBuffer.getInt();
byte[] stringBytes=new byte[stringLength];
wrapBuffer.get(stringBytes);
String string=new String(stringBytes,0,stringBytes.length,"String_Node_Str");
currentNode.setBlockIndex(new StringRangeBlockIndex(string,string));
break;
default :
currentNode.disable();
}
}

Fixed version (ground truth):
@Override public void setBlockIndexNode(final BlockIndexNode parentNode,final ColumnBinary columnBinary,final int spreadIndex) throws IOException {
  BlockIndexNode currentNode=parentNode.getChildNode(columnBinary.columnName);
  ByteBuffer wrapBuffer=ByteBuffer.wrap(columnBinary.binary,columnBinary.binaryStart,columnBinary.binaryLength);
switch (columnBinary.columnType) {
case BYTE:
    byte byteValue=wrapBuffer.get();
  currentNode.setBlockIndex(new ByteRangeBlockIndex(byteValue,byteValue));
break;
case SHORT:
short shortValue=wrapBuffer.getShort();
currentNode.setBlockIndex(new ShortRangeBlockIndex(shortValue,shortValue));
break;
case INTEGER:
int intValue=wrapBuffer.getInt();
currentNode.setBlockIndex(new IntegerRangeBlockIndex(intValue,intValue));
break;
case LONG:
long longValue=wrapBuffer.getLong();
currentNode.setBlockIndex(new LongRangeBlockIndex(longValue,longValue));
break;
case FLOAT:
float floatValue=wrapBuffer.getFloat();
currentNode.setBlockIndex(new FloatRangeBlockIndex(floatValue,floatValue));
break;
case DOUBLE:
double doubleValue=wrapBuffer.getDouble();
currentNode.setBlockIndex(new DoubleRangeBlockIndex(doubleValue,doubleValue));
break;
case STRING:
int stringLength=wrapBuffer.getInt();
byte[] stringBytes=new byte[stringLength];
wrapBuffer.get(stringBytes);
String string=new String(stringBytes,0,stringBytes.length,"String_Node_Str");
currentNode.setBlockIndex(new StringRangeBlockIndex(string,string));
break;
default :
currentNode.disable();
break;
}
}
Program: 172742
Project: 172742
Buggy source:
@Override public void loadInMemoryStorage(final ColumnBinary columnBinary,final IMemoryAllocator allocator) throws IOException {
  for (  ColumnBinary childColumnBinary : columnBinary.columnBinaryList) {
    IColumnBinaryMaker maker=FindColumnBinaryMaker.get(childColumnBinary.makerClassName);
    IMemoryAllocator childMemoryAllocator=allocator.getArrayChild(childColumnBinary.rowCount,childColumnBinary.columnType);
    maker.loadInMemoryStorage(childColumnBinary,childMemoryAllocator);
  }
  ICompressor compressor=FindCompressor.get(columnBinary.compressorClassName);
  byte[] decompressBuffer=compressor.decompress(columnBinary.binary,columnBinary.binaryStart,columnBinary.binaryLength);
  IntBuffer buffer=ByteBuffer.wrap(decompressBuffer).asIntBuffer();
  int length=buffer.capacity();
  int currentIndex=0;
  for (int i=0; i < length; i++) {
    int arrayLength=buffer.get();
    if (arrayLength != 0) {
      int start=currentIndex;
      allocator.setArrayIndex(i,start,arrayLength);
      currentIndex+=arrayLength;
    }
 else {
      allocator.setNull(i);
    }
  }
  allocator.setValueCount(length);
}

Fixed version (ground truth):
@Override public void loadInMemoryStorage(final ColumnBinary columnBinary,final IMemoryAllocator allocator) throws IOException {
  for (  ColumnBinary childColumnBinary : columnBinary.columnBinaryList) {
    IColumnBinaryMaker maker=FindColumnBinaryMaker.get(childColumnBinary.makerClassName);
    IMemoryAllocator childMemoryAllocator=allocator.getArrayChild(childColumnBinary.rowCount,childColumnBinary.columnType);
    maker.loadInMemoryStorage(childColumnBinary,childMemoryAllocator);
  }
  ICompressor compressor=FindCompressor.get(columnBinary.compressorClassName);
  byte[] decompressBuffer=compressor.decompress(columnBinary.binary,columnBinary.binaryStart,columnBinary.binaryLength);
  IntBuffer buffer=ByteBuffer.wrap(decompressBuffer).asIntBuffer();
  int length=buffer.capacity();
  int currentIndex=0;
  for (int i=0; i < length; i++) {
    int arrayLength=buffer.get();
    if (arrayLength == 0) {
      allocator.setNull(i);
    }
 else {
      int start=currentIndex;
      allocator.setArrayIndex(i,start,arrayLength);
      currentIndex+=arrayLength;
    }
  }
  allocator.setValueCount(length);
}
Program: 172743
Project: 172743
Buggy source:
@Override public boolean[] filter(final IFilter filter,final boolean[] filterArray) throws IOException {
switch (filter.getFilterType()) {
case NOT_NULL:
    if (columnType != ((INullFilter)filter).getTargetColumnType()) {
      return null;
    }
  for (int i=0; i < size(); i++) {
    if (dicIndexIntBuffer.get(i) != 0) {
      filterArray[i]=true;
    }
  }
return filterArray;
case NULL:
if (columnType != ((INullFilter)filter).getTargetColumnType()) {
return null;
}
for (int i=0; i < size(); i++) {
if (dicIndexIntBuffer.get(i) == 0) {
filterArray[i]=true;
}
}
return filterArray;
default :
return index.filter(filter,filterArray);
}
}

Fixed version (ground truth):
@Override public boolean[] filter(final IFilter filter,final boolean[] filterArray) throws IOException {
switch (filter.getFilterType()) {
case NOT_NULL:
    if (columnType != ((INullFilter)filter).getTargetColumnType()) {
      return null;
    }
  for (int i=0; i < filterArray.length; i++) {
    if (i < size()) {
      if (dicIndexIntBuffer.get(i) != 0) {
        filterArray[i]=true;
      }
    }
 else {
      filterArray[i]=false;
    }
  }
return filterArray;
case NULL:
if (columnType != ((INullFilter)filter).getTargetColumnType()) {
return null;
}
for (int i=0; i < filterArray.length; i++) {
if (i < size()) {
if (dicIndexIntBuffer.get(i) == 0) {
  filterArray[i]=true;
}
}
 else {
filterArray[i]=true;
}
}
return filterArray;
default :
return index.filter(filter,filterArray);
}
}
Program: 172744
Project: 172744
Buggy source:
@Override public boolean[] exec(final Spread spread) throws IOException {
  boolean[] childCollection=childNode.exec(spread);
  if (childCollection == null) {
    return null;
  }
  for (int i=0; i < childCollection.length; i++) {
    childCollection[i]=!childCollection[i];
  }
  return childCollection;
}

Fixed version (ground truth):
@Override public boolean[] exec(final Spread spread) throws IOException {
  if (childNode == null) {
    return null;
  }
  boolean[] childCollection=childNode.exec(spread);
  if (childCollection == null) {
    return null;
  }
  for (int i=0; i < childCollection.length; i++) {
    childCollection[i]=!childCollection[i];
  }
  return childCollection;
}
Program: 172745
Project: 172745
Buggy source:
@Override public void setInteger(final int index,final int value) throws IOException {
  throw new UnsupportedOperationException("String_Node_Str");
}

Fixed version (ground truth):
@Override public void setInteger(final int index,final int value) throws IOException {
  setByte(index,new IntegerObj(value).getByte());
}
Program: 172746
Project: 172746
Buggy source:
@Override public void setShort(final int index,final short value) throws IOException {
  throw new UnsupportedOperationException("String_Node_Str");
}

Fixed version (ground truth):
@Override public void setShort(final int index,final short value) throws IOException {
  setByte(index,new ShortObj(value).getByte());
}
Program: 172747
Project: 172747
Buggy source:
@Override public void setLong(final int index,final long value) throws IOException {
  throw new UnsupportedOperationException("String_Node_Str");
}

Fixed version (ground truth):
@Override public void setLong(final int index,final long value) throws IOException {
  setByte(index,new LongObj(value).getByte());
}
Program: 172748
Project: 172748
Buggy source:
@Override public void setByte(final int index,final byte value) throws IOException {
  throw new UnsupportedOperationException("String_Node_Str");
}

Fixed version (ground truth):
@Override public void setByte(final int index,final byte value) throws IOException {
  setInteger(index,(int)value);
}
Program: 172749
Project: 172749
Buggy source:
@Override public void setShort(final int index,final short value) throws IOException {
  throw new UnsupportedOperationException("String_Node_Str");
}

Fixed version (ground truth):
@Override public void setShort(final int index,final short value) throws IOException {
  setInteger(index,(int)value);
}
Program: 172750
Project: 172750
Buggy source:
@Override public void setLong(final int index,final long value) throws IOException {
  throw new UnsupportedOperationException("String_Node_Str");
}

Fixed version (ground truth):
@Override public void setLong(final int index,final long value) throws IOException {
  setInteger(index,new LongObj(value).getInt());
}
Program: 172751
Project: 172751
Buggy source:
@Override public void setByte(final int index,final byte value) throws IOException {
  throw new UnsupportedOperationException("String_Node_Str");
}

Fixed version (ground truth):
@Override public void setByte(final int index,final byte value) throws IOException {
  setLong(index,(long)value);
}
Program: 172752
Project: 172752
Buggy source:
@Override public void setInteger(final int index,final int value) throws IOException {
  throw new UnsupportedOperationException("String_Node_Str");
}

Fixed version (ground truth):
@Override public void setInteger(final int index,final int value) throws IOException {
  setLong(index,(long)value);
}
Program: 172753
Project: 172753
Buggy source:
@Override public void setShort(final int index,final short value) throws IOException {
  throw new UnsupportedOperationException("String_Node_Str");
}

Fixed version (ground truth):
@Override public void setShort(final int index,final short value) throws IOException {
  setLong(index,(long)value);
}
Program: 172754
Project: 172754
Buggy source:
@Override public void setByte(final int index,final byte value) throws IOException {
  throw new UnsupportedOperationException("String_Node_Str");
}

Fixed version (ground truth):
@Override public void setByte(final int index,final byte value) throws IOException {
  setShort(index,(short)value);
}
Program: 172755
Project: 172755
Buggy source:
@Override public void setInteger(final int index,final int value) throws IOException {
  throw new UnsupportedOperationException("String_Node_Str");
}

Fixed version (ground truth):
@Override public void setInteger(final int index,final int value) throws IOException {
  setShort(index,new IntegerObj(value).getShort());
}
Program: 172756
Project: 172756
Buggy source:
@Override public void setLong(final int index,final long value) throws IOException {
  throw new UnsupportedOperationException("String_Node_Str");
}

Fixed version (ground truth):
@Override public void setLong(final int index,final long value) throws IOException {
  setShort(index,new LongObj(value).getShort());
}
Program: 172764
Project: 172764
Buggy source:
@Override public boolean[] filter(final IFilter filter,final boolean[] filterArray) throws IOException {
switch (filter.getFilterType()) {
case NOT_NULL:
    return null;
case NULL:
  return filterArray;
default :
return index.filter(filter,filterArray);
}
}

Fixed version (ground truth):
@Override public boolean[] filter(final IFilter filter,final boolean[] filterArray) throws IOException {
switch (filter.getFilterType()) {
case NOT_NULL:
    return null;
case NULL:
  return null;
default :
return index.filter(filter,filterArray);
}
}
Program: 172765
Project: 172765
Buggy source:
@Override public boolean[] filter(final IFilter filter,final boolean[] filterArray) throws IOException {
switch (filter.getFilterType()) {
case NOT_NULL:
    return null;
case NULL:
  return filterArray;
default :
return index.filter(filter,filterArray);
}
}

Fixed version (ground truth):
@Override public boolean[] filter(final IFilter filter,final boolean[] filterArray) throws IOException {
switch (filter.getFilterType()) {
case NOT_NULL:
    return null;
case NULL:
  return new boolean[filterArray.length];
default :
return index.filter(filter,filterArray);
}
}
Program: 172766
Project: 172766
Buggy source:
@Override public boolean[] filter(final IFilter filter,final boolean[] filterArray) throws IOException {
switch (filter.getFilterType()) {
case NOT_NULL:
    for (int i=0; i < cellArray.length; i++) {
      if (cellArray[i] != null) {
        filterArray[i]=true;
      }
    }
  return filterArray;
case NULL:
for (int i=0; i < cellArray.length; i++) {
  if (cellArray == null) {
    filterArray[i]=true;
  }
}
return filterArray;
default :
return null;
}
}

Fixed version (ground truth):
@Override public boolean[] filter(final IFilter filter,final boolean[] filterArray) throws IOException {
switch (filter.getFilterType()) {
case NOT_NULL:
    for (int i=0; i < cellArray.length; i++) {
      if (cellArray[i] != null) {
        filterArray[i]=true;
      }
    }
  return filterArray;
case NULL:
for (int i=0; i < cellArray.length; i++) {
  if (cellArray[i] == null) {
    filterArray[i]=true;
  }
}
return filterArray;
default :
return null;
}
}
Program: 172767
Project: 172767
Buggy source:
@Override public void loadInMemoryStorage(final ColumnBinary columnBinary,final IMemoryAllocator allocator) throws IOException {
  ByteBuffer wrapBuffer=ByteBuffer.wrap(columnBinary.binary,columnBinary.binaryStart,columnBinary.binaryLength);
  Double min=Double.valueOf(wrapBuffer.getDouble());
  Double max=Double.valueOf(wrapBuffer.getDouble());
  IDictionaryIndexMaker indexMaker=chooseDictionaryIndexMaker(columnBinary.rowCount);
  IDictionaryMaker dicMaker=chooseDictionaryMaker(min.doubleValue(),max.doubleValue());
  int start=columnBinary.binaryStart + (Double.BYTES * 2);
  int length=columnBinary.binaryLength - (Double.BYTES * 2);
  ICompressor compressor=FindCompressor.get(columnBinary.compressorClassName);
  byte[] binary=compressor.decompress(columnBinary.binary,start,length);
  int indexLength=indexMaker.calcBinarySize(columnBinary.rowCount);
  int dicLength=dicMaker.calcBinarySize(columnBinary.cardinality);
  IntBuffer indexIntBuffer=indexMaker.getIndexIntBuffer(binary,0,indexLength);
  PrimitiveObject[] dicArray=dicMaker.getDicPrimitiveArray(binary,indexLength,dicLength);
  int loopCount=indexIntBuffer.capacity();
  for (int i=0; i < loopCount; i++) {
    int dicIndex=indexIntBuffer.get();
    if (dicIndex != 0) {
      allocator.setDouble(i,dicArray[dicIndex].getDouble());
    }
  }
  allocator.setValueCount(loopCount);
}

Fixed version (ground truth):
@Override public void loadInMemoryStorage(final ColumnBinary columnBinary,final IMemoryAllocator allocator) throws IOException {
  ByteBuffer wrapBuffer=ByteBuffer.wrap(columnBinary.binary,columnBinary.binaryStart,columnBinary.binaryLength);
  Double min=Double.valueOf(wrapBuffer.getDouble());
  Double max=Double.valueOf(wrapBuffer.getDouble());
  IDictionaryIndexMaker indexMaker=chooseDictionaryIndexMaker(columnBinary.rowCount);
  IDictionaryMaker dicMaker=chooseDictionaryMaker(min.doubleValue(),max.doubleValue());
  int start=columnBinary.binaryStart + (Double.BYTES * 2);
  int length=columnBinary.binaryLength - (Double.BYTES * 2);
  ICompressor compressor=FindCompressor.get(columnBinary.compressorClassName);
  byte[] binary=compressor.decompress(columnBinary.binary,start,length);
  int indexLength=indexMaker.calcBinarySize(columnBinary.rowCount);
  int dicLength=dicMaker.calcBinarySize(columnBinary.cardinality);
  IntBuffer indexIntBuffer=indexMaker.getIndexIntBuffer(binary,0,indexLength);
  PrimitiveObject[] dicArray=dicMaker.getDicPrimitiveArray(binary,indexLength,dicLength);
  for (int i=0; i < columnBinary.rowCount; i++) {
    int dicIndex=indexIntBuffer.get();
    if (dicIndex != 0) {
      allocator.setDouble(i,dicArray[dicIndex].getDouble());
    }
  }
  allocator.setValueCount(columnBinary.rowCount);
}