Program: 139756
Project: 139756
Buggy source:
private void creatNewExpressLine(RegularExpression regularExpress){
  final Composite expressComp=new Composite(componentsComp,SWT.NONE);
  expressComp.setLayout(new GridLayout(10,false));
  final CCombo combo=new CCombo(expressComp,SWT.BORDER);
  combo.setEditable(false);
  combo.setItems(remainDBTypeList.toArray(new String[remainDBTypeList.size()]));
  final RegularExpression finalRegExpress=regularExpress;
  String language=regularExpress.getExpression().getLanguage();
  String body=regularExpress.getExpression().getBody();
  if (language == null) {
    combo.setText(remainDBTypeList.get(0));
  }
 else {
    combo.setText(PatternLanguageType.findNameByLanguage(language));
  }
  GridDataFactory.fillDefaults().span(2,1).grab(false,false).applyTo(combo);
  combo.addSelectionListener(new SelectionAdapter(){
    public void widgetSelected(    SelectionEvent e){
      String lang=combo.getText();
      finalRegExpress.getExpression().setLanguage(PatternLanguageType.findLanguageByName(lang));
      setDirty(true);
    }
  }
);
  final Text patternText=new Text(expressComp,SWT.BORDER);
  patternText.setText(body == null ? PluginConstant.EMPTY_STRING : body);
  GridDataFactory.fillDefaults().span(6,1).grab(true,false).applyTo(patternText);
  ((GridData)patternText.getLayoutData()).widthHint=600;
  patternText.addModifyListener(new ModifyListener(){
    public void modifyText(    ModifyEvent e){
      finalRegExpress.getExpression().setBody(patternText.getText());
      setDirty(true);
    }
  }
);
  Button delButton=new Button(expressComp,SWT.NONE);
  delButton.setImage(ImageLib.getImage(ImageLib.DELETE_ACTION));
  delButton.setToolTipText(DefaultMessagesImpl.getString("String_Node_Str"));
  GridDataFactory.fillDefaults().span(1,1).grab(false,false).applyTo(delButton);
  delButton.addSelectionListener(new SelectionAdapter(){
    public void widgetSelected(    SelectionEvent e){
      tempPatternComponents.remove(finalRegExpress);
      expressComp.dispose();
      patternDefinitionSectionComp.layout();
      form.reflow(true);
      setDirty(true);
    }
  }
);
  if (!ExpressionType.SQL_LIKE.getLiteral().equals(expressionType)) {
    Button testPatternButton=new Button(expressComp,SWT.NONE);
    testPatternButton.setText(DefaultMessagesImpl.getString("String_Node_Str"));
    testPatternButton.setToolTipText(DefaultMessagesImpl.getString("String_Node_Str"));
    GridDataFactory.fillDefaults().span(1,1).grab(false,false).applyTo(testPatternButton);
    testPatternButton.addSelectionListener(new SelectionAdapter(){
      public void widgetSelected(      SelectionEvent e){
        PatternTestView patternTestView=(PatternTestView)CorePlugin.getDefault().findView(PatternTestView.ID);
        patternTestView.setPatternExpression(PatternMasterDetailsPage.this,pattern,finalRegExpress);
      }
    }
);
  }
  GridDataFactory.fillDefaults().align(SWT.FILL,SWT.FILL).grab(true,false).applyTo(expressComp);
}

Fixed version (ground truth):
private void creatNewExpressLine(RegularExpression regularExpress){
  final Composite expressComp=new Composite(componentsComp,SWT.NONE);
  expressComp.setLayout(new GridLayout(10,false));
  final CCombo combo=new CCombo(expressComp,SWT.BORDER);
  combo.setEditable(false);
  combo.setItems(remainDBTypeList.toArray(new String[remainDBTypeList.size()]));
  final RegularExpression finalRegExpress=regularExpress;
  String language=regularExpress.getExpression().getLanguage();
  String body=regularExpress.getExpression().getBody();
  if (language == null) {
    combo.setText(remainDBTypeList.get(0));
  }
 else {
    combo.setText(PatternLanguageType.findNameByLanguage(language));
  }
  GridDataFactory.fillDefaults().span(2,1).grab(false,false).applyTo(combo);
  combo.addSelectionListener(new SelectionAdapter(){
    public void widgetSelected(    SelectionEvent e){
      String lang=combo.getText();
      finalRegExpress.getExpression().setLanguage(PatternLanguageType.findLanguageByName(lang));
      setDirty(true);
    }
  }
);
  final Text patternText=new Text(expressComp,SWT.BORDER);
  patternText.setText(body == null ? PluginConstant.EMPTY_STRING : body);
  GridDataFactory.fillDefaults().span(6,1).grab(true,true).applyTo(patternText);
  patternText.addModifyListener(new ModifyListener(){
    public void modifyText(    ModifyEvent e){
      finalRegExpress.getExpression().setBody(patternText.getText());
      setDirty(true);
    }
  }
);
  Button delButton=new Button(expressComp,SWT.NONE);
  delButton.setImage(ImageLib.getImage(ImageLib.DELETE_ACTION));
  delButton.setToolTipText(DefaultMessagesImpl.getString("String_Node_Str"));
  GridDataFactory.fillDefaults().span(1,1).grab(false,false).applyTo(delButton);
  delButton.addSelectionListener(new SelectionAdapter(){
    public void widgetSelected(    SelectionEvent e){
      tempPatternComponents.remove(finalRegExpress);
      expressComp.dispose();
      patternDefinitionSectionComp.layout();
      form.reflow(true);
      setDirty(true);
    }
  }
);
  if (!ExpressionType.SQL_LIKE.getLiteral().equals(expressionType)) {
    Button testPatternButton=new Button(expressComp,SWT.NONE);
    testPatternButton.setText(DefaultMessagesImpl.getString("String_Node_Str"));
    testPatternButton.setToolTipText(DefaultMessagesImpl.getString("String_Node_Str"));
    GridDataFactory.fillDefaults().span(1,1).grab(false,false).applyTo(testPatternButton);
    testPatternButton.addSelectionListener(new SelectionAdapter(){
      public void widgetSelected(      SelectionEvent e){
        PatternTestView patternTestView=(PatternTestView)CorePlugin.getDefault().findView(PatternTestView.ID);
        patternTestView.setPatternExpression(PatternMasterDetailsPage.this,pattern,finalRegExpress);
      }
    }
);
  }
  GridDataFactory.fillDefaults().align(SWT.FILL,SWT.FILL).grab(true,false).applyTo(expressComp);
}