Program: 136770
Project: 136770
Buggy source:
public void update(ObserverEvent observerEvent){
switch (observerEvent.getEventType()) {
case ColumnResize:
    Object data=observerEvent.getData(ObserverEvent.COLUMN_HEADER_RESIZE);
  if (data == null) {
    return;
  }
GridColumn sourceGridColumn=((GridColumn)data);
for (GridColumn currColumn : this.getColumns()) {
Object oldmodelElementIndicator=sourceGridColumn.getData();
if (oldmodelElementIndicator == currColumn.getData()) {
  currColumn.setWidth(sourceGridColumn.getWidth());
  break;
}
}
break;
case MoveColumn:
data=observerEvent.getData(ObserverEvent.COLUMN_HEADER_MOVE);
if (data == null) {
return;
}
this.setColumnOrder((int[])data);
if (result == null) {
result=new ModelElementIndicator[getColumnCount() - 2];
}
int[] order=getColumnOrder();
int j=0;
for (int columnIndex : order) {
if (columnIndex > 1) {
result[j]=_modelElementIndicators[columnIndex - 2];
j++;
}
}
redraw();
break;
case HSrcollMove:
data=observerEvent.getData(ObserverEvent.HORIZONTAL_SCROLLBAR_MOVE);
if (data == null || getHorizontalBar() == null) {
return;
}
getHorizontalBar().setSelection(Integer.parseInt(data.toString()));
redraw(getClientArea().x,getClientArea().y,getClientArea().width,getClientArea().height,false);
break;
case VSrcollVisible:
data=observerEvent.getData(ObserverEvent.VERTICAL_SRCOLL_VISABLE);
if (data == null || getVerticalBar() == null) {
return;
}
if (!getVerticalBar().isVisible() && Boolean.parseBoolean(data.toString())) {
GridData previewGridData=(GridData)this.getLayoutData();
previewGridData.widthHint=this.getBounds().width - 50 - getVerticalBar().getSize().x;
previewGridData.minimumWidth=this.getBounds().width - 50 - getVerticalBar().getSize().x;
previewGridData.horizontalAlignment=SWT.BEGINNING;
this.getParent().layout();
}
if (!getVerticalBar().isVisible() && !Boolean.parseBoolean(data.toString())) {
GridData previewGridData=(GridData)this.getLayoutData();
if (previewGridData.horizontalAlignment == SWT.FILL) {
return;
}
previewGridData.minimumWidth=650;
previewGridData.horizontalAlignment=SWT.FILL;
notifyVerticalBarShown(false);
}
break;
}
}

Fixed version (ground truth):
public void update(ObserverEvent observerEvent){
switch (observerEvent.getEventType()) {
case ColumnResize:
    Object data=observerEvent.getData(ObserverEvent.COLUMN_HEADER_RESIZE);
  if (data == null) {
    return;
  }
GridColumn sourceGridColumn=((GridColumn)data);
for (GridColumn currColumn : this.getColumns()) {
Object oldmodelElementIndicator=sourceGridColumn.getData();
if (oldmodelElementIndicator == currColumn.getData()) {
  currColumn.setWidth(sourceGridColumn.getWidth());
  break;
}
}
break;
case MoveColumn:
data=observerEvent.getData(ObserverEvent.COLUMN_HEADER_MOVE);
if (data == null) {
return;
}
this.setColumnOrder((int[])data);
if (result == null) {
result=new ModelElementIndicator[getColumnCount() - 2];
}
int[] order=getColumnOrder();
int j=0;
for (int columnIndex : order) {
if (columnIndex > 1) {
result[j]=_modelElementIndicators[columnIndex - 2];
j++;
}
}
redraw();
break;
case HSrcollMove:
data=observerEvent.getData(ObserverEvent.HORIZONTAL_SCROLLBAR_MOVE);
if (data == null || getHorizontalBar() == null) {
return;
}
getHorizontalBar().setSelection(Integer.parseInt(data.toString()));
redraw(getClientArea().x,getClientArea().y,getClientArea().width,getClientArea().height,false);
break;
case VSrcollVisible:
data=observerEvent.getData(ObserverEvent.VERTICAL_SRCOLL_VISABLE);
if (data == null || getVerticalBar() == null) {
return;
}
if (!getVerticalBar().isVisible() && Boolean.parseBoolean(data.toString())) {
GridData previewGridData=(GridData)this.getLayoutData();
previewGridData.widthHint=this.getBounds().width - 50 - getVerticalBar().getSize().x;
previewGridData.minimumWidth=this.getBounds().width - 50 - getVerticalBar().getSize().x;
previewGridData.horizontalAlignment=SWT.BEGINNING;
this.getParent().layout();
}
if (!getVerticalBar().isVisible() && !Boolean.parseBoolean(data.toString())) {
GridData previewGridData=(GridData)this.getLayoutData();
if (previewGridData.horizontalAlignment == SWT.FILL) {
return;
}
previewGridData.minimumWidth=650;
previewGridData.horizontalAlignment=SWT.FILL;
notifyVerticalBarShown(false);
}
break;
case ColumnHighlight:
data=observerEvent.getData(ObserverEvent.COLUMN_HIGH_LIGHT);
handleColumnHighlight(((Integer)data));
break;
}
}