Program: 59242
Project: 59242
Buggy source:
protected void drawStorageTable(){
  TableItem item;
  TableColumn column;
  int iTableColumnIndex=0;
  int iTmpNumberOfDataItems=0;
  int iNumberOfTableItems=refCurrentStorage.getMaximumLengthOfAllArrays();
  int iStartItemIndex=iCurrentTablePage * MAX_TABLE_ROWS;
  reinitializeTable();
  int iNumberOfTableItemsToLoad=iNumberOfTableItems;
  if (iNumberOfTableItems > MAX_TABLE_ROWS) {
    iNumberOfTableItemsToLoad=MAX_TABLE_ROWS;
    refNextPageButton.setEnabled(true);
  }
  for (int iTableRowIndex=0; iTableRowIndex < iNumberOfTableItemsToLoad; iTableRowIndex++) {
    new TableItem(refTable,SWT.NONE);
  }
  if (refCurrentStorage.getSize(StorageType.INT) != 0) {
    int[] intData=refCurrentStorage.getArrayInt();
    column=new TableColumn(refTable,SWT.NONE);
    column.setText("String_Node_Str");
    if (intData.length > iNumberOfTableItemsToLoad) {
      if (iCurrentTablePage >= (iNumberOfTableItems / (float)MAX_TABLE_ROWS - 1)) {
        iTmpNumberOfDataItems=iNumberOfTableItems % MAX_TABLE_ROWS;
      }
 else       iTmpNumberOfDataItems=iNumberOfTableItemsToLoad;
    }
 else {
      iTmpNumberOfDataItems=intData.length;
    }
    for (int dataIndex=0; dataIndex < iTmpNumberOfDataItems; dataIndex++) {
      item=refTable.getItem(dataIndex);
      item.setText(iTableColumnIndex,Float.toString(intData[iStartItemIndex + dataIndex]));
    }
    column.pack();
    iTableColumnIndex++;
  }
  if (refCurrentStorage.getSize(StorageType.FLOAT) != 0) {
    float[] floatData=refCurrentStorage.getArrayFloat();
    column=new TableColumn(refTable,SWT.NONE);
    column.setText("String_Node_Str");
    if (floatData.length > iNumberOfTableItemsToLoad) {
      if (iCurrentTablePage >= (iNumberOfTableItems / (float)MAX_TABLE_ROWS - 1)) {
        iTmpNumberOfDataItems=iNumberOfTableItems % MAX_TABLE_ROWS;
      }
 else       iTmpNumberOfDataItems=iNumberOfTableItemsToLoad;
    }
 else {
      iTmpNumberOfDataItems=floatData.length;
    }
    for (int dataIndex=0; dataIndex < iTmpNumberOfDataItems; dataIndex++) {
      item=refTable.getItem(dataIndex);
      item.setText(iTableColumnIndex,Float.toString(floatData[iStartItemIndex + dataIndex]));
    }
    column.pack();
    iTableColumnIndex++;
  }
  if (refCurrentStorage.getSize(StorageType.STRING) != 0) {
    String[] stringData=refCurrentStorage.getArrayString();
    column=new TableColumn(refTable,SWT.NONE);
    column.setText("String_Node_Str");
    if (stringData.length > iNumberOfTableItemsToLoad) {
      if (iCurrentTablePage >= (iNumberOfTableItems / (float)MAX_TABLE_ROWS - 1)) {
        iTmpNumberOfDataItems=iNumberOfTableItems % MAX_TABLE_ROWS;
      }
 else       iTmpNumberOfDataItems=iNumberOfTableItemsToLoad;
    }
 else {
      iTmpNumberOfDataItems=stringData.length;
    }
    for (int dataIndex=0; dataIndex < iTmpNumberOfDataItems; dataIndex++) {
      item=refTable.getItem(dataIndex);
      item.setText(iTableColumnIndex,stringData[iStartItemIndex + dataIndex]);
    }
    column.pack();
    iTableColumnIndex++;
  }
  if (refCurrentStorage.getSize(StorageType.BOOLEAN) != 0) {
    boolean[] booleanData=refCurrentStorage.getArrayBoolean();
    column=new TableColumn(refTable,SWT.NONE);
    column.setText("String_Node_Str");
    if (booleanData.length > iNumberOfTableItemsToLoad) {
      if (iCurrentTablePage >= (iNumberOfTableItems / (float)MAX_TABLE_ROWS - 1)) {
        iTmpNumberOfDataItems=iNumberOfTableItems % MAX_TABLE_ROWS;
      }
 else       iTmpNumberOfDataItems=iNumberOfTableItemsToLoad;
    }
 else {
      iTmpNumberOfDataItems=booleanData.length;
    }
    for (int dataIndex=0; dataIndex < iTmpNumberOfDataItems; dataIndex++) {
      item=refTable.getItem(dataIndex);
      item.setText(iTableColumnIndex,Boolean.toString(booleanData[iStartItemIndex + dataIndex]));
    }
    column.pack();
    iTableColumnIndex++;
  }
  if (iCurrentTablePage >= (iNumberOfTableItems / (float)MAX_TABLE_ROWS - 1)) {
    refNextPageButton.setEnabled(false);
  }
}

