Program: 138178
Project: 138178
Buggy source:
@Override public void createPartControl(final Composite parent){
  ScrolledComposite scrolledComposite=new ScrolledComposite(parent,SWT.V_SCROLL);
  scrolledComposite.setExpandHorizontal(true);
  scrolledComposite.setExpandVertical(true);
  Composite mainComposite=new Composite(scrolledComposite,SWT.NONE);
  scrolledComposite.setContent(mainComposite);
  BorderLayout blay=new BorderLayout();
  mainComposite.setLayout(blay);
  final Composite composite=new Composite(mainComposite,SWT.NONE);
  composite.setLayoutData(BorderLayout.NORTH);
  GridLayout layout=new GridLayout();
  layout.marginHeight=0;
  layout.marginWidth=0;
  composite.setLayout(layout);
  Composite coboCom=new Composite(composite,SWT.NONE);
  layout=new GridLayout();
  layout.numColumns=5;
  coboCom.setLayout(layout);
  GridData data=new GridData();
  data.horizontalAlignment=GridData.CENTER;
  coboCom.setLayoutData(data);
  buttonJava=new Button(coboCom,SWT.RADIO);
  buttonJava.setText(ExecutionLanguage.JAVA.getLiteral());
  data=new GridData();
  buttonJava.setLayoutData(data);
  buttonJava.addSelectionListener(new SelectionAdapter(){
    @Override public void widgetSelected(    SelectionEvent e){
      isJavaEngine=true;
      sqlButton.setEnabled(false);
      dbCombo.setEnabled(false);
      functionNameText.setEnabled(false);
    }
  }
);
  buttonSql=new Button(coboCom,SWT.RADIO);
  buttonSql.setText(DefaultMessagesImpl.getString("String_Node_Str"));
  buttonSql.addSelectionListener(new SelectionAdapter(){
    @Override public void widgetSelected(    SelectionEvent e){
      isJavaEngine=false;
      sqlButton.setEnabled(true);
      dbCombo.setEnabled(true);
      functionNameText.setEnabled(true);
    }
  }
);
  buttonSql.setSelection(true);
  buttonSql.setEnabled(!isJavaEngine);
  dbCombo=new CCombo(coboCom,SWT.DROP_DOWN | SWT.BORDER);
  dbCombo.setEditable(false);
  data=new GridData();
  data.widthHint=90;
  dbCombo.setLayoutData(data);
  functionLabel=new Label(coboCom,SWT.NONE);
  functionLabel.setText(DefaultMessagesImpl.getString("String_Node_Str"));
  functionNameText=new Text(coboCom,SWT.BORDER);
  functionNameText.setText(PluginConstant.EMPTY_STRING);
  GridData functionNameTextGD=new GridData(SWT.LEFT,SWT.CENTER,false,false,1,1);
  functionNameTextGD.widthHint=100;
  functionNameText.setLayoutData(functionNameTextGD);
  functionNameText.setVisible(false);
  functionLabel.setVisible(false);
  Composite imgCom=new Composite(composite,SWT.NONE);
  imgCom.setLayout(layout);
  data=new GridData();
  data.horizontalAlignment=GridData.END;
  imgCom.setLayoutData(data);
  emoticonLabel=new Label(imgCom,SWT.NONE);
  GridData gd=new GridData();
  gd.heightHint=18;
  gd.widthHint=18;
  emoticonLabel.setLayoutData(gd);
  gd=new GridData();
  gd.heightHint=18;
  gd.widthHint=65;
  resultLabel=new Label(imgCom,SWT.NONE);
  resultLabel.setLayoutData(gd);
  textAreaLabel=new Label(composite,SWT.NONE);
  textAreaLabel.setText(DefaultMessagesImpl.getString("String_Node_Str"));
  testText=new Text(composite,SWT.BORDER | SWT.MULTI | SWT.WRAP| SWT.V_SCROLL);
  data=new GridData(GridData.FILL_HORIZONTAL);
  data.heightHint=40;
  testText.setLayoutData(data);
  testText.setToolTipText(DefaultMessagesImpl.getString("String_Node_Str"));
  GridData textAreaLabelGD=new GridData(SWT.LEFT,SWT.CENTER,false,false,1,1);
  textAreaLabel.setLayoutData(textAreaLabelGD);
  regularLabel=new Label(composite,SWT.NONE);
  regularLabel.setText(DefaultMessagesImpl.getString("String_Node_Str"));
  regularLabel.setToolTipText(DefaultMessagesImpl.getString("String_Node_Str"));
  GridData regularLabelGD=new GridData(SWT.LEFT,SWT.CENTER,false,false,1,1);
  regularLabelGD.widthHint=160;
  regularLabel.setLayoutData(regularLabelGD);
  this.regularText=new Text(composite,SWT.BORDER | SWT.MULTI | SWT.WRAP| SWT.V_SCROLL);
  this.regularText.setLayoutData(data);
  regularText.setToolTipText(DefaultMessagesImpl.getString("String_Node_Str"));
  regularText.addModifyListener(new ModifyListener(){
    public void modifyText(    ModifyEvent e){
      boolean enabled=(!regularText.getText().equals(PluginConstant.EMPTY_STRING)) && (CheckValueUtils.isPatternValue(regularText.getText()));
      if (pattern != null) {
        saveButton.setEnabled(enabled);
      }
      createPatternButton.setEnabled(enabled);
    }
  }
);
  BorderLayout blayout=new BorderLayout();
  Composite bottom=new Composite(mainComposite,SWT.NONE);
  bottom.setLayout(blayout);
  bottom.setLayoutData(BorderLayout.CENTER);
  Composite centerPane=new Composite(bottom,SWT.NONE);
  centerPane.setLayoutData(BorderLayout.CENTER);
  final Composite rightPane=new Composite(bottom,SWT.NONE);
  rightPane.setLayoutData(BorderLayout.EAST);
  GridLayout llayout=new GridLayout();
  llayout.numColumns=3;
  centerPane.setLayout(llayout);
  GridLayout rlayout=new GridLayout();
  rlayout.numColumns=1;
  rightPane.setLayout(rlayout);
  data=new GridData();
  data.heightHint=25;
  data.widthHint=92;
  sqlButton=new Button(centerPane,SWT.PUSH);
  sqlButton.setText(DefaultMessagesImpl.getString("String_Node_Str"));
  sqlButton.setToolTipText(DefaultMessagesImpl.getString("String_Node_Str"));
  sqlButton.setLayoutData(data);
  sqlButton.addSelectionListener(new SelectionAdapter(){
    public void widgetSelected(    SelectionEvent e){
      openSQLEditor();
    }
  }
);
  createPatternButton=new Button(centerPane,SWT.PUSH);
  createPatternButton.setText(DefaultMessagesImpl.getString("String_Node_Str"));
  createPatternButton.setToolTipText(DefaultMessagesImpl.getString("String_Node_Str"));
  data=new GridData();
  data.heightHint=25;
  data.widthHint=92;
  createPatternButton.setLayoutData(data);
  createPatternButton.addSelectionListener(new SelectionAdapter(){
    public void widgetSelected(    SelectionEvent e){
      String language=null;
      if (regularExpression != null) {
        language=regularExpression.getExpression().getLanguage();
      }
 else {
        DbmsLanguage dbmsLanguage=getDbmsLanguage();
        if (dbmsLanguage != null) {
          dbmsLanguage.setFunctionName(getFunctionName());
          language=dbmsLanguage.getDbmsName();
        }
      }
      new CreatePatternAction(ResourceManager.getPatternFolder(),ExpressionType.REGEXP,regularText.getText(),language).run();
    }
  }
);
  createPatternButton.setEnabled(false);
  saveButton=new Button(centerPane,SWT.PUSH);
  saveButton.setText(DefaultMessagesImpl.getString("String_Node_Str"));
  saveButton.setEnabled(false);
  saveButton.setToolTipText(DefaultMessagesImpl.getString("String_Node_Str"));
  data=new GridData();
  data.heightHint=25;
  data.widthHint=92;
  saveButton.setLayoutData(data);
  saveButton.addSelectionListener(new SelectionAdapter(){
    public void widgetSelected(    SelectionEvent e){
      savePattern();
    }
  }
);
  testButton=new Button(rightPane,SWT.PUSH);
  testButton.setText(DefaultMessagesImpl.getString("String_Node_Str"));
  testButton.setToolTipText(DefaultMessagesImpl.getString("String_Node_Str"));
  testButton.setLayoutData(data);
  testButton.addSelectionListener(new SelectionAdapter(){
    public void widgetSelected(    SelectionEvent e){
      testRegularText();
    }
  }
);
  scrolledComposite.setMinSize(mainComposite.computeSize(SWT.DEFAULT,SWT.DEFAULT));
  mainComposite.layout();
  activateContext();
  fillComboData();
}

