Program: 57001
Project: 57001
Buggy source:
private void buildTable(MatrixBasedBodyDataProvider bodyDataProvider,ColumnHeaderDataProvider columnDataProvider,LineNumberRowHeaderDataProvider rowDataProvider){
  if (table != null) {
    this.table.dispose();
    this.table=null;
  }
  final DataLayer bodyDataLayer=new DataLayer(bodyDataProvider);
  SelectionLayer selectionLayer=new SelectionLayer(bodyDataLayer);
  ViewportLayer bodyLayer=new ViewportLayer(selectionLayer);
  final DataLayer columnDataLayer=new DataLayer(columnDataProvider,120,25);
  ColumnHeaderLayer columnHeaderLayer=new ColumnHeaderLayer(columnDataLayer,bodyLayer,selectionLayer);
  DataLayer rowDataLayer=new DataLayer(rowDataProvider,50,20);
  RowHeaderLayer rowHeaderLayer=new RowHeaderLayer(rowDataLayer,bodyLayer,selectionLayer);
  DefaultCornerDataProvider cornerDataProvider=new DefaultCornerDataProvider(columnDataProvider,rowDataProvider);
  CornerLayer cornerLayer=new CornerLayer(new DataLayer(cornerDataProvider),rowHeaderLayer,columnHeaderLayer);
  GridLayer gridLayer=new GridLayer(bodyLayer,columnHeaderLayer,rowHeaderLayer,cornerLayer);
  table=new NatTable(parent,gridLayer,false);
  GridData gridData=new GridData(SWT.FILL,SWT.FILL,true,true,2,1);
  gridData.heightHint=300;
  gridData.widthHint=800;
  table.setLayoutData(gridData);
  IConfigLabelAccumulator cellLabelAccumulator=new IConfigLabelAccumulator(){
    @Override public void accumulateConfigLabels(    LabelStack configLabels,    int columnPosition,    int rowPosition){
      if (columnPosition == idColumnIndex || rowPosition == idRowIndex) {
        configLabels.addLabel(ID_CELL);
      }
      if (rowPosition < numberOfHeaderRows) {
        configLabels.addLabel(HEADER_LINE_CELL);
      }
      if (columnPosition == idColumnIndex && rowPosition >= numberOfHeaderRows && rowPosition != idRowIndex) {
        configLabels.addLabel(ROW_ID);
      }
      if (rowPosition == idRowIndex && columnPosition != idColumnIndex) {
        configLabels.addLabel(COLUMN_ID);
      }
    }
  }
;
  bodyDataLayer.setConfigLabelAccumulator(cellLabelAccumulator);
  table.addConfiguration(new DefaultNatTableStyleConfiguration());
  if (columnIDConverter == null)   columnIDConverter=new RegExIDConverter(null);
  if (rowIDConverter == null)   rowIDConverter=new RegExIDConverter(null);
  table.addConfiguration(new AbstractRegistryConfiguration(){
    @Override public void configureRegistry(    IConfigRegistry configRegistry){
      Style cellStyle=new Style();
      cellStyle.setAttributeValue(CellStyleAttributes.BACKGROUND_COLOR,GUIHelper.COLOR_GREEN);
      configRegistry.registerConfigAttribute(CellConfigAttributes.CELL_STYLE,cellStyle,DisplayMode.NORMAL,ID_CELL);
      cellStyle=new Style();
      cellStyle.setAttributeValue(CellStyleAttributes.BACKGROUND_COLOR,GUIHelper.COLOR_DARK_GRAY);
      configRegistry.registerConfigAttribute(CellConfigAttributes.CELL_STYLE,cellStyle,DisplayMode.NORMAL,HEADER_LINE_CELL);
      configRegistry.registerConfigAttribute(CellConfigAttributes.DISPLAY_CONVERTER,columnIDConverter,DisplayMode.NORMAL,COLUMN_ID);
      configRegistry.registerConfigAttribute(CellConfigAttributes.DISPLAY_CONVERTER,rowIDConverter,DisplayMode.NORMAL,ROW_ID);
    }
  }
);
  final ColumnHeaderCheckBoxPainter columnHeaderCheckBoxPainter=new ColumnHeaderCheckBoxPainter(columnDataLayer);
  final ICellPainter columnHeaderPainter=new BeveledBorderDecorator(new CellPainterDecorator(new ColumnNumberCellPainter(),CellEdgeEnum.LEFT,columnHeaderCheckBoxPainter));
  table.addConfiguration(new AbstractRegistryConfiguration(){
    @Override public void configureRegistry(    IConfigRegistry configRegistry){
      configRegistry.registerConfigAttribute(CellConfigAttributes.CELL_PAINTER,columnHeaderPainter,DisplayMode.NORMAL,GridRegion.COLUMN_HEADER);
    }
    @Override public void configureUiBindings(    UiBindingRegistry uiBindingRegistry){
      uiBindingRegistry.registerFirstSingleClickBinding(new CellPainterMouseEventMatcher(GridRegion.COLUMN_HEADER,MouseEventMatcher.LEFT_BUTTON,columnHeaderCheckBoxPainter),new ToggleCheckBoxColumnAction(columnHeaderCheckBoxPainter,columnDataLayer));
    }
  }
);
  table.configure();
}

