Program: 57100
Project: 57100
Buggy source:
@Override protected Control createControl(Composite parent){
  dataSetChooser=new Combo(parent,SWT.BORDER);
  dataSetChooser.setText("String_Node_Str");
  dataSetChooser.setToolTipText("String_Node_Str");
  GridData gd=new GridData(SWT.RIGHT,SWT.TOP,false,false);
  gd.widthHint=100;
  dataSetChooser.setLayoutData(gd);
  final List<GeneticDataDomain> candidateDataDomains=DataDomainManager.get().getDataDomainsByType(GeneticDataDomain.class);
  String[] datasetNames=new String[candidateDataDomains.size() + 1];
  datasetNames[0]="String_Node_Str";
  int selectionIndex=0;
  for (int datasetCount=1; datasetCount <= candidateDataDomains.size(); datasetCount++) {
    datasetNames[datasetCount]=candidateDataDomains.get(datasetCount - 1).getDataSetDescription().getDataSetName();
    if (candidateDataDomains.get(datasetCount - 1) == mappingDataDomain) {
      selectionIndex=datasetCount;
    }
  }
  dataSetChooser.setItems(datasetNames);
  dataSetChooser.select(selectionIndex);
  dataSetChooser.addSelectionListener(new SelectionAdapter(){
    @Override public void widgetSelected(    SelectionEvent e){
      for (      AGLView view : ViewManager.get().getAllGLViews()) {
        if (view instanceof GLPathway) {
          GLPathway pwView=(GLPathway)view;
          AddTablePerspectivesEvent addTablePerspectivesEvent=new AddTablePerspectivesEvent();
          addTablePerspectivesEvent.setReceiver(pwView);
          TablePerspective tablePerspective=null;
          if (dataSetChooser.getSelectionIndex() != 0) {
            GeneticDataDomain dataDomain=candidateDataDomains.get(dataSetChooser.getSelectionIndex() - 1);
            addTablePerspectivesEvent.setEventSpace(dataDomain.getDataDomainID());
            tablePerspective=dataDomain.getDefaultTablePerspective();
            tablePerspective.setPrivate(false);
            addTablePerspectivesEvent.addTablePerspective(tablePerspective);
            GeneralManager.get().getEventPublisher().triggerEvent(addTablePerspectivesEvent);
            PathwayMappingEvent event=new PathwayMappingEvent(tablePerspective);
            event.setSender(this);
            GeneralManager.get().getEventPublisher().triggerEvent(event);
          }
 else {
            PathwayMappingEvent event=new PathwayMappingEvent();
            event.setSender(this);
            GeneralManager.get().getEventPublisher().triggerEvent(event);
          }
        }
      }
    }
  }
);
  return dataSetChooser;
}

Fixed version (ground truth):
@Override protected Control createControl(Composite parent){
  dataSetChooser=new Combo(parent,SWT.BORDER);
  dataSetChooser.setText("String_Node_Str");
  dataSetChooser.setToolTipText("String_Node_Str");
  GridData gd=new GridData(SWT.RIGHT,SWT.TOP,false,false);
  gd.widthHint=100;
  dataSetChooser.setLayoutData(gd);
  final List<GeneticDataDomain> candidateDataDomains=DataDomainManager.get().getDataDomainsByType(GeneticDataDomain.class);
  String[] datasetNames=new String[candidateDataDomains.size() + 1];
  datasetNames[0]="String_Node_Str";
  int selectionIndex=0;
  for (int datasetCount=1; datasetCount <= candidateDataDomains.size(); datasetCount++) {
    datasetNames[datasetCount]=candidateDataDomains.get(datasetCount - 1).getDataSetDescription().getDataSetName();
    if (candidateDataDomains.get(datasetCount - 1) == mappingDataDomain) {
      selectionIndex=datasetCount;
    }
  }
  dataSetChooser.setItems(datasetNames);
  dataSetChooser.select(selectionIndex);
  dataSetChooser.addSelectionListener(new SelectionAdapter(){
    @Override public void widgetSelected(    SelectionEvent e){
      AddTablePerspectivesEvent addTablePerspectivesEvent=new AddTablePerspectivesEvent();
      addTablePerspectivesEvent.setReceiver(pathwayView);
      TablePerspective tablePerspective=null;
      if (dataSetChooser.getSelectionIndex() != 0) {
        GeneticDataDomain dataDomain=candidateDataDomains.get(dataSetChooser.getSelectionIndex() - 1);
        addTablePerspectivesEvent.setEventSpace(dataDomain.getDataDomainID());
        tablePerspective=dataDomain.getDefaultTablePerspective();
        tablePerspective.setPrivate(false);
        addTablePerspectivesEvent.addTablePerspective(tablePerspective);
        GeneralManager.get().getEventPublisher().triggerEvent(addTablePerspectivesEvent);
        PathwayMappingEvent event=new PathwayMappingEvent(tablePerspective);
        event.setSender(this);
        event.to(pathwayView);
        GeneralManager.get().getEventPublisher().triggerEvent(event);
      }
 else {
        PathwayMappingEvent event=new PathwayMappingEvent();
        event.setSender(this);
        GeneralManager.get().getEventPublisher().triggerEvent(event);
      }
    }
  }
);
  return dataSetChooser;
}