Fixed version (ground truth):
@Override public void createPartControl(final Composite parent){
  ScrolledComposite scrolledComposite=new ScrolledComposite(parent,SWT.V_SCROLL);
  scrolledComposite.setExpandHorizontal(true);
  scrolledComposite.setExpandVertical(true);
  Composite mainComposite=new Composite(scrolledComposite,SWT.NONE);
  scrolledComposite.setContent(mainComposite);
  BorderLayout blay=new BorderLayout();
  mainComposite.setLayout(blay);
  final Composite composite=new Composite(mainComposite,SWT.NONE);
  composite.setLayoutData(BorderLayout.NORTH);
  GridLayout layout=new GridLayout();
  layout.marginHeight=0;
  layout.marginWidth=0;
  composite.setLayout(layout);
  Composite coboCom=new Composite(composite,SWT.NONE);
  layout=new GridLayout();
  layout.numColumns=5;
  coboCom.setLayout(layout);
  GridData data=new GridData();
  data.horizontalAlignment=GridData.CENTER;
  coboCom.setLayoutData(data);
  buttonJava=new Button(coboCom,SWT.RADIO);
  buttonJava.setText(ExecutionLanguage.JAVA.getLiteral());
  data=new GridData();
  buttonJava.setLayoutData(data);
  buttonJava.addSelectionListener(new SelectionAdapter(){
    @Override public void widgetSelected(    SelectionEvent e){
      isJavaEngine=true;
      sqlButton.setEnabled(false);
      dbCombo.setEnabled(false);
      functionNameText.setEnabled(false);
    }
  }
);
  buttonSql=new Button(coboCom,SWT.RADIO);
  buttonSql.setText(DefaultMessagesImpl.getString("String_Node_Str"));
  buttonSql.addSelectionListener(new SelectionAdapter(){
    @Override public void widgetSelected(    SelectionEvent e){
      isJavaEngine=false;
      sqlButton.setEnabled(true);
      dbCombo.setEnabled(true);
      functionNameText.setEnabled(true);
    }
  }
);
  buttonSql.setSelection(true);
  buttonSql.setEnabled(!isJavaEngine);
  dbCombo=new CCombo(coboCom,SWT.DROP_DOWN | SWT.BORDER);
  dbCombo.setEditable(false);
  data=new GridData();
  data.widthHint=90;
  dbCombo.setLayoutData(data);
  functionLabel=new Label(coboCom,SWT.NONE);
  functionLabel.setText(DefaultMessagesImpl.getString("String_Node_Str"));
  functionNameText=new Text(coboCom,SWT.BORDER);
  functionNameText.setText(PluginConstant.EMPTY_STRING);
  GridData functionNameTextGD=new GridData(SWT.LEFT,SWT.CENTER,false,false,1,1);
  functionNameTextGD.widthHint=100;
  functionNameText.setLayoutData(functionNameTextGD);
  functionNameText.setVisible(false);
  functionLabel.setVisible(false);
  Composite imgCom=new Composite(composite,SWT.NONE);
  layout=new GridLayout();
  layout.numColumns=2;
  layout.marginRight=50;
  imgCom.setLayout(layout);
  data=new GridData();
  data.horizontalAlignment=GridData.END;
  imgCom.setLayoutData(data);
  emoticonLabel=new Label(imgCom,SWT.NONE);
  GridData gd=new GridData();
  gd.heightHint=18;
  gd.widthHint=18;
  emoticonLabel.setLayoutData(gd);
  gd=new GridData();
  gd.heightHint=18;
  gd.widthHint=65;
  resultLabel=new Label(imgCom,SWT.NONE);
  resultLabel.setLayoutData(gd);
  textAreaLabel=new Label(composite,SWT.NONE);
  textAreaLabel.setText(DefaultMessagesImpl.getString("String_Node_Str"));
  testText=new Text(composite,SWT.BORDER | SWT.MULTI | SWT.WRAP| SWT.V_SCROLL);
  data=new GridData(GridData.FILL_HORIZONTAL);
  data.heightHint=40;
  testText.setLayoutData(data);
  testText.setToolTipText(DefaultMessagesImpl.getString("String_Node_Str"));
  GridData textAreaLabelGD=new GridData(SWT.LEFT,SWT.CENTER,false,false,1,1);
  textAreaLabel.setLayoutData(textAreaLabelGD);
  regularLabel=new Label(composite,SWT.NONE);
  regularLabel.setText(DefaultMessagesImpl.getString("String_Node_Str"));
  regularLabel.setToolTipText(DefaultMessagesImpl.getString("String_Node_Str"));
  GridData regularLabelGD=new GridData(SWT.LEFT,SWT.CENTER,false,false,1,1);
  regularLabelGD.widthHint=160;
  regularLabel.setLayoutData(regularLabelGD);
  this.regularText=new Text(composite,SWT.BORDER | SWT.MULTI | SWT.WRAP| SWT.V_SCROLL);
  this.regularText.setLayoutData(data);
  regularText.setToolTipText(DefaultMessagesImpl.getString("String_Node_Str"));
  regularText.addModifyListener(new ModifyListener(){
    public void modifyText(    ModifyEvent e){
      boolean enabled=(!regularText.getText().equals(PluginConstant.EMPTY_STRING)) && (CheckValueUtils.isPatternValue(regularText.getText()));
      if (pattern != null) {
        saveButton.setEnabled(enabled);
      }
      createPatternButton.setEnabled(enabled);
    }
  }
);
  BorderLayout blayout=new BorderLayout();
  Composite bottom=new Composite(mainComposite,SWT.NONE);
  bottom.setLayout(blayout);
  bottom.setLayoutData(BorderLayout.CENTER);
  Composite centerPane=new Composite(bottom,SWT.NONE);
  centerPane.setLayoutData(BorderLayout.CENTER);
  final Composite rightPane=new Composite(bottom,SWT.NONE);
  rightPane.setLayoutData(BorderLayout.EAST);
  GridLayout llayout=new GridLayout();
  llayout.numColumns=3;
  centerPane.setLayout(llayout);
  GridLayout rlayout=new GridLayout();
  rlayout.numColumns=1;
  rightPane.setLayout(rlayout);
  data=new GridData();
  data.heightHint=25;
  data.widthHint=92;
  sqlButton=new Button(centerPane,SWT.PUSH);
  sqlButton.setText(DefaultMessagesImpl.getString("String_Node_Str"));
  sqlButton.setToolTipText(DefaultMessagesImpl.getString("String_Node_Str"));
  sqlButton.setLayoutData(data);
  sqlButton.addSelectionListener(new SelectionAdapter(){
    public void widgetSelected(    SelectionEvent e){
      openSQLEditor();
    }
  }
);
  createPatternButton=new Button(centerPane,SWT.PUSH);
  createPatternButton.setText(DefaultMessagesImpl.getString("String_Node_Str"));
  createPatternButton.setToolTipText(DefaultMessagesImpl.getString("String_Node_Str"));
  data=new GridData();
  data.heightHint=25;
  data.widthHint=92;
  createPatternButton.setLayoutData(data);
  createPatternButton.addSelectionListener(new SelectionAdapter(){
    public void widgetSelected(    SelectionEvent e){
      String language=null;
      if (regularExpression != null) {
        language=regularExpression.getExpression().getLanguage();
      }
 else {
        DbmsLanguage dbmsLanguage=getDbmsLanguage();
        if (dbmsLanguage != null) {
          dbmsLanguage.setFunctionName(getFunctionName());
          language=dbmsLanguage.getDbmsName();
        }
      }
      new CreatePatternAction(ResourceManager.getPatternFolder(),ExpressionType.REGEXP,regularText.getText(),language).run();
    }
  }
);
  createPatternButton.setEnabled(false);
  saveButton=new Button(centerPane,SWT.PUSH);
  saveButton.setText(DefaultMessagesImpl.getString("String_Node_Str"));
  saveButton.setEnabled(false);
  saveButton.setToolTipText(DefaultMessagesImpl.getString("String_Node_Str"));
  data=new GridData();
  data.heightHint=25;
  data.widthHint=92;
  saveButton.setLayoutData(data);
  saveButton.addSelectionListener(new SelectionAdapter(){
    public void widgetSelected(    SelectionEvent e){
      savePattern();
    }
  }
);
  testButton=new Button(rightPane,SWT.PUSH);
  testButton.setText(DefaultMessagesImpl.getString("String_Node_Str"));
  testButton.setToolTipText(DefaultMessagesImpl.getString("String_Node_Str"));
  testButton.setLayoutData(data);
  testButton.addSelectionListener(new SelectionAdapter(){
    public void widgetSelected(    SelectionEvent e){
      testRegularText();
    }
  }
);
  scrolledComposite.setMinSize(mainComposite.computeSize(SWT.DEFAULT,SWT.DEFAULT));
  mainComposite.layout();
  activateContext();
  fillComboData();
}