Fixed version (ground truth):
protected void drawStorageTable(){
  TableItem item;
  TableColumn column;
  int iTableColumnIndex=0;
  int iTmpNumberOfDataItems=0;
  int iNumberOfTableItems=refCurrentStorage.getMaximumLengthOfAllArrays();
  int iStartItemIndex=iCurrentTablePage * MAX_TABLE_ROWS;
  reinitializeTable();
  int iNumberOfTableItemsToLoad=iNumberOfTableItems;
  if (iNumberOfTableItems > MAX_TABLE_ROWS) {
    iNumberOfTableItemsToLoad=MAX_TABLE_ROWS;
    refNextPageButton.setEnabled(true);
  }
  for (int iTableRowIndex=0; iTableRowIndex < iNumberOfTableItemsToLoad; iTableRowIndex++) {
    new TableItem(refTable,SWT.NONE);
  }
  if (refCurrentStorage.getSize(StorageType.INT) > 1) {
    int[] intData=refCurrentStorage.getArrayInt();
    column=new TableColumn(refTable,SWT.NONE);
    column.setText("String_Node_Str");
    if (intData.length > iNumberOfTableItemsToLoad) {
      if (iCurrentTablePage >= (iNumberOfTableItems / (float)MAX_TABLE_ROWS - 1)) {
        iTmpNumberOfDataItems=iNumberOfTableItems % MAX_TABLE_ROWS;
      }
 else       iTmpNumberOfDataItems=iNumberOfTableItemsToLoad;
    }
 else {
      iTmpNumberOfDataItems=intData.length;
    }
    for (int dataIndex=0; dataIndex < iTmpNumberOfDataItems; dataIndex++) {
      item=refTable.getItem(dataIndex);
      item.setText(iTableColumnIndex,Float.toString(intData[iStartItemIndex + dataIndex]));
    }
    column.pack();
    iTableColumnIndex++;
  }
  if (refCurrentStorage.getSize(StorageType.FLOAT) > 1) {
    float[] floatData=refCurrentStorage.getArrayFloat();
    column=new TableColumn(refTable,SWT.NONE);
    column.setText("String_Node_Str");
    if (floatData.length > iNumberOfTableItemsToLoad) {
      if (iCurrentTablePage >= (iNumberOfTableItems / (float)MAX_TABLE_ROWS - 1)) {
        iTmpNumberOfDataItems=iNumberOfTableItems % MAX_TABLE_ROWS;
      }
 else       iTmpNumberOfDataItems=iNumberOfTableItemsToLoad;
    }
 else {
      iTmpNumberOfDataItems=floatData.length;
    }
    for (int dataIndex=0; dataIndex < iTmpNumberOfDataItems; dataIndex++) {
      item=refTable.getItem(dataIndex);
      item.setText(iTableColumnIndex,Float.toString(floatData[iStartItemIndex + dataIndex]));
    }
    column.pack();
    iTableColumnIndex++;
  }
  if (refCurrentStorage.getSize(StorageType.STRING) > 1) {
    String[] stringData=refCurrentStorage.getArrayString();
    column=new TableColumn(refTable,SWT.NONE);
    column.setText("String_Node_Str");
    if (stringData.length > iNumberOfTableItemsToLoad) {
      if (iCurrentTablePage >= (iNumberOfTableItems / (float)MAX_TABLE_ROWS - 1)) {
        iTmpNumberOfDataItems=iNumberOfTableItems % MAX_TABLE_ROWS;
      }
 else       iTmpNumberOfDataItems=iNumberOfTableItemsToLoad;
    }
 else {
      iTmpNumberOfDataItems=stringData.length;
    }
    for (int dataIndex=0; dataIndex < iTmpNumberOfDataItems; dataIndex++) {
      item=refTable.getItem(dataIndex);
      item.setText(iTableColumnIndex,stringData[iStartItemIndex + dataIndex]);
    }
    column.pack();
    iTableColumnIndex++;
  }
  if (refCurrentStorage.getSize(StorageType.BOOLEAN) > 1) {
    boolean[] booleanData=refCurrentStorage.getArrayBoolean();
    column=new TableColumn(refTable,SWT.NONE);
    column.setText("String_Node_Str");
    if (booleanData.length > iNumberOfTableItemsToLoad) {
      if (iCurrentTablePage >= (iNumberOfTableItems / (float)MAX_TABLE_ROWS - 1)) {
        iTmpNumberOfDataItems=iNumberOfTableItems % MAX_TABLE_ROWS;
      }
 else       iTmpNumberOfDataItems=iNumberOfTableItemsToLoad;
    }
 else {
      iTmpNumberOfDataItems=booleanData.length;
    }
    for (int dataIndex=0; dataIndex < iTmpNumberOfDataItems; dataIndex++) {
      item=refTable.getItem(dataIndex);
      item.setText(iTableColumnIndex,Boolean.toString(booleanData[iStartItemIndex + dataIndex]));
    }
    column.pack();
    iTableColumnIndex++;
  }
  if (iCurrentTablePage >= (iNumberOfTableItems / (float)MAX_TABLE_ROWS - 1)) {
    refNextPageButton.setEnabled(false);
  }
}