Program: 136607
Project: 136607
Buggy source:
private TableViewer createSectionPart(Composite parentComp,final List<RepositoryNode> columnList,String sectionTitle,String buttonText,String buttonTooltipText,final boolean isLeftPart){
  Section columnSetElementSection=masterPage.createSection(form,parentComp,sectionTitle,null);
  Composite sectionComp=toolkit.createComposite(columnSetElementSection);
  sectionComp.setLayout(new GridLayout());
  Button selectColumnBtn=toolkit.createButton(sectionComp,buttonText,SWT.NONE);
  selectColumnBtn.setToolTipText(buttonTooltipText);
  GridDataFactory.fillDefaults().align(SWT.BEGINNING,SWT.BEGINNING).applyTo(selectColumnBtn);
  Composite columsComp=toolkit.createComposite(sectionComp,SWT.NULL);
  GridDataFactory.fillDefaults().align(SWT.FILL,SWT.BEGINNING).grab(true,true).applyTo(columsComp);
  columsComp.setLayout(new GridLayout());
  final TableViewer columnsElementViewer=createTreeViewer(columnList,columsComp);
  tableViewerPosStack.add(columnsElementViewer);
  ComparisonTableViewerDNDDecorate dndDecorate=new ComparisonTableViewerDNDDecorate(this,masterPage,tableViewerPosStack,allowColumnDupcation);
  dndDecorate.installDND(columnsElementViewer,true,ComparisonTableViewerDNDDecorate.COLUMN_VALIDATETYPE);
  Composite buttonsComp=toolkit.createComposite(columsComp,SWT.NULL);
  buttonsComp.setLayout(new GridLayout(4,true));
  buttonsComp.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
  final Button delButton=new Button(buttonsComp,SWT.NULL);
  delButton.setImage(ImageLib.getImage(ImageLib.DELETE_ACTION));
  GridData buttonGridData=new GridData(GridData.FILL_BOTH);
  delButton.setLayoutData(buttonGridData);
  final Button moveUpButton=new Button(buttonsComp,SWT.NULL);
  moveUpButton.setText(DefaultMessagesImpl.getString("String_Node_Str"));
  moveUpButton.setLayoutData(buttonGridData);
  final Button moveDownButton=new Button(buttonsComp,SWT.NULL);
  moveDownButton.setText(DefaultMessagesImpl.getString("String_Node_Str"));
  moveDownButton.setLayoutData(buttonGridData);
  Button sortButton=new Button(buttonsComp,SWT.NULL);
  sortButton.setText(DefaultMessagesImpl.getString("String_Node_Str"));
  sortButton.setLayoutData(buttonGridData);
  final Button[] buttons=new Button[]{delButton,moveUpButton,moveDownButton};
  columnsElementViewer.addSelectionChangedListener(new ISelectionChangedListener(){
    public void selectionChanged(    SelectionChangedEvent event){
      enabledButtons(buttons,event.getSelection() != null);
      showDetailView(columnsElementViewer);
    }
  }
);
  createTableViewerMenu(columnsElementViewer,columnList,buttons,isLeftPart);
  delButton.addSelectionListener(new SelectionAdapter(){
    @Override public void widgetSelected(    SelectionEvent e){
      columnList.removeAll(((IStructuredSelection)columnsElementViewer.getSelection()).toList());
      columnsElementViewer.setInput(columnList);
      enabledButtons(buttons,false);
      masterPage.setDirty(true);
      computeRefreshDataPreviewPart(isLeftPart,columnList);
    }
  }
);
  moveUpButton.addSelectionListener(new SelectionAdapter(){
    @Override public void widgetSelected(    SelectionEvent e){
      moveElement(columnList,columnsElementViewer,false);
      computeRefreshDataPreviewPart(isLeftPart,columnList);
    }
  }
);
  moveDownButton.addSelectionListener(new SelectionAdapter(){
    @Override public void widgetSelected(    SelectionEvent e){
      moveElement(columnList,columnsElementViewer,true);
      computeRefreshDataPreviewPart(isLeftPart,columnList);
    }
  }
);
  sortButton.addSelectionListener(new SelectionAdapter(){
    @Override public void widgetSelected(    SelectionEvent e){
      sortElement(columnList,columnsElementViewer);
      computeRefreshDataPreviewPart(isLeftPart,columnList);
    }
  }
);
  this.enabledButtons(new Button[]{delButton,moveUpButton,moveDownButton},false);
  final List<RepositoryNode> columnsOfSectionPart=columnList;
  selectColumnBtn.addMouseListener(new MouseAdapter(){
    @Override public void mouseDown(    MouseEvent e){
      openColumnsSelectionDialog(columnsElementViewer,columnsOfSectionPart,isLeftPart);
      enabledButtons(buttons,false);
    }
  }
);
  columnSetElementSection.setClient(sectionComp);
  return columnsElementViewer;
}

