Program: 52761
Project: 52761
Buggy source:
private void createColumns(Composite parent){
  container=new Composite(parent,SWT.NONE);
  TableColumnLayout layout=new TableColumnLayout();
  container.setLayout(layout);
  assets=new TableViewer(container,SWT.FULL_SELECTION);
  ColumnViewerToolTipSupport.enableFor(assets,ToolTip.NO_RECREATE);
  ColumnEditingSupport.prepare(assets);
  support=new ShowHideColumnHelper(StatementOfAssetsViewer.class.getName(),client,owner.getPreferenceStore(),assets,layout);
  Column column=new Column("String_Node_Str",Messages.ColumnSharesOwned,SWT.RIGHT,80);
  column.setLabelProvider(new SharesLabelProvider(){
    @Override public Long getValue(    Object e){
      Element element=(Element)e;
      return element.isSecurity() ? element.getSecurityPosition().getShares() : null;
    }
    @Override public String getToolTipText(    Object e){
      Element element=(Element)e;
      return element.isSecurity() ? Values.Share.format(element.getSecurityPosition().getShares()) : null;
    }
  }
);
  support.addColumn(column);
  column=new NameColumn("String_Node_Str");
  column.setLabelProvider(new NameColumnLabelProvider(){
    @Override public String getText(    Object e){
      if (((Element)e).isGroupByTaxonomy())       return Messages.LabelTotalSum;
      return super.getText(e);
    }
    @Override public Font getFont(    Object e){
      return ((Element)e).isGroupByTaxonomy() || ((Element)e).isCategory() ? boldFont : null;
    }
    @Override public Image getImage(    Object e){
      if (((Element)e).isCategory())       return null;
      return super.getImage(e);
    }
  }
);
  column.setEditingSupport(new StringEditingSupport(Named.class,"String_Node_Str"){
    @Override public boolean canEdit(    Object element){
      boolean isCategory=((Element)element).isCategory();
      boolean isUnassignedCategory=isCategory && Classification.UNASSIGNED_ID.equals(((Element)element).getCategory().getClassification().getId());
      return !isUnassignedCategory ? super.canEdit(element) : false;
    }
  }
.setMandatory(true).addListener(new MarkDirtyListener(this.owner)));
  column.setSorter(null);
  support.addColumn(column);
  column=new Column("String_Node_Str",Messages.ColumnTicker,SWT.None,60);
  column.setLabelProvider(new ColumnLabelProvider(){
    @Override public String getText(    Object e){
      Element element=(Element)e;
      return element.isSecurity() ? element.getSecurity().getTickerSymbol() : null;
    }
  }
);
  support.addColumn(column);
  column=new Column("String_Node_Str",Messages.ColumnWKN,SWT.None,60);
  column.setLabelProvider(new ColumnLabelProvider(){
    @Override public String getText(    Object e){
      Element element=(Element)e;
      return element.isSecurity() ? element.getSecurity().getWkn() : null;
    }
  }
);
  column.setVisible(false);
  support.addColumn(column);
  column=new IsinColumn("String_Node_Str");
  column.getEditingSupport().addListener(new MarkDirtyListener(this.owner));
  column.setSorter(null);
  column.setVisible(false);
  support.addColumn(column);
  column=new Column("String_Node_Str",Messages.ColumnQuote,SWT.RIGHT,60);
  column.setLabelProvider(new ColumnLabelProvider(){
    @Override public String getText(    Object e){
      Element element=(Element)e;
      return element.isSecurity() ? Values.Quote.format(element.getSecurityPosition().getPrice().getValue()) : null;
    }
  }
);
  support.addColumn(column);
  column=new Column("String_Node_Str",Messages.ColumnMarketValue,SWT.RIGHT,80);
  column.setLabelProvider(new ColumnLabelProvider(){
    @Override public String getText(    Object e){
      Element element=(Element)e;
      return Values.Amount.format(element.getValuation());
    }
    @Override public Font getFont(    Object e){
      return ((Element)e).isGroupByTaxonomy() || ((Element)e).isCategory() ? boldFont : null;
    }
  }
);
  support.addColumn(column);
  column=new Column("String_Node_Str",Messages.ColumnShareInPercent,SWT.RIGHT,80);
  column.setLabelProvider(new ColumnLabelProvider(){
    @Override public String getText(    Object e){
      Element element=(Element)e;
      if (element.isGroupByTaxonomy())       return Values.Percent.format(1d);
      if (element.isCategory())       return Values.Percent.format(element.getCategory().getShare());
 else       return Values.Percent.format(element.getPosition().getShare());
    }
    @Override public Font getFont(    Object e){
      return ((Element)e).isGroupByTaxonomy() || ((Element)e).isCategory() ? boldFont : null;
    }
  }
);
  support.addColumn(column);
  column=new Column("String_Node_Str",Messages.ColumnPurchasePrice,SWT.RIGHT,60);
  column.setLabelProvider(new ColumnLabelProvider(){
    @Override public String getText(    Object e){
      Element element=(Element)e;
      if (element.isSecurity()) {
        long purchasePrice=element.getSecurityPosition().getFIFOPurchasePrice();
        return purchasePrice == 0 ? null : Values.Amount.format(purchasePrice);
      }
      return null;
    }
  }
);
  column.setVisible(false);
  support.addColumn(column);
  column=new Column("String_Node_Str",Messages.ColumnPurchaseValue,SWT.RIGHT,80);
  column.setLabelProvider(new ColumnLabelProvider(){
    @Override public String getText(    Object e){
      Element element=(Element)e;
      long purchaseValue=element.getFIFOPurchaseValue();
      return purchaseValue == 0 ? null : Values.Amount.format(purchaseValue);
    }
    @Override public Font getFont(    Object e){
      return ((Element)e).isGroupByTaxonomy() || ((Element)e).isCategory() ? boldFont : null;
    }
  }
);
  column.setVisible(false);
  support.addColumn(column);
  column=new Column("String_Node_Str",Messages.ColumnProfitLoss,SWT.RIGHT,80);
  column.setLabelProvider(new ColumnLabelProvider(){
    @Override public String getText(    Object e){
      Element element=(Element)e;
      long profitLoss=element.getProfitLoss();
      return profitLoss == 0 ? null : Values.Amount.format(profitLoss);
    }
    @Override public Color getForeground(    Object e){
      Element element=(Element)e;
      long profitLoss=element.getProfitLoss();
      if (profitLoss < 0)       return Display.getCurrent().getSystemColor(SWT.COLOR_DARK_RED);
 else       if (profitLoss > 0)       return Display.getCurrent().getSystemColor(SWT.COLOR_DARK_GREEN);
 else       return null;
    }
    @Override public Font getFont(    Object e){
      return ((Element)e).isGroupByTaxonomy() || ((Element)e).isCategory() ? boldFont : null;
    }
  }
);
  column.setVisible(false);
  support.addColumn(column);
  column=new NoteColumn();
  column.getEditingSupport().addListener(new MarkDirtyListener(this.owner));
  column.setSorter(null);
  support.addColumn(column);
  column=new Column("String_Node_Str",Messages.ColumnIRRPerformance,SWT.RIGHT,80);
  column.setOptions(Messages.LabelReportingYears,Messages.ColumnIRRPerformanceOption,1,2,3,4,5,10);
  column.setLabelProvider(new OptionLabelProvider(){
    @Override public String getText(    Object e,    Integer option){
      Element element=(Element)e;
      if (element.isSecurity()) {
        calculatePerformance(element,option);
        SecurityPerformanceRecord record=element.getPerformance(option);
        return Values.Percent.format(record.getIrr());
      }
      return null;
    }
    @Override public Color getForeground(    Object e,    Integer option){
      Element element=(Element)e;
      if (element.isSecurity()) {
        calculatePerformance(element,option);
        SecurityPerformanceRecord record=element.getPerformance(option);
        double irr=record.getIrr();
        if (irr < 0)         return Display.getCurrent().getSystemColor(SWT.COLOR_DARK_RED);
 else         if (irr > 0)         return Display.getCurrent().getSystemColor(SWT.COLOR_DARK_GREEN);
      }
      return null;
    }
  }
);
  column.setVisible(false);
  support.addColumn(column);
  column=new Column("String_Node_Str",Messages.ColumnTotalProfitLoss,SWT.RIGHT,80);
  column.setOptions(Messages.LabelReportingYears,Messages.ColumnTotalProfitLossOption,1,2,3,4,5,10);
  column.setLabelProvider(new OptionLabelProvider(){
    @Override public String getText(    Object e,    Integer option){
      Element element=(Element)e;
      if (element.isSecurity()) {
        calculatePerformance(element,option);
        SecurityPerformanceRecord record=element.getPerformance(option);
        return Values.Amount.format(record.getDelta());
      }
      return null;
    }
    @Override public Color getForeground(    Object e,    Integer option){
      Element element=(Element)e;
      if (element.isSecurity()) {
        calculatePerformance(element,option);
        SecurityPerformanceRecord record=element.getPerformance(option);
        long delta=record.getDelta();
        if (delta < 0)         return Display.getCurrent().getSystemColor(SWT.COLOR_DARK_RED);
 else         if (delta > 0)         return Display.getCurrent().getSystemColor(SWT.COLOR_DARK_GREEN);
      }
      return null;
    }
  }
);
  column.setVisible(false);
  support.addColumn(column);
  addTaxonomyColumns();
  addAttributeColumns();
  support.createColumns();
  assets.getTable().setHeaderVisible(true);
  assets.getTable().setLinesVisible(true);
  assets.setContentProvider(new StatementOfAssetsContentProvider());
  assets.addDragSupport(DND.DROP_MOVE,new Transfer[]{SecurityTransfer.getTransfer()},new SecurityDragListener(assets));
  LocalResourceManager resources=new LocalResourceManager(JFaceResources.getResources(),assets.getTable());
  boldFont=resources.createFont(FontDescriptor.createFrom(assets.getTable().getFont()).setStyle(SWT.BOLD));
}

