Program: 56535
Project: 56535
Buggy source:
@Override ColumnArrayAdv getOrSplitColumnArray(int columnIdx){
  ColumnArrayAdv contains=(ColumnArrayAdv)getColumnArray(columnIdx);
  if (contains != null && contains.getIndex() == columnIdx && contains.getLastIndex() == columnIdx) {
    return contains;
  }
  int start1, end1, start2, end2;
  start1=end1=start2=end2=-1;
  if (contains == null) {
    if (columnArrays.size() == 0) {
      start1=0;
      end1=columnIdx - 1;
    }
 else {
      start1=columnArrays.lastLastKey() + 1;
      end1=columnIdx - 1;
    }
  }
 else {
    if (contains.getIndex() == columnIdx) {
      start2=columnIdx + 1;
      end2=contains.getLastIndex();
    }
 else     if (contains.getLastIndex() == columnIdx) {
      start1=contains.getIndex();
      end1=columnIdx - 1;
    }
 else {
      start1=contains.getIndex();
      end1=columnIdx - 1;
      end2=contains.getLastIndex();
      start2=columnIdx + 1;
    }
  }
  ColumnArrayAdv array=null;
  ColumnArrayAdv prev=null;
  if (contains != null) {
    columnArrays.remove(contains);
  }
  if (start2 <= end2 && end2 > -1) {
    prev=new ColumnArrayImpl(this,start2,end2);
    columnArrays.put(prev);
    if (contains != null) {
      prev.setCellStyle(contains.getCellStyle());
      prev.setHidden(contains.isHidden());
      prev.setWidth(contains.getWidth());
    }
  }
  array=new ColumnArrayImpl(this,columnIdx,columnIdx);
  columnArrays.put(array);
  if (contains != null) {
    array.setCellStyle(contains.getCellStyle());
    array.setHidden(contains.isHidden());
    array.setWidth(contains.getWidth());
  }
  if (start1 <= end1 && end1 > -1) {
    prev=new ColumnArrayImpl(this,start1,end1);
    columnArrays.put(prev);
    if (contains != null) {
      prev.setCellStyle(contains.getCellStyle());
      prev.setHidden(contains.isHidden());
      prev.setWidth(contains.getWidth());
    }
  }
  checkColumnArrayStatus();
  return array;
}

Fixed version (ground truth):
@Override ColumnArrayAdv getOrSplitColumnArray(int columnIdx){
  ColumnArrayAdv contains=(ColumnArrayAdv)getColumnArray(columnIdx);
  if (contains != null && contains.getIndex() == columnIdx && contains.getLastIndex() == columnIdx) {
    return contains;
  }
  int start1, end1, start2, end2;
  start1=end1=start2=end2=-1;
  if (contains == null) {
    if (columnArrays.size() == 0) {
      start1=0;
    }
 else {
      start1=columnArrays.lastLastKey() + 1;
    }
    end1=columnIdx - 1;
  }
 else {
    if (contains.getIndex() == columnIdx) {
      start2=columnIdx + 1;
      end2=contains.getLastIndex();
    }
 else     if (contains.getLastIndex() == columnIdx) {
      start1=contains.getIndex();
      end1=columnIdx - 1;
    }
 else {
      start1=contains.getIndex();
      end1=columnIdx - 1;
      end2=contains.getLastIndex();
      start2=columnIdx + 1;
    }
  }
  ColumnArrayAdv array=null;
  ColumnArrayAdv prev=null;
  if (contains != null) {
    columnArrays.remove(contains);
  }
  if (start2 <= end2 && end2 > -1) {
    prev=new ColumnArrayImpl(this,start2,end2);
    columnArrays.put(prev);
    if (contains != null) {
      prev.setCellStyle(contains.getCellStyle());
      prev.setHidden(contains.isHidden());
      prev.setWidth(contains.getWidth());
    }
  }
  array=new ColumnArrayImpl(this,columnIdx,columnIdx);
  columnArrays.put(array);
  if (contains != null) {
    array.setCellStyle(contains.getCellStyle());
    array.setHidden(contains.isHidden());
    array.setWidth(contains.getWidth());
  }
  if (start1 <= end1 && end1 > -1) {
    prev=new ColumnArrayImpl(this,start1,end1);
    columnArrays.put(prev);
    if (contains != null) {
      prev.setCellStyle(contains.getCellStyle());
      prev.setHidden(contains.isHidden());
      prev.setWidth(contains.getWidth());
    }
  }
  checkColumnArrayStatus();
  return array;
}