Program: 126664
Project: 126664
Buggy source:
protected void addInstallButtons(){
  final AtomicInteger enabledButtonCount=new AtomicInteger(0);
  tableViewerCreator.getTableViewer().getControl().setRedraw(false);
  final Table table=tableViewerCreator.getTable();
  manualInstallButtonMap=new HashMap<ModuleToInstall,Button>();
  ILibrariesService librariesService=LibManagerUiPlugin.getDefault().getLibrariesService();
  disposePreviousEditors();
  for (  final TableItem item : table.getItems()) {
    TableEditor editor=new TableEditor(table);
    installButtonsEditors.add(editor);
    Control control=null;
    Object obj=item.getData();
    if (obj instanceof ModuleToInstall) {
      final ModuleToInstall data=(ModuleToInstall)obj;
      boolean isInstalled=false;
      try {
        isInstalled=librariesService.getLibraryStatus(data.getName()) == ELibraryInstallStatus.INSTALLED;
      }
 catch (      BusinessException e1) {
        log.error(e1);
      }
      boolean hasDownloadUrl=data.getUrl_description() != null;
      if (data.getUrl_download() != null) {
        final Button button=new Button(table,SWT.FLAT);
        control=button;
        enabledButtonCount.incrementAndGet();
        button.setText(Messages.getString("String_Node_Str"));
        button.setData(item);
        button.addSelectionListener(new SelectionAdapter(){
          @Override public void widgetSelected(          SelectionEvent e){
            table.select(table.indexOf(item));
            launchIndividualDownload(enabledButtonCount,data,button);
          }
        }
);
        button.setEnabled(!isInstalled);
      }
 else {
        Composite composite=new Composite(table,SWT.NONE);
        composite.setBackground(color);
        control=composite;
        GridLayout layout=new GridLayout(hasDownloadUrl ? 2 : 1,false);
        layout.marginHeight=0;
        layout.verticalSpacing=1;
        composite.setLayout(layout);
        if (hasDownloadUrl) {
          Link openLink=new Link(composite,SWT.NONE);
          GridDataFactory.fillDefaults().align(SWT.CENTER,SWT.CENTER).applyTo(openLink);
          openLink.setBackground(color);
          openLink.setText("String_Node_Str" + Messages.getString("String_Node_Str") + "String_Node_Str");
          openLink.addSelectionListener(new SelectionAdapter(){
            @Override public void widgetSelected(            final SelectionEvent e){
              Program.launch(data.getUrl_description());
            }
          }
);
        }
        Button importButton=new Button(composite,SWT.FLAT);
        importButton.setImage(ImageProvider.getImage(ECoreImage.IMPORT_JAR));
        importButton.setToolTipText(Messages.getString("String_Node_Str"));
        importButton.addSelectionListener(new ImportButtonSelectionListener(item));
        manualInstallButtonMap.put(data,importButton);
        GridDataFactory.fillDefaults().align(SWT.RIGHT,SWT.CENTER).grab(true,false).applyTo(importButton);
        importButton.setEnabled(!isInstalled);
      }
      editor.grabHorizontal=true;
      editor.minimumHeight=20;
      editor.setEditor(control,item,tableViewerCreator.getColumns().indexOf(installcolumn));
      editor.layout();
      editor=new TableEditor(table);
      installButtonsEditors.add(editor);
      Composite composite=new Composite(table,SWT.NONE);
      composite.setBackground(color);
      GridLayout layout=new GridLayout();
      layout.marginHeight=0;
      layout.marginRight=0;
      layout.verticalSpacing=1;
      composite.setLayout(layout);
      GridData gData=new GridData(GridData.FILL_HORIZONTAL);
      final Link openLink=new Link(composite,SWT.NONE);
      openLink.setLayoutData(gData);
      openLink.setBackground(color);
      openLink.setText("String_Node_Str" + (hasDownloadUrl ? data.getUrl_description() : "String_Node_Str") + "String_Node_Str");
      openLink.addSelectionListener(new SelectionAdapter(){
        @Override public void widgetSelected(        final SelectionEvent e){
          Program.launch(data.getUrl_description());
        }
      }
);
      editor.grabHorizontal=true;
      editor.minimumHeight=20;
      editor.setEditor(composite,item,tableViewerCreator.getColumns().indexOf(urlcolumn));
      editor.layout();
    }
  }
  tableViewerCreator.getTableViewer().getTable().layout();
  tableViewerCreator.getTableViewer().refresh(true);
  tableViewerCreator.getTableViewer().getControl().setRedraw(true);
}

