Program: 137717
Project: 137717
Buggy source:
/** 
 * create Dialog Area For UDI.
 * @param parent
 * @return
 */
public Control createDialogAreaForUDI(Composite parent){
  final Composite comp=(Composite)super.createDialogArea(parent);
  GridData data=new GridData(SWT.FILL,SWT.FILL,true,true);
  data.widthHint=750;
  data.heightHint=650;
  comp.setLayoutData(data);
  PlatformUI.getWorkbench().getHelpSystem().setHelp(comp,HelpPlugin.getDefault().getExpressionEditContextID());
  final TabFolder tabFolder=new TabFolder(comp,SWT.FILL);
  GridData gridData=new GridData(GridData.FILL_BOTH);
  gridData.widthHint=convertWidthInCharsToPixels(200);
  gridData.heightHint=convertHeightInCharsToPixels(300);
  tabFolder.setLayoutData(gridData);
  TabItem tab0=new TabItem(tabFolder,SWT.NULL);
  tab0.setText(tab0_name);
  tab0Composite=new Composite(tabFolder,SWT.None);
  tab0Composite.setLayout(new GridLayout());
  tab0.setControl(tab0Composite);
  selectTabNumber=0;
  createTabPart(tab0Composite);
  TabItem tab1=new TabItem(tabFolder,SWT.NULL);
  tab1.setText(tab1_name);
  tab1Composite=new Composite(tabFolder,SWT.None);
  tab1Composite.setLayout(new GridLayout());
  tab1.setControl(tab1Composite);
  selectTabNumber=1;
  createTabPart(tab1Composite);
  if (IndicatorCategoryHelper.isUserDefMatching(category)) {
    TabItem tab3=new TabItem(tabFolder,SWT.NULL);
    tab3.setText(tab3_name);
    tab3Composite=new Composite(tabFolder,SWT.None);
    tab3Composite.setLayout(new GridLayout());
    tab3.setControl(tab3Composite);
    selectTabNumber=2;
    createTabPart(tab3Composite);
    TabItem tab4=new TabItem(tabFolder,SWT.NULL);
    tab4.setText(tab4_name);
    tab4Composite=new Composite(tabFolder,SWT.None);
    tab4Composite.setLayout(new GridLayout());
    tab4.setControl(tab4Composite);
    selectTabNumber=3;
    createTabPart(tab4Composite);
    TabItem tab5=new TabItem(tabFolder,SWT.NULL);
    tab5.setText(tab5_name);
    tab5Composite=new Composite(tabFolder,SWT.None);
    tab5Composite.setLayout(new GridLayout());
    tab5.setControl(tab5Composite);
    selectTabNumber=4;
    createTabPart(tab5Composite);
    TabItem tab6=new TabItem(tabFolder,SWT.NULL);
    tab6.setText(tab6_name);
    tab6Composite=new Composite(tabFolder,SWT.None);
    tab6Composite.setLayout(new GridLayout());
    tab6.setControl(tab6Composite);
    selectTabNumber=5;
    createTabPart(tab6Composite);
  }
 else {
    TabItem tab2=new TabItem(tabFolder,SWT.NULL);
    tab2.setText(tab2_name);
    tab2Composite=new Composite(tabFolder,SWT.None);
    tab2Composite.setLayout(new GridLayout());
    tab2.setControl(tab2Composite);
    selectTabNumber=2;
    createTabPart(tab2Composite);
  }
  tabFolder.addSelectionListener(new SelectionListener(){
    public void widgetSelected(    SelectionEvent e){
      String text=((TabItem)e.item).getText();
      selectTabNumber=tabFolder.getSelectionIndex();
      if (tab0_name.equals(text)) {
        tab0Composite.layout();
      }
 else {
        if (tab1_name.equals(text)) {
          if (useAutoGenQueryFlag && canBeOverwriten_tab1) {
            tab1_fullSql.setText(getAutoGeneratedQuery());
            useAutoGenQueryFlag=true;
            canBeOverwriten_tab1=true;
          }
          tab1Composite.layout();
        }
 else         if (tab2_name.equals(text)) {
          if (useAutoGenQueryFlag && canBeOverwriten_tab2_viewRows) {
            tab2_viewRows.setText(getAutoGeneratedQuery());
            useAutoGenQueryFlag=true;
            canBeOverwriten_tab2_viewRows=true;
          }
          tab2Composite.layout();
        }
 else         if (tab3_name.equals(text)) {
          if (useAutoGenQueryFlag && canBeOverwriten_tab2_match) {
            tab2_match_viewvalidRows.setText(getAutoGeneratedQuery());
            useAutoGenQueryFlag=true;
            canBeOverwriten_tab2_match=true;
          }
          tab3Composite.layout();
        }
 else         if (tab4_name.equals(text)) {
          if (useAutoGenQueryFlag && canBeOverwriten_tab3_match) {
            tab3_match_viewInvalidRows.setText(getAutoGeneratedQuery());
            useAutoGenQueryFlag=true;
            canBeOverwriten_tab3_match=true;
          }
          tab4Composite.layout();
        }
 else         if (tab5_name.equals(text)) {
          if (useAutoGenQueryFlag && canBeOverwriten_tab4_match) {
            tab4_match_viewValidValues.setText(getAutoGeneratedQuery());
            useAutoGenQueryFlag=true;
            canBeOverwriten_tab4_match=true;
          }
          tab5Composite.layout();
        }
 else         if (tab6_name.equals(text)) {
          if (useAutoGenQueryFlag && canBeOverwriten_tab5_match) {
            tab5_match_viewInvalidValues.setText(getAutoGeneratedQuery());
            useAutoGenQueryFlag=true;
            canBeOverwriten_tab5_match=true;
          }
          tab6Composite.layout();
        }
        if (selectTabNumber == 1) {
          resetButton_tab1.setEnabled(!getAutoGeneratedQuery().equals(tab1_fullSql.getText()));
        }
 else         if (selectTabNumber == 2) {
          if (IndicatorCategoryHelper.isUserDefMatching(category)) {
            resetButton_tab2_match.setEnabled(!getAutoGeneratedQuery().equals(tab2_match_viewvalidRows.getText()));
          }
 else {
            resetButton_tab2_viewRows.setEnabled(!getAutoGeneratedQuery().equals(tab2_viewRows.getText()));
          }
        }
 else         if (selectTabNumber == 3) {
          resetButton_tab3_match.setEnabled(!getAutoGeneratedQuery().equals(tab3_match_viewInvalidRows.getText()));
        }
 else         if (selectTabNumber == 4) {
          resetButton_tab4_match.setEnabled(!getAutoGeneratedQuery().equals(tab4_match_viewValidValues.getText()));
        }
 else         if (selectTabNumber == 5) {
          resetButton_tab5_match.setEnabled(!getAutoGeneratedQuery().equals(tab5_match_viewInvalidValues.getText()));
        }
      }
    }
    public void widgetDefaultSelected(    SelectionEvent e){
      widgetSelected(e);
    }
  }
);
  if (fullSqlContent == null || fullSqlContent.equals("String_Node_Str")) {
    selectTabNumber=0;
    tabFolder.setSelection(selectTabNumber);
    tab0Composite.layout();
  }
 else {
    selectTabNumber=1;
    tabFolder.setSelection(selectTabNumber);
    tab1Composite.layout();
    canBeOverwriten_tab1=getAutoGeneratedQuery().equals(tab1_fullSql.getText());
    resetButton_tab1.setEnabled(!canBeOverwriten_tab1);
  }
  comp.layout();
  return comp;
}

