Program: 72781
Project: 72781
Buggy source:
public void createControl(Composite parent){
  container=new Composite(parent,SWT.NONE);
  GridLayout layout=new GridLayout();
  layout.marginWidth=layout.marginHeight=0;
  container.setLayout(layout);
  title=new TabbedPropertyTitle(container,FormWidgetFactory.getInstance());
  title.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
  Composite viewerContainer=new Composite(container,SWT.NONE);
  layout=new GridLayout();
  layout.marginWidth=10;
  layout.marginHeight=3;
  viewerContainer.setLayout(layout);
  viewerContainer.setLayoutData(new GridData(GridData.FILL_BOTH));
  viewer=new CustomTreeViewer(viewerContainer,SWT.FULL_SELECTION);
  tableTree=viewer.getTree();
  tableTree.setLayoutData(new GridData(GridData.FILL_BOTH));
  tableTree.setHeaderVisible(true);
  tableTree.setLinesVisible(true);
  addColumns();
  contentProvider=new ReportPropertySheetContentProvider();
  viewer.setContentProvider(contentProvider);
  labelProvider=new ReportPropertySheetLabelProvider();
  viewer.setLabelProvider(labelProvider);
  viewer.setColumnProperties(new String[]{COLUMN_TITLE_PROPERTY,COLUMN_TITLE_VALUE});
  AlphabeticallyViewSorter sorter=new AlphabeticallyViewSorter();
  sorter.setAscending(true);
  viewer.setSorter(sorter);
  hookControl();
  tableTreeEditor=new TreeEditor(tableTree);
  createEditorListener();
  handleGlobalAction();
  SessionHandleAdapter.getInstance().getMediator().addColleague(this);
  FormWidgetFactory.getInstance().paintFormStyle(parent);
  FormWidgetFactory.getInstance().adapt(parent);
  IWorkbenchPage page=getSite().getPage();
  MementoBuilder builder=new MementoBuilder();
  if ((propertySheetMemento=builder.getRootMemento().getChild(IPageLayout.ID_PROP_SHEET)) == null) {
    propertySheetMemento=builder.getRootMemento().createChild(IPageLayout.ID_PROP_SHEET,MementoElement.Type_View);
  }
  if ((viewerMemento=propertySheetMemento.getChild(propertyViewerID)) == null) {
    viewerMemento=propertySheetMemento.createChild(propertyViewerID,MementoElement.Type_Viewer);
  }
  handleSelectionChanged(page.getSelection());
}

Fixed version (ground truth):
public void createControl(Composite parent){
  container=new Composite(parent,SWT.NONE);
  GridLayout layout=new GridLayout();
  layout.marginWidth=layout.marginHeight=0;
  container.setLayout(layout);
  title=new TabbedPropertyTitle(container,FormWidgetFactory.getInstance());
  title.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
  Composite viewerContainer=new Composite(container,SWT.NONE);
  layout=new GridLayout();
  layout.marginWidth=10;
  layout.marginHeight=3;
  viewerContainer.setLayout(layout);
  viewerContainer.setLayoutData(new GridData(GridData.FILL_BOTH));
  viewer=new CustomTreeViewer(viewerContainer,SWT.FULL_SELECTION);
  tableTree=viewer.getTree();
  tableTree.setLayoutData(new GridData(GridData.FILL_BOTH));
  tableTree.setHeaderVisible(true);
  tableTree.setLinesVisible(true);
  addColumns();
  contentProvider=new ReportPropertySheetContentProvider();
  viewer.setContentProvider(contentProvider);
  labelProvider=new ReportPropertySheetLabelProvider();
  viewer.setLabelProvider(labelProvider);
  viewer.setColumnProperties(new String[]{COLUMN_TITLE_PROPERTY,COLUMN_TITLE_VALUE});
  AlphabeticallyViewSorter sorter=new AlphabeticallyViewSorter();
  sorter.setAscending(true);
  viewer.setSorter(sorter);
  hookControl();
  tableTreeEditor=new TreeEditor(tableTree);
  createEditorListener();
  handleGlobalAction();
  SessionHandleAdapter.getInstance().getMediator(moduleHandle).addColleague(this);
  FormWidgetFactory.getInstance().paintFormStyle(parent);
  FormWidgetFactory.getInstance().adapt(parent);
  IWorkbenchPage page=getSite().getPage();
  MementoBuilder builder=new MementoBuilder();
  if ((propertySheetMemento=builder.getRootMemento().getChild(IPageLayout.ID_PROP_SHEET)) == null) {
    propertySheetMemento=builder.getRootMemento().createChild(IPageLayout.ID_PROP_SHEET,MementoElement.Type_View);
  }
  if ((viewerMemento=propertySheetMemento.getChild(propertyViewerID)) == null) {
    viewerMemento=propertySheetMemento.createChild(propertyViewerID,MementoElement.Type_Viewer);
  }
  handleSelectionChanged(page.getSelection());
}