Fixed version (ground truth):
protected void addInstallButtons(){
  final AtomicInteger enabledButtonCount=new AtomicInteger(0);
  tableViewerCreator.getTableViewer().getControl().setRedraw(false);
  final Table table=tableViewerCreator.getTable();
  manualInstallButtonMap=new HashMap<ModuleToInstall,Button>();
  ILibrariesService librariesService=LibManagerUiPlugin.getDefault().getLibrariesService();
  disposePreviousEditors();
  for (  final TableItem item : table.getItems()) {
    TableEditor editor=new TableEditor(table);
    installButtonsEditors.add(editor);
    Control control=null;
    Object obj=item.getData();
    if (obj instanceof ModuleToInstall) {
      final ModuleToInstall data=(ModuleToInstall)obj;
      boolean isInstalled=false;
      try {
        isInstalled=librariesService.getLibraryStatus(data.getName()) == ELibraryInstallStatus.INSTALLED;
      }
 catch (      BusinessException e1) {
        log.error(e1);
      }
      boolean hasDownloadUrl=data.getUrl_description() != null;
      if (data.getUrl_download() != null) {
        final Button button=new Button(table,SWT.FLAT);
        control=button;
        enabledButtonCount.incrementAndGet();
        button.setText(Messages.getString("String_Node_Str"));
        button.setData(item);
        button.addSelectionListener(new SelectionAdapter(){
          @Override public void widgetSelected(          SelectionEvent e){
            table.select(table.indexOf(item));
            launchIndividualDownload(enabledButtonCount,data,button);
          }
        }
);
        button.setEnabled(!isInstalled);
      }
 else {
        Composite composite=new Composite(table,SWT.NONE);
        composite.setBackground(color);
        control=composite;
        GridLayout layout=new GridLayout(hasDownloadUrl ? 2 : 1,false);
        layout.marginHeight=0;
        layout.verticalSpacing=1;
        composite.setLayout(layout);
        if (hasDownloadUrl) {
          Link openLink=new Link(composite,SWT.NONE);
          GridDataFactory.fillDefaults().align(SWT.CENTER,SWT.CENTER).applyTo(openLink);
          openLink.setBackground(color);
          openLink.setText("String_Node_Str" + Messages.getString("String_Node_Str") + "String_Node_Str");
          openLink.addSelectionListener(new SelectionAdapter(){
            @Override public void widgetSelected(            final SelectionEvent e){
              Program.launch(data.getUrl_description());
            }
          }
);
        }
        enabledButtonCount.incrementAndGet();
        Button importButton=new Button(composite,SWT.FLAT);
        importButton.setImage(ImageProvider.getImage(ECoreImage.IMPORT_JAR));
        importButton.setToolTipText(Messages.getString("String_Node_Str"));
        importButton.addSelectionListener(new ImportButtonSelectionListener(enabledButtonCount,item));
        manualInstallButtonMap.put(data,importButton);
        GridDataFactory.fillDefaults().align(SWT.RIGHT,SWT.CENTER).grab(true,false).applyTo(importButton);
        importButton.setEnabled(!isInstalled);
      }
      editor.grabHorizontal=true;
      editor.minimumHeight=20;
      editor.setEditor(control,item,tableViewerCreator.getColumns().indexOf(installcolumn));
      editor.layout();
      editor=new TableEditor(table);
      installButtonsEditors.add(editor);
      Composite composite=new Composite(table,SWT.NONE);
      composite.setBackground(color);
      GridLayout layout=new GridLayout();
      layout.marginHeight=0;
      layout.marginRight=0;
      layout.verticalSpacing=1;
      composite.setLayout(layout);
      GridData gData=new GridData(GridData.FILL_HORIZONTAL);
      final Link openLink=new Link(composite,SWT.NONE);
      openLink.setLayoutData(gData);
      openLink.setBackground(color);
      openLink.setText("String_Node_Str" + (hasDownloadUrl ? data.getUrl_description() : "String_Node_Str") + "String_Node_Str");
      openLink.addSelectionListener(new SelectionAdapter(){
        @Override public void widgetSelected(        final SelectionEvent e){
          Program.launch(data.getUrl_description());
        }
      }
);
      editor.grabHorizontal=true;
      editor.minimumHeight=20;
      editor.setEditor(composite,item,tableViewerCreator.getColumns().indexOf(urlcolumn));
      editor.layout();
    }
  }
  tableViewerCreator.getTableViewer().getTable().layout();
  tableViewerCreator.getTableViewer().refresh(true);
  tableViewerCreator.getTableViewer().getControl().setRedraw(true);
}