Fixed version (ground truth):
private TableViewer createSectionPart(Composite parentComp,final List<RepositoryNode> columnList,String sectionTitle,String buttonText,String buttonTooltipText,final boolean isLeftPart){
  Section columnSetElementSection=masterPage.createSection(form,parentComp,sectionTitle,null);
  Composite sectionComp=toolkit.createComposite(columnSetElementSection);
  sectionComp.setLayout(new GridLayout());
  Button selectColumnBtn=toolkit.createButton(sectionComp,buttonText,SWT.NONE);
  selectColumnBtn.setToolTipText(buttonTooltipText);
  GridDataFactory.fillDefaults().align(SWT.BEGINNING,SWT.BEGINNING).applyTo(selectColumnBtn);
  Composite columsComp=toolkit.createComposite(sectionComp,SWT.NULL);
  GridDataFactory.fillDefaults().align(SWT.FILL,SWT.BEGINNING).grab(true,true).applyTo(columsComp);
  columsComp.setLayout(new GridLayout());
  final TableViewer columnsElementViewer=createTreeViewer(columnList,columsComp);
  tableViewerPosStack.add(columnsElementViewer);
  ComparisonTableViewerDNDDecorate dndDecorate=new ComparisonTableViewerDNDDecorate(this,masterPage,tableViewerPosStack,allowColumnDupcation);
  dndDecorate.installDND(columnsElementViewer,true,ComparisonTableViewerDNDDecorate.COLUMN_VALIDATETYPE,isLeftPart);
  Composite buttonsComp=toolkit.createComposite(columsComp,SWT.NULL);
  buttonsComp.setLayout(new GridLayout(4,true));
  buttonsComp.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
  final Button delButton=new Button(buttonsComp,SWT.NULL);
  delButton.setImage(ImageLib.getImage(ImageLib.DELETE_ACTION));
  GridData buttonGridData=new GridData(GridData.FILL_BOTH);
  delButton.setLayoutData(buttonGridData);
  final Button moveUpButton=new Button(buttonsComp,SWT.NULL);
  moveUpButton.setText(DefaultMessagesImpl.getString("String_Node_Str"));
  moveUpButton.setLayoutData(buttonGridData);
  final Button moveDownButton=new Button(buttonsComp,SWT.NULL);
  moveDownButton.setText(DefaultMessagesImpl.getString("String_Node_Str"));
  moveDownButton.setLayoutData(buttonGridData);
  Button sortButton=new Button(buttonsComp,SWT.NULL);
  sortButton.setText(DefaultMessagesImpl.getString("String_Node_Str"));
  sortButton.setLayoutData(buttonGridData);
  final Button[] buttons=new Button[]{delButton,moveUpButton,moveDownButton};
  columnsElementViewer.addSelectionChangedListener(new ISelectionChangedListener(){
    public void selectionChanged(    SelectionChangedEvent event){
      enabledButtons(buttons,event.getSelection() != null);
      showDetailView(columnsElementViewer);
    }
  }
);
  createTableViewerMenu(columnsElementViewer,columnList,buttons,isLeftPart);
  delButton.addSelectionListener(new SelectionAdapter(){
    @Override public void widgetSelected(    SelectionEvent e){
      columnList.removeAll(((IStructuredSelection)columnsElementViewer.getSelection()).toList());
      columnsElementViewer.setInput(columnList);
      enabledButtons(buttons,false);
      masterPage.setDirty(true);
      computeRefreshDataPreviewPart(isLeftPart,columnList,columnsElementViewer);
    }
  }
);
  moveUpButton.addSelectionListener(new SelectionAdapter(){
    @Override public void widgetSelected(    SelectionEvent e){
      moveElement(columnList,columnsElementViewer,false);
      computeRefreshDataPreviewPart(isLeftPart,columnList,columnsElementViewer);
    }
  }
);
  moveDownButton.addSelectionListener(new SelectionAdapter(){
    @Override public void widgetSelected(    SelectionEvent e){
      moveElement(columnList,columnsElementViewer,true);
      computeRefreshDataPreviewPart(isLeftPart,columnList,columnsElementViewer);
    }
  }
);
  sortButton.addSelectionListener(new SelectionAdapter(){
    @Override public void widgetSelected(    SelectionEvent e){
      sortElement(columnList,columnsElementViewer);
      computeRefreshDataPreviewPart(isLeftPart,columnList,columnsElementViewer);
    }
  }
);
  this.enabledButtons(new Button[]{delButton,moveUpButton,moveDownButton},false);
  final List<RepositoryNode> columnsOfSectionPart=columnList;
  selectColumnBtn.addMouseListener(new MouseAdapter(){
    @Override public void mouseDown(    MouseEvent e){
      openColumnsSelectionDialog(columnsElementViewer,columnsOfSectionPart,isLeftPart);
      enabledButtons(buttons,false);
    }
  }
);
  columnSetElementSection.setClient(sectionComp);
  return columnsElementViewer;
}