Program: 129153
Project: 129153
Buggy source:
/** 
 * zwang Comment method "initializeUI".
 * @param viewer
 */
private void initializeUI(){
  final ToolBar toolBar=new ToolBar(this,SWT.FLAT | SWT.NO_BACKGROUND);
  GridDataFactory.swtDefaults().align(SWT.RIGHT,SWT.TOP).applyTo(toolBar);
  createToolBar(toolBar);
  viewer=new TreeViewer(this,SWT.FULL_SELECTION | SWT.H_SCROLL | SWT.V_SCROLL| SWT.BORDER);
  Tree tree=viewer.getTree();
  tree.setHeaderVisible(true);
  tree.setLinesVisible(true);
  tree.setLayoutData(new GridData(GridData.FILL_BOTH));
  createColumnsAndCellEditors(tree,getContexts());
  tree.layout();
  boolean isRepositoryContext=(modelManager instanceof ContextComposite) && ((ContextComposite)modelManager).isRepositoryContext();
  cellModifier=new ContextTableCellModifier(this,isRepositoryContext);
  viewer.setCellModifier(cellModifier);
  provider=new ContextViewerProvider();
  changeContextProvider();
  final TreeEditor treeEditor=new TreeEditor(viewer.getTree());
  valueChecker=new ContextValueErrorChecker(viewer);
  if (LanguageManager.getCurrentLanguage() == ECodeLanguage.PERL) {
    createTreeTooltip(tree);
  }
}

Fixed version (ground truth):
/** 
 * zwang Comment method "initializeUI".
 * @param viewer
 */
private void initializeUI(){
  final ToolBar toolBar=new ToolBar(this,SWT.FLAT | SWT.NO_BACKGROUND);
  GridDataFactory.swtDefaults().align(SWT.RIGHT,SWT.TOP).applyTo(toolBar);
  createToolBar(toolBar);
  viewer=new TreeViewer(this,SWT.FULL_SELECTION | SWT.H_SCROLL | SWT.V_SCROLL| SWT.BORDER);
  Tree tree=viewer.getTree();
  tree.setHeaderVisible(true);
  tree.setLinesVisible(true);
  tree.setLayoutData(new GridData(GridData.FILL_BOTH));
  createColumnsAndCellEditors(tree,getContexts());
  tree.layout();
  boolean isRepositoryContext=(modelManager instanceof ContextComposite) && ((ContextComposite)modelManager).isRepositoryContext();
  cellModifier=new ContextTableCellModifier(this,isRepositoryContext);
  viewer.setCellModifier(cellModifier);
  provider=new ContextViewerProvider();
  changeContextProvider();
  final TreeEditor treeEditor=new TreeEditor(viewer.getTree());
  viewer.getTree().addMouseListener(new MouseAdapter(){
    @Override public void mouseDown(    MouseEvent e){
      if (modelManager.isReadOnly()) {
        return;
      }
      Point pt=new Point(e.x,e.y);
      if (e.x > 0 && e.x < (viewer.getTree().getColumnCount()) * ContextTableValuesComposite.CONTEXT_COLUMN_WIDTH) {
        createEditorListener(treeEditor,e.x / CONTEXT_COLUMN_WIDTH);
      }
      TreeItem item=viewer.getTree().getItem(pt);
      if (cellEditor != null && !cellEditor.getControl().isDisposed()) {
        deactivateCellEditor(treeEditor,e.x / CONTEXT_COLUMN_WIDTH);
      }
      if (item != null && !item.isDisposed()) {
        Rectangle rect=item.getBounds(viewer.getTree().getColumnCount() - 1);
        if (e.x > 0 && e.x < (viewer.getTree().getColumnCount()) * ContextTableValuesComposite.CONTEXT_COLUMN_WIDTH) {
          handleSelect(item,viewer.getTree(),treeEditor,viewer.getTree().getColumnCount() - 1,e.x / CONTEXT_COLUMN_WIDTH);
        }
      }
    }
  }
);
  valueChecker=new ContextValueErrorChecker(viewer);
  if (LanguageManager.getCurrentLanguage() == ECodeLanguage.PERL) {
    createTreeTooltip(tree);
  }
}