Program: 58514
Project: 58514
Buggy source:
public void createControl(Composite parent){
  parentWizard=(Wizard)this.getWizard();
  Composite composite=new Composite(parent,SWT.NONE);
  composite.setLayout(new FillLayout(SWT.VERTICAL));
  final TabFolder tabFolder=new TabFolder(composite,SWT.BORDER);
  createSampleTab(tabFolder);
  createGeneticUseCaseTab(tabFolder);
  createGeneralDataUseCaseTab(tabFolder);
  createLoadProjectTab(tabFolder);
  if (!GeneralManager.IS_IN_RELEASE_MODE)   createCollaborationClientTab(tabFolder);
  EApplicationMode previousApplicationMode=EApplicationMode.valueOf(GeneralManager.get().getPreferenceStore().getString(PreferenceConstants.LAST_CHOSEN_APPLICATION_MODE));
  if (previousApplicationMode == null || previousApplicationMode.equals(EApplicationMode.SAMPLE_PROJECT)) {
    tabFolder.setSelection(0);
    projectMode=EApplicationMode.SAMPLE_PROJECT;
  }
 else   if (previousApplicationMode.equals(EApplicationMode.GENE_EXPRESSION_SAMPLE_DATA)) {
    tabFolder.setSelection(0);
    projectMode=EApplicationMode.GENE_EXPRESSION_SAMPLE_DATA;
  }
 else   if (previousApplicationMode.equals(EApplicationMode.GENE_EXPRESSION_NEW_DATA)) {
    tabFolder.setSelection(1);
    projectMode=EApplicationMode.GENE_EXPRESSION_NEW_DATA;
  }
 else   if (previousApplicationMode.equals(EApplicationMode.UNSPECIFIED_NEW_DATA)) {
    tabFolder.setSelection(2);
    projectMode=EApplicationMode.UNSPECIFIED_NEW_DATA;
  }
 else   if (previousApplicationMode.equals(EApplicationMode.LOAD_PROJECT)) {
    projectMode=EApplicationMode.LOAD_PROJECT;
    tabFolder.setSelection(3);
  }
 else   if (previousApplicationMode.equals(EApplicationMode.COLLABORATION_CLIENT)) {
    if (GeneralManager.IS_IN_RELEASE_MODE) {
      tabFolder.setSelection(0);
      projectMode=EApplicationMode.SAMPLE_PROJECT;
    }
 else {
      projectMode=EApplicationMode.COLLABORATION_CLIENT;
      tabFolder.setSelection(4);
    }
  }
  tabFolder.addSelectionListener(new SelectionAdapter(){
    @Override public void widgetSelected(    SelectionEvent e){
      if (((TabItem)e.item) == generalDataUseCaseTab) {
        projectMode=EApplicationMode.UNSPECIFIED_NEW_DATA;
      }
 else       if (((TabItem)e.item) == sampleTab) {
        projectMode=EApplicationMode.SAMPLE_PROJECT;
      }
 else       if (((TabItem)e.item) == geneticDataUseCaseTab) {
        projectMode=EApplicationMode.GENE_EXPRESSION_NEW_DATA;
      }
 else       if (((TabItem)e.item) == loadProjectTab) {
        projectMode=EApplicationMode.LOAD_PROJECT;
      }
 else       if (((TabItem)e.item) == collaborationClientTab) {
        projectMode=EApplicationMode.COLLABORATION_CLIENT;
      }
 else       throw new IllegalStateException("String_Node_Str");
    }
  }
);
  tabFolder.pack();
  setControl(composite);
  composite.pack();
}

Fixed version (ground truth):
public void createControl(Composite parent){
  parentWizard=(Wizard)this.getWizard();
  Composite composite=new Composite(parent,SWT.NONE);
  composite.setLayout(new FillLayout(SWT.VERTICAL));
  final TabFolder tabFolder=new TabFolder(composite,SWT.BORDER);
  projectMode=EApplicationMode.valueOf(GeneralManager.get().getPreferenceStore().getString(PreferenceConstants.LAST_CHOSEN_APPLICATION_MODE));
  createSampleTab(tabFolder);
  createGeneticUseCaseTab(tabFolder);
  createGeneralDataUseCaseTab(tabFolder);
  createLoadProjectTab(tabFolder);
  if (!GeneralManager.IS_IN_RELEASE_MODE)   createCollaborationClientTab(tabFolder);
  if (projectMode == null || projectMode.equals(EApplicationMode.SAMPLE_PROJECT)) {
    tabFolder.setSelection(0);
  }
 else   if (projectMode.equals(EApplicationMode.GENE_EXPRESSION_SAMPLE_DATA)) {
    tabFolder.setSelection(0);
  }
 else   if (projectMode.equals(EApplicationMode.GENE_EXPRESSION_NEW_DATA)) {
    tabFolder.setSelection(1);
  }
 else   if (projectMode.equals(EApplicationMode.UNSPECIFIED_NEW_DATA)) {
    tabFolder.setSelection(2);
  }
 else   if (projectMode.equals(EApplicationMode.LOAD_PROJECT)) {
    tabFolder.setSelection(3);
  }
 else   if (projectMode.equals(EApplicationMode.COLLABORATION_CLIENT)) {
    if (GeneralManager.IS_IN_RELEASE_MODE) {
      tabFolder.setSelection(0);
      projectMode=EApplicationMode.SAMPLE_PROJECT;
    }
 else {
      tabFolder.setSelection(4);
    }
  }
  tabFolder.addSelectionListener(new SelectionAdapter(){
    @Override public void widgetSelected(    SelectionEvent e){
      if (((TabItem)e.item) == generalDataUseCaseTab) {
        projectMode=EApplicationMode.UNSPECIFIED_NEW_DATA;
      }
 else       if (((TabItem)e.item) == sampleTab) {
        if (btnSampleProject.getSelection())         projectMode=EApplicationMode.SAMPLE_PROJECT;
 else         projectMode=EApplicationMode.GENE_EXPRESSION_SAMPLE_DATA;
      }
 else       if (((TabItem)e.item) == geneticDataUseCaseTab) {
        projectMode=EApplicationMode.GENE_EXPRESSION_NEW_DATA;
      }
 else       if (((TabItem)e.item) == loadProjectTab) {
        projectMode=EApplicationMode.LOAD_PROJECT;
      }
 else       if (((TabItem)e.item) == collaborationClientTab) {
        projectMode=EApplicationMode.COLLABORATION_CLIENT;
      }
 else       throw new IllegalStateException("String_Node_Str");
    }
  }
);
  tabFolder.pack();
  setControl(composite);
  composite.pack();
}