Program: 125277
Project: 125277
Buggy source:
/** 
 * called when the user clicked on a indivual download button.
 * @param button, to make it disabled or enabled
 * @param enabledButtonCount, if 0 means that the last button has been clicked. This needs to maintained whenenabeling or disabeling the button
 * @param data, the data to install
 */
protected void launchIndividualDownload(final AtomicInteger enabledButtonCount,final ModuleToInstall data,final Button button){
  button.setEnabled(false);
  enabledButtonCount.decrementAndGet();
  final DownloadModuleJob job=new DownloadModuleJob(Collections.singletonList(data));
  job.addJobChangeListener(new JobChangeAdapter(){
    @Override public void done(    IJobChangeEvent event){
      Display.getDefault().asyncExec(new Runnable(){
        @Override public void run(){
          String message="String_Node_Str";
          Set<String> installedModule=job.getInstalledModule();
          if (!installedModule.isEmpty()) {
            message=Messages.getString("String_Node_Str",data.getName());
            ImportExternalJarAction.cleanupLib(installedModule);
          }
 else {
            message=Messages.getString("String_Node_Str",data.getName());
            ;
            button.setEnabled(true);
          }
          MessageDialog.openInformation(getShell(),Messages.getString("String_Node_Str"),message);
          if (enabledButtonCount.get() == 0) {
            if (GlobalServiceRegister.getDefault().isServiceRegistered(IDesignerCoreService.class)) {
              IDesignerCoreService service=(IDesignerCoreService)GlobalServiceRegister.getDefault().getService(IDesignerCoreService.class);
              if (service != null) {
                service.refreshComponentView();
              }
            }
          }
        }
      }
);
    }
  }
);
  job.setUser(true);
  job.setPriority(Job.INTERACTIVE);
  job.schedule();
  if (enabledButtonCount.get() == 0) {
    close();
  }
}

Fixed version (ground truth):
/** 
 * called when the user clicked on a indivual download button.
 * @param button, to make it disabled or enabled
 * @param enabledButtonCount, if 0 means that the last button has been clicked. This needs to maintained whenenabeling or disabeling the button
 * @param data, the data to install
 */
protected void launchIndividualDownload(final AtomicInteger enabledButtonCount,final ModuleToInstall data,final Button button){
  button.setEnabled(false);
  enabledButtonCount.decrementAndGet();
  final DownloadModuleJob job=new DownloadModuleJob(Collections.singletonList(data));
  job.addJobChangeListener(new JobChangeAdapter(){
    @Override public void done(    IJobChangeEvent event){
      Display.getDefault().asyncExec(new Runnable(){
        @Override public void run(){
          String message="String_Node_Str";
          Set<String> installedModule=job.getInstalledModule();
          if (!installedModule.isEmpty()) {
            message=Messages.getString("String_Node_Str",data.getName());
            ImportExternalJarAction.cleanupLib(installedModule);
          }
 else {
            message=Messages.getString("String_Node_Str",data.getName());
            ;
            button.setEnabled(true);
          }
          MessageDialog.openInformation(getShell(),Messages.getString("String_Node_Str"),message);
          if (enabledButtonCount.get() == 0) {
            if (GlobalServiceRegister.getDefault().isServiceRegistered(IDesignerCoreService.class)) {
              IDesignerCoreService service=(IDesignerCoreService)GlobalServiceRegister.getDefault().getService(IDesignerCoreService.class);
              if (service != null) {
                service.refreshComponentView();
              }
            }
          }
          ILibrariesService librariesService=(ILibrariesService)GlobalServiceRegister.getDefault().getService(ILibrariesService.class);
          librariesService.checkLibraries();
        }
      }
);
    }
  }
);
  job.setUser(true);
  job.setPriority(Job.INTERACTIVE);
  job.schedule();
  if (enabledButtonCount.get() == 0) {
    close();
  }
}