Program: 107779
Project: 107779
Buggy source:
/** 
 * Builds overall performance view
 * @param parent
 * @return
 */
private Control createOverviewControl(Composite parent){
  this.performanceRoot=parent;
  this.performanceRoot.setLayout(new FillLayout());
  this.performanceSash=new SashForm(this.performanceRoot,SWT.VERTICAL);
  this.performancePerTargetTable=SWTUtil.createTableDynamic(this.performanceSash,SWT.BORDER | SWT.V_SCROLL | SWT.H_SCROLL| SWT.FULL_SELECTION);
  this.performancePerTargetTable.setHeaderVisible(true);
  this.performancePerTargetTable.setLinesVisible(true);
  this.performancePerTargetTable.setMenu(new ClipboardHandlerTable(performancePerTargetTable).getMenu());
  String[] columns=getColumnHeadersForPerformanceForOverallPerformanceTable();
  String width=String.valueOf(Math.round(100d / ((double)columns.length + 2) * 100d) / 100d) + "String_Node_Str";
  DynamicTableColumn c=new DynamicTableColumn(performancePerTargetTable,SWT.LEFT);
  c.setWidth(width,"String_Node_Str");
  c.setText(Resources.getMessage("String_Node_Str"));
  for (  String column : columns) {
    c=new DynamicTableColumn(performancePerTargetTable,SWT.LEFT);
    SWTUtil.createColumnWithBarCharts(performancePerTargetTable,c);
    c.setWidth(width,"String_Node_Str");
    c.setText(column);
  }
  for (  final TableColumn col : performancePerTargetTable.getColumns()) {
    col.pack();
  }
  SWTUtil.createGenericTooltip(performancePerTargetTable);
  performancePerTargetTable.addListener(SWT.MouseDown,new Listener(){
    public void handleEvent(    Event event){
      Rectangle clientArea=performancePerTargetTable.getClientArea();
      Point pt=new Point(event.x,event.y);
      int index=performancePerTargetTable.getTopIndex();
      while (index < performancePerTargetTable.getItemCount()) {
        boolean visible=false;
        TableItem item=performancePerTargetTable.getItem(index);
        for (int i=0; i < performancePerTargetTable.getColumnCount(); i++) {
          Rectangle rect=item.getBounds(i);
          if (rect.contains(pt)) {
            getModel().setSelectedAttribute(item.getText(0));
            List<String> classes=new ArrayList<>(originalRocCurves.get(item.getText(0)).keySet());
            Collections.sort(classes);
            getModel().setSelectedClassValue(classes.get(0));
            updateOverview(getModel().getSelectedAttribute());
            updateROCSelection(classes.get(0));
            getController().update(new ModelEvent(ViewStatisticsClassification.this,ModelPart.SELECTED_ATTRIBUTE,getModel().getSelectedAttribute()));
            getController().update(new ModelEvent(ViewStatisticsClassification.this,ModelPart.SELECTED_CLASS_VALUE,getModel().getSelectedClassValue()));
            return;
          }
          if (!visible && rect.intersects(clientArea)) {
            visible=true;
          }
        }
        if (!visible)         return;
        index++;
      }
    }
  }
);
  this.performancePerClassTable=SWTUtil.createTableDynamic(this.performanceSash,SWT.BORDER | SWT.V_SCROLL | SWT.H_SCROLL| SWT.FULL_SELECTION);
  this.performancePerClassTable.setHeaderVisible(true);
  this.performancePerClassTable.setLinesVisible(true);
  this.performancePerClassTable.setMenu(new ClipboardHandlerTable(performancePerClassTable).getMenu());
  width=String.valueOf(Math.round(100d / ((double)4) * 100d) / 100d) + "String_Node_Str";
  c=new DynamicTableColumn(performancePerClassTable,SWT.LEFT);
  c.setWidth(width,"String_Node_Str");
  c.setText(Resources.getMessage("String_Node_Str"));
  c=new DynamicTableColumn(performancePerClassTable,SWT.LEFT);
  SWTUtil.createColumnWithBarCharts(performancePerClassTable,c);
  c.setWidth(width,"String_Node_Str");
  c.setText(Resources.getMessage("String_Node_Str"));
  c=new DynamicTableColumn(performancePerClassTable,SWT.LEFT);
  SWTUtil.createColumnWithBarCharts(performancePerClassTable,c);
  c.setWidth(width,"String_Node_Str");
  c.setText(Resources.getMessage("String_Node_Str"));
  c=new DynamicTableColumn(performancePerClassTable,SWT.LEFT);
  SWTUtil.createColumnWithBarCharts(performancePerClassTable,c);
  c.setWidth(width,"String_Node_Str");
  c.setText(Resources.getMessage("String_Node_Str"));
  for (  final TableColumn col : performancePerClassTable.getColumns()) {
    col.pack();
  }
  SWTUtil.createGenericTooltip(performancePerClassTable);
  this.performanceSash.setWeights(new int[]{2,2});
  return this.performanceRoot;
}

Fixed version (ground truth):
/** 
 * Builds overall performance view
 * @param parent
 * @return
 */