Fixed version (ground truth):
private void createColumns(Composite parent){
  container=new Composite(parent,SWT.NONE);
  TableColumnLayout layout=new TableColumnLayout();
  container.setLayout(layout);
  assets=new TableViewer(container,SWT.FULL_SELECTION);
  ColumnViewerToolTipSupport.enableFor(assets,ToolTip.NO_RECREATE);
  ColumnEditingSupport.prepare(assets);
  support=new ShowHideColumnHelper(StatementOfAssetsViewer.class.getName(),client,owner.getPreferenceStore(),assets,layout);
  Column column=new Column("String_Node_Str",Messages.ColumnSharesOwned,SWT.RIGHT,80);
  column.setLabelProvider(new SharesLabelProvider(){
    @Override public Long getValue(    Object e){
      Element element=(Element)e;
      return element.isSecurity() ? element.getSecurityPosition().getShares() : null;
    }
    @Override public String getToolTipText(    Object e){
      Element element=(Element)e;
      return element.isSecurity() ? Values.Share.format(element.getSecurityPosition().getShares()) : null;
    }
  }
);
  support.addColumn(column);
  column=new NameColumn("String_Node_Str");
  column.setLabelProvider(new NameColumnLabelProvider(){
    @Override public String getText(    Object e){
      if (((Element)e).isGroupByTaxonomy())       return Messages.LabelTotalSum;
      return super.getText(e);
    }
    @Override public Font getFont(    Object e){
      return ((Element)e).isGroupByTaxonomy() || ((Element)e).isCategory() ? boldFont : null;
    }
    @Override public Image getImage(    Object e){
      if (((Element)e).isCategory())       return null;
      return super.getImage(e);
    }
  }
);
  column.setEditingSupport(new StringEditingSupport(Named.class,"String_Node_Str"){
    @Override public boolean canEdit(    Object element){
      boolean isCategory=((Element)element).isCategory();
      boolean isUnassignedCategory=isCategory && Classification.UNASSIGNED_ID.equals(((Element)element).getCategory().getClassification().getId());
      return !isUnassignedCategory ? super.canEdit(element) : false;
    }
  }
.setMandatory(true).addListener(new MarkDirtyListener(this.owner)));
  column.setSorter(null);
  support.addColumn(column);
  column=new Column("String_Node_Str",Messages.ColumnTicker,SWT.None,60);
  column.setLabelProvider(new ColumnLabelProvider(){
    @Override public String getText(    Object e){
      Element element=(Element)e;
      return element.isSecurity() ? element.getSecurity().getTickerSymbol() : null;
    }
  }
);
  support.addColumn(column);
  column=new Column("String_Node_Str",Messages.ColumnWKN,SWT.None,60);
  column.setLabelProvider(new ColumnLabelProvider(){
    @Override public String getText(    Object e){
      Element element=(Element)e;
      return element.isSecurity() ? element.getSecurity().getWkn() : null;
    }
  }
);
  column.setVisible(false);
  support.addColumn(column);
  column=new IsinColumn("String_Node_Str");
  column.getEditingSupport().addListener(new MarkDirtyListener(this.owner));
  column.setSorter(null);
  column.setVisible(false);
  support.addColumn(column);
  column=new Column("String_Node_Str",Messages.ColumnQuote,SWT.RIGHT,60);
  column.setLabelProvider(new ColumnLabelProvider(){
    @Override public String getText(    Object e){
      Element element=(Element)e;
      return element.isSecurity() ? Values.Quote.format(element.getSecurityPosition().getPrice().getValue()) : null;
    }
  }
);
  support.addColumn(column);
  column=new Column("String_Node_Str",Messages.ColumnMarketValue,SWT.RIGHT,80);
  column.setLabelProvider(new ColumnLabelProvider(){
    @Override public String getText(    Object e){
      Element element=(Element)e;
      return Values.Amount.format(element.getValuation());
    }
    @Override public Font getFont(    Object e){
      return ((Element)e).isGroupByTaxonomy() || ((Element)e).isCategory() ? boldFont : null;
    }
  }
);
  support.addColumn(column);
  column=new Column("String_Node_Str",Messages.ColumnShareInPercent,SWT.RIGHT,80);
  column.setLabelProvider(new ColumnLabelProvider(){
    @Override public String getText(    Object e){
      Element element=(Element)e;
      if (element.isGroupByTaxonomy())       return Values.Percent.format(1d);
      if (element.isCategory())       return Values.Percent.format(element.getCategory().getShare());
 else       return Values.Percent.format(element.getPosition().getShare());
    }
    @Override public Font getFont(    Object e){
      return ((Element)e).isGroupByTaxonomy() || ((Element)e).isCategory() ? boldFont : null;
    }
  }
);
  support.addColumn(column);
  column=new Column("String_Node_Str",Messages.ColumnPurchasePrice,SWT.RIGHT,60);
  column.setLabelProvider(new ColumnLabelProvider(){
    @Override public String getText(    Object e){
      Element element=(Element)e;
      if (element.isSecurity()) {
        long purchasePrice=element.getSecurityPosition().getFIFOPurchasePrice();
        return purchasePrice == 0 ? null : Values.Amount.format(purchasePrice);
      }
      return null;
    }
  }
);
  column.setVisible(false);
  support.addColumn(column);
  column=new Column("String_Node_Str",Messages.ColumnPurchaseValue,SWT.RIGHT,80);
  column.setLabelProvider(new ColumnLabelProvider(){
    @Override public String getText(    Object e){
      Element element=(Element)e;
      long purchaseValue=element.getFIFOPurchaseValue();
      return purchaseValue == 0 ? null : Values.Amount.format(purchaseValue);
    }
    @Override public Font getFont(    Object e){
      return ((Element)e).isGroupByTaxonomy() || ((Element)e).isCategory() ? boldFont : null;
    }
  }
);
  column.setVisible(false);
  support.addColumn(column);
  column=new Column("String_Node_Str",Messages.ColumnProfitLoss,SWT.RIGHT,80);
  column.setLabelProvider(new ColumnLabelProvider(){
    @Override public String getText(    Object e){
      Element element=(Element)e;
      long profitLoss=element.getProfitLoss();
      return profitLoss == 0 ? null : Values.Amount.format(profitLoss);
    }
    @Override public Color getForeground(    Object e){
      Element element=(Element)e;
      long profitLoss=element.getProfitLoss();
      if (profitLoss < 0)       return Display.getCurrent().getSystemColor(SWT.COLOR_DARK_RED);
 else       if (profitLoss > 0)       return Display.getCurrent().getSystemColor(SWT.COLOR_DARK_GREEN);
 else       return null;
    }
    @Override public Font getFont(    Object e){
      return ((Element)e).isGroupByTaxonomy() || ((Element)e).isCategory() ? boldFont : null;
    }
  }
);
  column.setVisible(false);
  support.addColumn(column);
  column=new NoteColumn();
  column.getEditingSupport().addListener(new MarkDirtyListener(this.owner));
  column.setSorter(null);
  support.addColumn(column);
  column=new Column("String_Node_Str",Messages.ColumnIRRPerformance,SWT.RIGHT,80);
  column.setOptions(Messages.LabelReportingYears,Messages.ColumnIRRPerformanceOption,1,2,3,4,5,10);
  column.setLabelProvider(new OptionLabelProvider(){
    @Override public String getText(    Object e,    Integer option){
      Element element=(Element)e;
      if (element.isSecurity()) {
        calculatePerformance(element,option);
        SecurityPerformanceRecord record=element.getPerformance(option);
        return Values.Percent.format(record.getIrr());
      }
      return null;
    }
    @Override public Color getForeground(    Object e,    Integer option){
      Element element=(Element)e;
      if (element.isSecurity()) {
        calculatePerformance(element,option);
        SecurityPerformanceRecord record=element.getPerformance(option);
        double irr=record.getIrr();
        if (irr < 0)         return Display.getCurrent().getSystemColor(SWT.COLOR_DARK_RED);
 else         if (irr > 0)         return Display.getCurrent().getSystemColor(SWT.COLOR_DARK_GREEN);
      }
      return null;
    }
  }
);
  column.setVisible(false);
  support.addColumn(column);
  column=new Column("String_Node_Str",Messages.ColumnTotalProfitLoss,SWT.RIGHT,80);
  column.setOptions(Messages.LabelReportingYears,Messages.ColumnTotalProfitLossOption,1,2,3,4,5,10);
  column.setLabelProvider(new OptionLabelProvider(){
    @Override public String getText(    Object e,    Integer option){
      Element element=(Element)e;
      if (element.isSecurity()) {
        calculatePerformance(element,option);
        SecurityPerformanceRecord record=element.getPerformance(option);
        return Values.Amount.format(record.getDelta());
      }
      return null;
    }
    @Override public Color getForeground(    Object e,    Integer option){
      Element element=(Element)e;
      if (element.isSecurity()) {
        calculatePerformance(element,option);
        SecurityPerformanceRecord record=element.getPerformance(option);
        long delta=record.getDelta();
        if (delta < 0)         return Display.getCurrent().getSystemColor(SWT.COLOR_DARK_RED);
 else         if (delta > 0)         return Display.getCurrent().getSystemColor(SWT.COLOR_DARK_GREEN);
      }
      return null;
    }
  }
);
  column.setVisible(false);
  support.addColumn(column);
  addTaxonomyColumns();
  addAttributeColumns();
  support.createColumns();
  assets.getTable().setHeaderVisible(true);
  assets.getTable().setLinesVisible(true);
  assets.setContentProvider(new StatementOfAssetsContentProvider());
  ViewerHelper.pack(assets);
  assets.addDragSupport(DND.DROP_MOVE,new Transfer[]{SecurityTransfer.getTransfer()},new SecurityDragListener(assets));
  LocalResourceManager resources=new LocalResourceManager(JFaceResources.getResources(),assets.getTable());
  boldFont=resources.createFont(FontDescriptor.createFrom(assets.getTable().getFont()).setStyle(SWT.BOLD));
}