Program: 108646
Project: 108646
Buggy source:
/** 
 * Creates a new instance
 * @param parent
 * @param model
 */
public HierarchyWizardEditor(Composite parent,HierarchyWizardModelGrouping<T> model){
  this.model=model;
  this.model.register(this);
  this.composite=new Composite(parent,SWT.NONE);
  this.composite.setLayoutData(SWTUtil.createFillGridData());
  this.composite.setLayout(SWTUtil.createGridLayout(1));
  this.scrolledcomposite=new ScrolledComposite(composite,SWT.H_SCROLL | SWT.V_SCROLL | SWT.BORDER);
  this.scrolledcomposite.setMinSize(200,200);
  this.scrolledcomposite.setExpandHorizontal(true);
  this.scrolledcomposite.setExpandVertical(true);
  this.scrolledcomposite.setLayoutData(SWTUtil.createFillGridData());
  this.canvascomposite=new Composite(scrolledcomposite,SWT.NONE);
  this.scrolledcomposite.setContent(canvascomposite);
  this.canvascomposite.addPaintListener(new PaintListener(){
    @Override public void paintControl(    PaintEvent e){
      paint(e.gc);
    }
  }
);
  this.canvascomposite.addMouseListener(new MouseAdapter(){
    @Override public void mouseUp(    MouseEvent arg0){
      if (HierarchyWizardEditor.this.model.getRenderer().select(arg0.x,arg0.y)) {
        HierarchyWizardEditor.this.model.update(HierarchyWizardEditor.this);
        canvascomposite.redraw();
        Object selected=HierarchyWizardEditor.this.model.getSelectedElement();
        if (selected instanceof HierarchyWizardGroupingInterval) {
          if (HierarchyWizardEditor.this.model.isShowIntervals())           folder.setSelection(2);
        }
 else         if (selected instanceof HierarchyWizardGroupingGroup) {
          if (HierarchyWizardEditor.this.model.isShowIntervals())           folder.setSelection(3);
 else           folder.setSelection(1);
        }
      }
      if ((arg0.stateMask & SWT.BUTTON3) != 0 && HierarchyWizardEditor.this.model.getSelectedElement() != null) {
        menu.show(arg0.x,arg0.y);
      }
    }
  }
);
  this.menu=new HierarchyWizardEditorMenu<T>(composite,model);
  this.folder=new CTabFolder(composite,SWT.BORDER);
  this.folder.setSimple(false);
  this.folder.setLayoutData(SWTUtil.createFillHorizontallyGridData());
  this.createGeneralTab(folder);
  if (model.isShowIntervals())   this.createRangeTab(folder);
  if (model.isShowIntervals())   this.createIntervalTab(folder);
  this.createGroupTab(folder);
  this.folder.setSelection(0);
  this.model.update();
}

Fixed version (ground truth):
/** 
 * Creates a new instance
 * @param parent
 * @param model
 */
public HierarchyWizardEditor(Composite parent,HierarchyWizardModelGrouping<T> model){
  this.model=model;
  this.model.register(this);
  this.composite=new Composite(parent,SWT.NONE);
  this.composite.setLayoutData(SWTUtil.createFillGridData());
  this.composite.setLayout(SWTUtil.createGridLayout(1));
  this.scrolledcomposite=new ScrolledComposite(composite,SWT.H_SCROLL | SWT.V_SCROLL | SWT.BORDER);
  this.scrolledcomposite.setMinSize(200,200);
  this.scrolledcomposite.setExpandHorizontal(true);
  this.scrolledcomposite.setExpandVertical(true);
  this.scrolledcomposite.setLayoutData(SWTUtil.createFillGridData());
  this.canvascomposite=new Composite(scrolledcomposite,SWT.NONE);
  this.scrolledcomposite.setContent(canvascomposite);
  this.canvascomposite.addPaintListener(new PaintListener(){
    @Override public void paintControl(    PaintEvent e){
      paint(e.gc);
    }
  }
);
  this.canvascomposite.addMouseListener(new MouseAdapter(){
    @Override public void mouseUp(    MouseEvent arg0){
      if (HierarchyWizardEditor.this.model.getRenderer().select(arg0.x,arg0.y)) {
        HierarchyWizardEditor.this.model.update(HierarchyWizardEditor.this);
        canvascomposite.redraw();
        Object selected=HierarchyWizardEditor.this.model.getSelectedElement();
        if (selected instanceof HierarchyWizardGroupingInterval) {
          if (HierarchyWizardEditor.this.model.isShowIntervals())           folder.setSelection(2);
        }
 else         if (selected instanceof HierarchyWizardGroupingGroup) {
          if (HierarchyWizardEditor.this.model.isShowIntervals())           folder.setSelection(3);
 else           folder.setSelection(1);
        }
      }
      if ((arg0.stateMask & SWT.BUTTON3) != 0 && HierarchyWizardEditor.this.model.getSelectedElement() != null) {
        menu.show(arg0.x,arg0.y);
      }
    }
  }
);
  this.menu=new HierarchyWizardEditorMenu<T>(canvascomposite,model);
  this.folder=new CTabFolder(composite,SWT.BORDER);
  this.folder.setSimple(false);
  this.folder.setLayoutData(SWTUtil.createFillHorizontallyGridData());
  this.createGeneralTab(folder);
  if (model.isShowIntervals())   this.createRangeTab(folder);
  if (model.isShowIntervals())   this.createIntervalTab(folder);
  this.createGroupTab(folder);
  this.folder.setSelection(0);
  this.model.update();
}