Program: 52753
Project: 52753
Buggy source:
private void createEarningsItem(CTabFolder folder,String title){
  Composite container=new Composite(folder,SWT.NONE);
  TableColumnLayout layout=new TableColumnLayout();
  container.setLayout(layout);
  earnings=new TableViewer(container,SWT.FULL_SELECTION);
  ShowHideColumnHelper support=new ShowHideColumnHelper(PerformanceView.class.getSimpleName() + "String_Node_Str",getPreferenceStore(),earnings,layout);
  Column column=new Column(Messages.ColumnDate,SWT.None,80);
  column.setLabelProvider(new ColumnLabelProvider(){
    @Override public String getText(    Object element){
      return Values.Date.format(((Transaction)element).getDate());
    }
  }
);
  column.setSorter(ColumnViewerSorter.create(Transaction.class,"String_Node_Str"),SWT.UP);
  support.addColumn(column);
  column=new Column(Messages.ColumnAmount,SWT.RIGHT,80);
  column.setLabelProvider(new ColumnLabelProvider(){
    @Override public String getText(    Object element){
      return Values.Amount.format(((Transaction)element).getAmount());
    }
  }
);
  column.setSorter(ColumnViewerSorter.create(Transaction.class,"String_Node_Str"));
  support.addColumn(column);
  column=new Column(Messages.ColumnSource,SWT.LEFT,400);
  column.setLabelProvider(new ColumnLabelProvider(){
    @Override public String getText(    Object element){
      Transaction transaction=(Transaction)element;
      if (transaction.getSecurity() != null)       return transaction.getSecurity().getName();
      for (      Account account : getClient().getAccounts()) {
        if (account.getTransactions().contains(transaction))         return account.getName();
      }
      return null;
    }
    @Override public Image getImage(    Object element){
      Transaction transaction=(Transaction)element;
      return PortfolioPlugin.image(transaction.getSecurity() != null ? PortfolioPlugin.IMG_SECURITY : PortfolioPlugin.IMG_ACCOUNT);
    }
  }
);
  column.setSorter(ColumnViewerSorter.create(Transaction.class,"String_Node_Str"));
  support.addColumn(column);
  column=new Column("String_Node_Str",Messages.ColumnNote,SWT.LEFT,22);
  column.setLabelProvider(new ColumnLabelProvider(){
    @Override public String getText(    Object element){
      return ((Transaction)element).getNote();
    }
    @Override public Image getImage(    Object e){
      String note=((Transaction)e).getNote();
      return note != null && note.length() > 0 ? PortfolioPlugin.image(PortfolioPlugin.IMG_NOTE) : null;
    }
  }
);
  column.setSorter(ColumnViewerSorter.create(Transaction.class,"String_Node_Str"));
  support.addColumn(column);
  support.createColumns();
  earnings.getTable().setHeaderVisible(true);
  earnings.getTable().setLinesVisible(true);
  earnings.setContentProvider(new SimpleListContentProvider());
  CTabItem item=new CTabItem(folder,SWT.NONE);
  item.setText(title);
  item.setControl(container);
}

Fixed version (ground truth):
private void createEarningsItem(CTabFolder folder,String title){
  Composite container=new Composite(folder,SWT.NONE);
  TableColumnLayout layout=new TableColumnLayout();
  container.setLayout(layout);
  earnings=new TableViewer(container,SWT.FULL_SELECTION);
  ShowHideColumnHelper support=new ShowHideColumnHelper(PerformanceView.class.getSimpleName() + "String_Node_Str",getPreferenceStore(),earnings,layout);
  Column column=new Column(Messages.ColumnDate,SWT.None,80);
  column.setLabelProvider(new ColumnLabelProvider(){
    @Override public String getText(    Object element){
      return Values.Date.format(((Transaction)element).getDate());
    }
  }
);
  column.setSorter(ColumnViewerSorter.create(Transaction.class,"String_Node_Str"),SWT.UP);
  support.addColumn(column);
  column=new Column(Messages.ColumnAmount,SWT.RIGHT,80);
  column.setLabelProvider(new ColumnLabelProvider(){
    @Override public String getText(    Object element){
      return Values.Amount.format(((Transaction)element).getAmount());
    }
  }
);
  column.setSorter(ColumnViewerSorter.create(Transaction.class,"String_Node_Str"));
  support.addColumn(column);
  column=new Column(Messages.ColumnSource,SWT.LEFT,400);
  column.setLabelProvider(new ColumnLabelProvider(){
    @Override public String getText(    Object element){
      Transaction transaction=(Transaction)element;
      if (transaction.getSecurity() != null)       return transaction.getSecurity().getName();
      for (      Account account : getClient().getAccounts()) {
        if (account.getTransactions().contains(transaction))         return account.getName();
      }
      return null;
    }
    @Override public Image getImage(    Object element){
      Transaction transaction=(Transaction)element;
      return PortfolioPlugin.image(transaction.getSecurity() != null ? PortfolioPlugin.IMG_SECURITY : PortfolioPlugin.IMG_ACCOUNT);
    }
  }
);
  column.setSorter(ColumnViewerSorter.create(Transaction.class,"String_Node_Str"));
  support.addColumn(column);
  column=new Column("String_Node_Str",Messages.ColumnNote,SWT.LEFT,22);
  column.setLabelProvider(new ColumnLabelProvider(){
    @Override public String getText(    Object element){
      return ((Transaction)element).getNote();
    }
    @Override public Image getImage(    Object e){
      String note=((Transaction)e).getNote();
      return note != null && note.length() > 0 ? PortfolioPlugin.image(PortfolioPlugin.IMG_NOTE) : null;
    }
  }
);
  column.setSorter(ColumnViewerSorter.create(Transaction.class,"String_Node_Str"));
  support.addColumn(column);
  support.createColumns();
  earnings.getTable().setHeaderVisible(true);
  earnings.getTable().setLinesVisible(true);
  earnings.setContentProvider(new SimpleListContentProvider());
  ViewerHelper.pack(earnings);
  CTabItem item=new CTabItem(folder,SWT.NONE);
  item.setText(title);
  item.setControl(container);
}