Program: 137875
Project: 137875
Buggy source:
private void onMouseMove(MouseEvent e){
  Point cell=getCell(new Point(e.x,e.y));
  if (cell != null && cell.x != 0) {
    GridVisibleRange range=getVisibleRange();
    for (    GridItem item : range.getItems()) {
      int i=indexOf(item);
      if (i == cell.y) {
        item.setBackground(0,yellow);
        item.setBackground(1,lightYellow);
      }
 else {
        item.setBackground(0,gray);
        item.setBackground(1,getDisplay().getSystemColor(SWT.COLOR_LIST_BACKGROUND));
        if (item.getCheckable(1)) {
          item.setBackground(yellow);
        }
      }
      for (      GridColumn column : range.getColumns()) {
        int j=indexOf(column);
        if (i == cell.y && j == cell.x) {
          item.setBackground(j,yellow);
        }
 else         if (i == cell.y && j < cell.x || j == cell.x && i < cell.y) {
          item.setBackground(j,lightYellow);
        }
 else {
          item.setBackground(j,null);
        }
      }
    }
    for (int j=0; j < getColumnCount(); j++) {
      getColumn(j).getHeaderRenderer().setSelected(j == cell.x);
    }
  }
 else {
    GridItem currentItem=getItem(new Point(e.x,e.y));
    GridVisibleRange range=getVisibleRange();
    if (currentItem != null) {
      if (overRowSelect(currentItem,new Point(e.x,e.y))) {
        for (        GridItem item : range.getItems()) {
          int i=indexOf(item);
          if (item.getCheckable(0)) {
            if (i == indexOf(currentItem)) {
              item.setBackground(0,yellow);
              item.setBackground(1,yellow);
            }
 else {
              item.setBackground(0,gray);
              item.setBackground(1,getDisplay().getSystemColor(SWT.COLOR_LIST_BACKGROUND));
            }
          }
          for (          GridColumn column : range.getColumns()) {
            int j=indexOf(column);
            if (i == indexOf(currentItem)) {
              item.setBackground(j,lightYellow);
            }
 else {
              item.setBackground(j,getDisplay().getSystemColor(SWT.COLOR_LIST_BACKGROUND));
            }
          }
        }
        for (        GridColumn column : range.getColumns()) {
          column.getHeaderRenderer().setSelected(false);
        }
        return;
      }
    }
 else {
      GridColumn currentColumn=getColumn(new Point(e.x,e.y));
      if (currentColumn != null && !isDraggingColumn()) {
        int currentColumnIndex=indexOf(currentColumn);
        for (        GridItem item : range.getItems()) {
          for (          GridColumn column : range.getColumns()) {
            int j=indexOf(column);
            if (j == currentColumnIndex) {
              item.setBackground(j,lightYellow);
            }
 else {
              item.setBackground(j,getDisplay().getSystemColor(SWT.COLOR_LIST_BACKGROUND));
            }
          }
          item.setBackground(0,IndicatorSelectGrid.gray);
          item.setBackground(1,null);
        }
        for (        GridColumn column : range.getColumns()) {
          int j=indexOf(column);
          column.getHeaderRenderer().setSelected(j == currentColumnIndex);
        }
      }
    }
  }
}

Fixed version (ground truth):
private void onMouseMove(MouseEvent e){
  Point cell=getCell(new Point(e.x,e.y));
  if (cell != null && cell.x != 0) {
    GridVisibleRange range=getVisibleRange();
    List<GridColumn> columnList=Arrays.asList(range.getColumns());
    cell.x=columnList.indexOf(getColumn(cell.x)) + 2;
    for (    GridItem item : range.getItems()) {
      int i=indexOf(item);
      if (i == cell.y) {
        item.setBackground(0,yellow);
        item.setBackground(1,lightYellow);
      }
 else {
        item.setBackground(0,gray);
        item.setBackground(1,getDisplay().getSystemColor(SWT.COLOR_LIST_BACKGROUND));
        if (item.getCheckable(1)) {
          item.setBackground(yellow);
        }
      }
      for (      GridColumn column : range.getColumns()) {
        int realIdx=columnList.indexOf(column) + 2;
        int j=indexOf(column);
        if (i == cell.y && realIdx == cell.x) {
          item.setBackground(j,yellow);
        }
 else         if (i == cell.y && realIdx < cell.x || realIdx == cell.x && i < cell.y) {
          item.setBackground(j,lightYellow);
        }
 else {
          item.setBackground(j,null);
        }
      }
    }
    for (    GridColumn column : range.getColumns()) {
      int realIdx=columnList.indexOf(column) + 2;
      column.getHeaderRenderer().setSelected(realIdx == cell.x);
    }
  }
 else {
    GridItem currentItem=getItem(new Point(e.x,e.y));
    GridVisibleRange range=getVisibleRange();
    if (currentItem != null) {
      if (overRowSelect(currentItem,new Point(e.x,e.y))) {
        for (        GridItem item : range.getItems()) {
          int i=indexOf(item);
          if (item.getCheckable(0)) {
            if (i == indexOf(currentItem)) {
              item.setBackground(0,yellow);
              item.setBackground(1,yellow);
            }
 else {
              item.setBackground(0,gray);
              item.setBackground(1,getDisplay().getSystemColor(SWT.COLOR_LIST_BACKGROUND));
            }
          }
          for (          GridColumn column : range.getColumns()) {
            int j=indexOf(column);
            if (i == indexOf(currentItem)) {
              item.setBackground(j,lightYellow);
            }
 else {
              item.setBackground(j,getDisplay().getSystemColor(SWT.COLOR_LIST_BACKGROUND));
            }
          }
        }
        for (        GridColumn column : range.getColumns()) {
          column.getHeaderRenderer().setSelected(false);
        }
        return;
      }
    }
 else {
      GridColumn currentColumn=getColumn(new Point(e.x,e.y));
      if (currentColumn != null && !isDraggingColumn()) {
        int currentColumnIndex=indexOf(currentColumn);
        for (        GridItem item : range.getItems()) {
          for (          GridColumn column : range.getColumns()) {
            int j=indexOf(column);
            if (j == currentColumnIndex) {
              item.setBackground(j,lightYellow);
            }
 else {
              item.setBackground(j,getDisplay().getSystemColor(SWT.COLOR_LIST_BACKGROUND));
            }
          }
          item.setBackground(0,IndicatorSelectGrid.gray);
          item.setBackground(1,null);
        }
        for (        GridColumn column : range.getColumns()) {
          int j=indexOf(column);
          column.getHeaderRenderer().setSelected(j == currentColumnIndex);
        }
      }
    }
  }
}