Program: 139573
Project: 139573
Buggy source:
private void createSimpleTable(final ScrolledForm form,final Composite composite,final ColumnSetMultiValueIndicator columnSetMultiValueIndicator){
  NumberFormat doubleFormat=new DecimalFormat("String_Node_Str");
  final Table table=new Table(composite,SWT.FULL_SELECTION | SWT.BORDER);
  GridData gd=new GridData(GridData.FILL_BOTH);
  gd.heightHint=200;
  table.setLayoutData(gd);
  table.setVisible(true);
  table.setHeaderVisible(true);
  table.setLinesVisible(true);
  String[] titles={DefaultMessagesImpl.getString("String_Node_Str"),DefaultMessagesImpl.getString("String_Node_Str"),"String_Node_Str"};
  for (  String title : titles) {
    TableColumn column=new TableColumn(table,SWT.NONE);
    column.setText(title);
    column.setWidth(100);
  }
  String[] label={DefaultMessagesImpl.getString("String_Node_Str"),DefaultMessagesImpl.getString("String_Node_Str"),DefaultMessagesImpl.getString("String_Node_Str"),DefaultMessagesImpl.getString("String_Node_Str")};
  long[] count={columnSetMultiValueIndicator.getCount(),columnSetMultiValueIndicator.getDistinctCount(),columnSetMultiValueIndicator.getUniqueCount(),columnSetMultiValueIndicator.getDuplicateCount()};
  double[] percent=new double[4];
  for (int i=0; i < count.length; i++) {
    percent[i]=(double)count[i] / count[0];
  }
  for (int itemCount=0; itemCount < 4; itemCount++) {
    TableItem item=new TableItem(table,SWT.NONE);
    if (count[0] == 0) {
      item.setText(new String[]{label[itemCount],String.valueOf(count[itemCount]),"String_Node_Str"});
      continue;
    }
    item.setText(new String[]{label[itemCount],String.valueOf(count[itemCount]),doubleFormat.format(percent[itemCount] * 100) + "String_Node_Str"});
  }
  for (int i=0; i < table.getColumnCount(); i++) {
    table.getColumn(i).pack();
  }
}

Fixed version (ground truth):
private void createSimpleTable(final ScrolledForm form,final Composite composite,final ColumnSetMultiValueIndicator columnSetMultiValueIndicator){
  NumberFormat doubleFormat=new DecimalFormat("String_Node_Str");
  final Table table=new Table(composite,SWT.FULL_SELECTION | SWT.BORDER);
  GridData gd=new GridData(GridData.FILL_BOTH);
  gd.heightHint=200;
  table.setLayoutData(gd);
  table.setVisible(true);
  table.setHeaderVisible(true);
  table.setLinesVisible(true);
  String[] titles={DefaultMessagesImpl.getString("String_Node_Str"),DefaultMessagesImpl.getString("String_Node_Str"),"String_Node_Str"};
  for (  String title : titles) {
    TableColumn column=new TableColumn(table,SWT.NONE);
    column.setText(title);
    column.setWidth(100);
  }
  String[] label={DefaultMessagesImpl.getString("String_Node_Str"),DefaultMessagesImpl.getString("String_Node_Str"),DefaultMessagesImpl.getString("String_Node_Str"),DefaultMessagesImpl.getString("String_Node_Str")};
  Long countAll=columnSetMultiValueIndicator.getCount();
  Long distinctCount=columnSetMultiValueIndicator.getDistinctCount();
  Long uniqueCount=columnSetMultiValueIndicator.getUniqueCount();
  Long duplicateCount=columnSetMultiValueIndicator.getDuplicateCount();
  if (countAll != null && distinctCount != null && uniqueCount != null && duplicateCount != null) {
    long[] count={countAll,distinctCount,uniqueCount,duplicateCount};
    double[] percent=new double[4];
    for (int i=0; i < count.length; i++) {
      percent[i]=(double)count[i] / count[0];
    }
    for (int itemCount=0; itemCount < 4; itemCount++) {
      TableItem item=new TableItem(table,SWT.NONE);
      if (count[0] == 0) {
        item.setText(new String[]{label[itemCount],String.valueOf(count[itemCount]),"String_Node_Str"});
        continue;
      }
      item.setText(new String[]{label[itemCount],String.valueOf(count[itemCount]),doubleFormat.format(percent[itemCount] * 100) + "String_Node_Str"});
    }
  }
  for (int i=0; i < table.getColumnCount(); i++) {
    table.getColumn(i).pack();
  }
}