private Control createOverviewControl(Composite parent){
  this.performanceRoot=parent;
  this.performanceRoot.setLayout(new FillLayout());
  this.performanceSash=new SashForm(this.performanceRoot,SWT.VERTICAL);
  this.performanceTableOverview=SWTUtil.createTableDynamic(this.performanceSash,SWT.BORDER | SWT.V_SCROLL | SWT.H_SCROLL| SWT.FULL_SELECTION);
  this.performanceTableOverview.setHeaderVisible(true);
  this.performanceTableOverview.setLinesVisible(true);
  this.performanceTableOverview.setMenu(new ClipboardHandlerTable(performanceTableOverview).getMenu());
  String[] columns=getColumnHeadersForPerformanceForOverallPerformanceTable();
  String width=String.valueOf(Math.round(100d / ((double)columns.length + 2) * 100d) / 100d) + "String_Node_Str";
  DynamicTableColumn c=new DynamicTableColumn(performanceTableOverview,SWT.LEFT);
  c.setWidth(width,"String_Node_Str");
  c.setText(Resources.getMessage("String_Node_Str"));
  for (  String column : columns) {
    c=new DynamicTableColumn(performanceTableOverview,SWT.LEFT);
    SWTUtil.createColumnWithBarCharts(performanceTableOverview,c);
    c.setWidth(width,"String_Node_Str");
    c.setText(column);
  }
  for (  final TableColumn col : performanceTableOverview.getColumns()) {
    col.pack();
  }
  SWTUtil.createGenericTooltip(performanceTableOverview);
  performanceTableOverview.addListener(SWT.MouseDown,new Listener(){
    public void handleEvent(    Event event){
      Rectangle clientArea=performanceTableOverview.getClientArea();
      Point pt=new Point(event.x,event.y);
      int index=performanceTableOverview.getTopIndex();
      while (index < performanceTableOverview.getItemCount()) {
        boolean visible=false;
        TableItem item=performanceTableOverview.getItem(index);
        for (int i=0; i < performanceTableOverview.getColumnCount(); i++) {
          Rectangle rect=item.getBounds(i);
          if (rect.contains(pt)) {
            getModel().setSelectedAttribute(item.getText(0));
            List<String> classes=new ArrayList<>(originalRocCurves.get(item.getText(0)).keySet());
            Collections.sort(classes);
            getModel().setSelectedClassValue(classes.get(0));
            updateOverview(getModel().getSelectedAttribute());
            updateROCSelection(classes.get(0));
            getController().update(new ModelEvent(ViewStatisticsClassification.this,ModelPart.SELECTED_ATTRIBUTE,getModel().getSelectedAttribute()));
            getController().update(new ModelEvent(ViewStatisticsClassification.this,ModelPart.SELECTED_CLASS_VALUE,getModel().getSelectedClassValue()));
            return;
          }
          if (!visible && rect.intersects(clientArea)) {
            visible=true;
          }
        }
        if (!visible)         return;
        index++;
      }
    }
  }
);
  this.performanceTableSensitivitySpecificity=SWTUtil.createTableDynamic(this.performanceSash,SWT.BORDER | SWT.V_SCROLL | SWT.H_SCROLL| SWT.FULL_SELECTION);
  this.performanceTableSensitivitySpecificity.setHeaderVisible(true);
  this.performanceTableSensitivitySpecificity.setLinesVisible(true);
  this.performanceTableSensitivitySpecificity.setMenu(new ClipboardHandlerTable(performanceTableSensitivitySpecificity).getMenu());
  width=String.valueOf(Math.round(100d / ((double)4) * 100d) / 100d) + "String_Node_Str";
  c=new DynamicTableColumn(performanceTableSensitivitySpecificity,SWT.LEFT);
  c.setWidth(width,"String_Node_Str");
  c.setText(Resources.getMessage("String_Node_Str"));
  c=new DynamicTableColumn(performanceTableSensitivitySpecificity,SWT.LEFT);
  SWTUtil.createColumnWithBarCharts(performanceTableSensitivitySpecificity,c);
  c.setWidth(width,"String_Node_Str");
  c.setText(Resources.getMessage("String_Node_Str"));
  c=new DynamicTableColumn(performanceTableSensitivitySpecificity,SWT.LEFT);
  SWTUtil.createColumnWithBarCharts(performanceTableSensitivitySpecificity,c);
  c.setWidth(width,"String_Node_Str");
  c.setText(Resources.getMessage("String_Node_Str"));
  c=new DynamicTableColumn(performanceTableSensitivitySpecificity,SWT.LEFT);
  SWTUtil.createColumnWithBarCharts(performanceTableSensitivitySpecificity,c);
  c.setWidth(width,"String_Node_Str");
  c.setText(Resources.getMessage("String_Node_Str"));
  for (  final TableColumn col : performanceTableSensitivitySpecificity.getColumns()) {
    col.pack();
  }
  SWTUtil.createGenericTooltip(performanceTableSensitivitySpecificity);
  this.performanceSash.setWeights(new int[]{2,2});
  return this.performanceRoot;
}