Fixed version (ground truth):
private void buildTable(MatrixBasedBodyDataProvider bodyDataProvider,ColumnHeaderDataProvider columnDataProvider,LineNumberRowHeaderDataProvider rowDataProvider){
  if (table != null) {
    this.table.dispose();
    this.table=null;
  }
  final DataLayer bodyDataLayer=new DataLayer(bodyDataProvider);
  SelectionLayer selectionLayer=new SelectionLayer(bodyDataLayer);
  ViewportLayer bodyLayer=new ViewportLayer(selectionLayer);
  final DataLayer columnDataLayer=new DataLayer(columnDataProvider,120,25);
  ColumnHeaderLayer columnHeaderLayer=new ColumnHeaderLayer(columnDataLayer,bodyLayer,selectionLayer);
  DataLayer rowDataLayer=new DataLayer(rowDataProvider,50,20);
  RowHeaderLayer rowHeaderLayer=new RowHeaderLayer(rowDataLayer,bodyLayer,selectionLayer);
  DefaultCornerDataProvider cornerDataProvider=new DefaultCornerDataProvider(columnDataProvider,rowDataProvider);
  CornerLayer cornerLayer=new CornerLayer(new DataLayer(cornerDataProvider),rowHeaderLayer,columnHeaderLayer);
  GridLayer gridLayer=new GridLayer(bodyLayer,columnHeaderLayer,rowHeaderLayer,cornerLayer);
  table=new NatTable(parent,gridLayer,false);
  GridData gridData=new GridData(SWT.FILL,SWT.FILL,true,true,2,2);
  gridData.heightHint=400;
  gridData.widthHint=800;
  table.setLayoutData(gridData);
  IConfigLabelAccumulator cellLabelAccumulator=new IConfigLabelAccumulator(){
    @Override public void accumulateConfigLabels(    LabelStack configLabels,    int columnPosition,    int rowPosition){
      if (columnPosition == idColumnIndex || rowPosition == idRowIndex) {
        configLabels.addLabel(ID_CELL);
      }
      if (rowPosition < numberOfHeaderRows) {
        configLabels.addLabel(HEADER_LINE_CELL);
      }
      if (columnPosition == idColumnIndex && rowPosition >= numberOfHeaderRows && rowPosition != idRowIndex) {
        configLabels.addLabel(ROW_ID);
      }
      if (rowPosition == idRowIndex && columnPosition != idColumnIndex) {
        configLabels.addLabel(COLUMN_ID);
      }
    }
  }
;
  bodyDataLayer.setConfigLabelAccumulator(cellLabelAccumulator);
  table.addConfiguration(new DefaultNatTableStyleConfiguration());
  if (columnIDConverter == null)   columnIDConverter=new RegExIDConverter(null);
  if (rowIDConverter == null)   rowIDConverter=new RegExIDConverter(null);
  table.addConfiguration(new AbstractRegistryConfiguration(){
    @Override public void configureRegistry(    IConfigRegistry configRegistry){
      Style cellStyle=new Style();
      cellStyle.setAttributeValue(CellStyleAttributes.BACKGROUND_COLOR,GUIHelper.COLOR_GREEN);
      configRegistry.registerConfigAttribute(CellConfigAttributes.CELL_STYLE,cellStyle,DisplayMode.NORMAL,ID_CELL);
      cellStyle=new Style();
      cellStyle.setAttributeValue(CellStyleAttributes.BACKGROUND_COLOR,GUIHelper.COLOR_DARK_GRAY);
      configRegistry.registerConfigAttribute(CellConfigAttributes.CELL_STYLE,cellStyle,DisplayMode.NORMAL,HEADER_LINE_CELL);
      configRegistry.registerConfigAttribute(CellConfigAttributes.DISPLAY_CONVERTER,columnIDConverter,DisplayMode.NORMAL,COLUMN_ID);
      configRegistry.registerConfigAttribute(CellConfigAttributes.DISPLAY_CONVERTER,rowIDConverter,DisplayMode.NORMAL,ROW_ID);
    }
  }
);
  final ColumnHeaderCheckBoxPainter columnHeaderCheckBoxPainter=new ColumnHeaderCheckBoxPainter(columnDataLayer);
  final ICellPainter columnHeaderPainter=new BeveledBorderDecorator(new CellPainterDecorator(new ColumnNumberCellPainter(),CellEdgeEnum.LEFT,columnHeaderCheckBoxPainter));
  table.addConfiguration(new AbstractRegistryConfiguration(){
    @Override public void configureRegistry(    IConfigRegistry configRegistry){
      configRegistry.registerConfigAttribute(CellConfigAttributes.CELL_PAINTER,columnHeaderPainter,DisplayMode.NORMAL,GridRegion.COLUMN_HEADER);
    }
    @Override public void configureUiBindings(    UiBindingRegistry uiBindingRegistry){
      uiBindingRegistry.registerFirstSingleClickBinding(new CellPainterMouseEventMatcher(GridRegion.COLUMN_HEADER,MouseEventMatcher.LEFT_BUTTON,columnHeaderCheckBoxPainter),new ToggleCheckBoxColumnAction(columnHeaderCheckBoxPainter,columnDataLayer));
    }
  }
);
  table.configure();
}