Fixed version (ground truth):
/** 
 * create Dialog Area For UDI.
 * @param parent
 * @return
 */
public Control createDialogAreaForUDI(Composite parent){
  final Composite comp=(Composite)super.createDialogArea(parent);
  GridData data=new GridData(SWT.FILL,SWT.FILL,true,true);
  data.widthHint=750;
  data.heightHint=650;
  comp.setLayoutData(data);
  PlatformUI.getWorkbench().getHelpSystem().setHelp(comp,HelpPlugin.getDefault().getExpressionEditContextID());
  final TabFolder tabFolder=new TabFolder(comp,SWT.FILL);
  GridData gridData=new GridData(GridData.FILL_BOTH);
  gridData.widthHint=convertWidthInCharsToPixels(200);
  gridData.heightHint=convertHeightInCharsToPixels(300);
  tabFolder.setLayoutData(gridData);
  TabItem tab0=new TabItem(tabFolder,SWT.NULL);
  tab0.setText(tab0_name);
  tab0Composite=new Composite(tabFolder,SWT.None);
  tab0Composite.setLayout(new GridLayout());
  tab0.setControl(tab0Composite);
  selectTabNumber=0;
  createTabPart(tab0Composite);
  TabItem tab1=new TabItem(tabFolder,SWT.NULL);
  tab1.setText(tab1_name);
  tab1Composite=new Composite(tabFolder,SWT.None);
  tab1Composite.setLayout(new GridLayout());
  tab1.setControl(tab1Composite);
  selectTabNumber=1;
  createTabPart(tab1Composite);
  if (IndicatorCategoryHelper.isUserDefMatching(category)) {
    TabItem tab3=new TabItem(tabFolder,SWT.NULL);
    tab3.setText(tab3_name);
    tab3Composite=new Composite(tabFolder,SWT.None);
    tab3Composite.setLayout(new GridLayout());
    tab3.setControl(tab3Composite);
    selectTabNumber=2;
    createTabPart(tab3Composite);
    TabItem tab4=new TabItem(tabFolder,SWT.NULL);
    tab4.setText(tab4_name);
    tab4Composite=new Composite(tabFolder,SWT.None);
    tab4Composite.setLayout(new GridLayout());
    tab4.setControl(tab4Composite);
    selectTabNumber=3;
    createTabPart(tab4Composite);
    TabItem tab5=new TabItem(tabFolder,SWT.NULL);
    tab5.setText(tab5_name);
    tab5Composite=new Composite(tabFolder,SWT.None);
    tab5Composite.setLayout(new GridLayout());
    tab5.setControl(tab5Composite);
    selectTabNumber=4;
    createTabPart(tab5Composite);
    TabItem tab6=new TabItem(tabFolder,SWT.NULL);
    tab6.setText(tab6_name);
    tab6Composite=new Composite(tabFolder,SWT.None);
    tab6Composite.setLayout(new GridLayout());
    tab6.setControl(tab6Composite);
    selectTabNumber=5;
    createTabPart(tab6Composite);
  }
 else {
    TabItem tab2=new TabItem(tabFolder,SWT.NULL);
    tab2.setText(tab2_name);
    tab2Composite=new Composite(tabFolder,SWT.None);
    tab2Composite.setLayout(new GridLayout());
    tab2.setControl(tab2Composite);
    selectTabNumber=2;
    createTabPart(tab2Composite);
  }
  tabFolder.addSelectionListener(new SelectionListener(){
    public void widgetSelected(    SelectionEvent e){
      String text=((TabItem)e.item).getText();
      selectTabNumber=tabFolder.getSelectionIndex();
      if (tab0_name.equals(text)) {
        tab0Composite.layout();
      }
 else {
        if (tab1_name.equals(text)) {
          tab1Composite.layout();
        }
 else         if (tab2_name.equals(text)) {
          tab2Composite.layout();
        }
 else         if (tab3_name.equals(text)) {
          tab3Composite.layout();
        }
 else         if (tab4_name.equals(text)) {
          tab4Composite.layout();
        }
 else         if (tab5_name.equals(text)) {
          tab5Composite.layout();
        }
 else         if (tab6_name.equals(text)) {
          tab6Composite.layout();
        }
        if (selectTabNumber == 1) {
          resetButton_tab1.setEnabled(!getAutoGeneratedQuery().equals(tab1_fullSql.getText()));
        }
 else         if (selectTabNumber == 2) {
          if (IndicatorCategoryHelper.isUserDefMatching(category)) {
            resetButton_tab2_match.setEnabled(!getAutoGeneratedQuery().equals(tab2_match_viewvalidRows.getText()));
          }
 else {
            resetButton_tab2_viewRows.setEnabled(!getAutoGeneratedQuery().equals(tab2_viewRows.getText()));
          }
        }
 else         if (selectTabNumber == 3) {
          resetButton_tab3_match.setEnabled(!getAutoGeneratedQuery().equals(tab3_match_viewInvalidRows.getText()));
        }
 else         if (selectTabNumber == 4) {
          resetButton_tab4_match.setEnabled(!getAutoGeneratedQuery().equals(tab4_match_viewValidValues.getText()));
        }
 else         if (selectTabNumber == 5) {
          resetButton_tab5_match.setEnabled(!getAutoGeneratedQuery().equals(tab5_match_viewInvalidValues.getText()));
        }
      }
    }
    public void widgetDefaultSelected(    SelectionEvent e){
      widgetSelected(e);
    }
  }
);
  if (fullSqlContent == null || fullSqlContent.equals("String_Node_Str")) {
    selectTabNumber=0;
    tabFolder.setSelection(selectTabNumber);
    tab0Composite.layout();
  }
 else {
    selectTabNumber=1;
    tabFolder.setSelection(selectTabNumber);
    tab1Composite.layout();
    canBeOverwriten_tab1=getAutoGeneratedQuery().equals(tab1_fullSql.getText());
    resetButton_tab1.setEnabled(!canBeOverwriten_tab1);
  }
  comp.layout();
  return comp;
}