Program: 128522
Project: 128522
Buggy source:
@Override protected void addFields(){
  int leftCompositeWidth=125;
  int rightCompositeWidth=WIDTH_GRIDDATA_PIXEL - leftCompositeWidth;
  int headerCompositeHeight=80;
  int tableSettingsCompositeHeight=15;
  int tableCompositeHeight=200;
  int height=headerCompositeHeight + tableSettingsCompositeHeight + tableCompositeHeight;
  Composite mainComposite=Form.startNewDimensionnedGridLayout(this,2,WIDTH_GRIDDATA_PIXEL,height);
  mainComposite.setLayout(new GridLayout(2,false));
  GridData gridData=new GridData(GridData.FILL_BOTH);
  mainComposite.setLayoutData(gridData);
  SashForm sash=new SashForm(mainComposite,SWT.NONE);
  GridData sashData=new GridData(GridData.FILL_BOTH);
  sash.setLayoutData(sashData);
  Composite leftComposite=Form.startNewDimensionnedGridLayout(sash,1,leftCompositeWidth,height);
  Composite rightComposite=Form.startNewDimensionnedGridLayout(sash,1,rightCompositeWidth,height);
  sash.setWeights(new int[]{1,4});
  addTreeNavigator(leftComposite,leftCompositeWidth,height);
  gridData=new GridData(SWT.FILL,SWT.BOTTOM,true,false);
  gridData.widthHint=rightCompositeWidth;
  gridData.horizontalSpan=4;
  Composite composite1=Form.startNewDimensionnedGridLayout(rightComposite,4,SWT.DEFAULT,SWT.DEFAULT,false);
  ((GridData)composite1.getLayoutData()).verticalAlignment=GridData.VERTICAL_ALIGN_CENTER;
  nameText=new LabelledText(composite1,Messages.getString("String_Node_Str"),3);
  commentText=new LabelledText(composite1,Messages.getString("String_Node_Str"),3);
  typeText=new Label(composite1,SWT.NONE);
  typeText.setLayoutData(gridData);
  GridData gridData1=new GridData(GridData.FILL_HORIZONTAL);
  gridData1.horizontalSpan=4;
  Composite container=Form.startNewGridLayout(composite1,4,false,SWT.CENTER,SWT.TOP);
  container.setLayoutData(gridData1);
  tableCombo=new LabelledCombo(container,Messages.getString("String_Node_Str"),Messages.getString("String_Node_Str"),itemTableName != null ? itemTableName.toArray(new String[0]) : null,1,true,SWT.NONE);
  tableCombo.setEnabled(false);
  button=new Button(container,SWT.PUSH);
  button.setImage(ImageProvider.getImage(EImage.REFRESH_ICON));
  button.setToolTipText(Messages.getString("String_Node_Str"));
  Composite compositeRetreiveSchemaButton=Form.startNewGridLayout(container,3,false,SWT.CENTER,SWT.TOP);
  GC gc=new GC(compositeRetreiveSchemaButton);
  String displayStr=Messages.getString("String_Node_Str");
  Point buttonSize=gc.stringExtent(displayStr);
  retreiveSchemaButton=new UtilsButton(compositeRetreiveSchemaButton,displayStr,buttonSize.x + 12,HEIGHT_BUTTON_PIXEL);
  retreiveSchemaButton.setToolTipText(RETRIEVE_SCHEMA_TOOLTIP);
  tableSettingsInfoLabel=new Label(composite1,SWT.NONE);
  tableSettingsInfoLabel.setLayoutData(gridData);
  displayStr=Messages.getString("String_Node_Str");
  buttonSize=gc.stringExtent(displayStr);
  guessSchemaButton=new UtilsButton(compositeRetreiveSchemaButton,displayStr,buttonSize.x + 12,HEIGHT_BUTTON_PIXEL);
  guessSchemaButton.setToolTipText(GUESS_SCHEMA_TOOLTIP);
  gc.dispose();
  if (LanguageManager.getCurrentLanguage() == ECodeLanguage.JAVA) {
    guessSchemaButton.setVisible(true);
  }
 else {
    guessSchemaButton.setVisible(false);
  }
  streamDetachCheckbox=new Button(composite1,SWT.CHECK);
  streamDetachCheckbox.setText(Messages.getString("String_Node_Str"));
  streamDetachCheckbox.setAlignment(SWT.LEFT);
  streamDetachCheckbox.setVisible(STREAM_DETACH_IS_VISIBLE);
  Group groupMetaData=Form.createGroup(rightComposite,1,Messages.getString("String_Node_Str"),tableCompositeHeight);
  Composite compositeMetaData=Form.startNewGridLayout(groupMetaData,1);
  Composite compositeTable=Form.startNewDimensionnedGridLayout(compositeMetaData,1,rightCompositeWidth,tableCompositeHeight);
  compositeTable.setLayout(new FillLayout());
  metadataEditor=new MetadataEmfTableEditor("String_Node_Str");
  tableEditorView=new MetadataEmfTableEditorView(compositeTable,SWT.NONE,false);
  tableEditorView.setShowDbTypeColumn(true,true,true);
  tableEditorView.setShowDbColumnName(true,false);
  final DatabaseConnection databaseConnection=getConnection();
  String trueDbmsID=DatabaseConnectionParameterUtil.getTrueParamValue(databaseConnection,databaseConnection.getDbmsId());
  tableEditorView.setCurrentDbms(trueDbmsID);
  tableEditorView.initGraphicComponents();
  metadataEditor.setDefaultLabel(Messages.getString("String_Node_Str"));
}

Fixed version (ground truth):
@Override protected void addFields(){
  int leftCompositeWidth=125;
  int rightCompositeWidth=WIDTH_GRIDDATA_PIXEL - leftCompositeWidth;
  int headerCompositeHeight=80;
  int tableSettingsCompositeHeight=15;
  int tableCompositeHeight=200;
  int height=headerCompositeHeight + tableSettingsCompositeHeight + tableCompositeHeight;
  Composite mainComposite=Form.startNewDimensionnedGridLayout(this,2,WIDTH_GRIDDATA_PIXEL,height);
  mainComposite.setLayout(new GridLayout(2,false));
  GridData gridData=new GridData(GridData.FILL_BOTH);
  mainComposite.setLayoutData(gridData);
  SashForm sash=new SashForm(mainComposite,SWT.NONE);
  GridData sashData=new GridData(GridData.FILL_BOTH);
  sash.setLayoutData(sashData);
  Composite leftComposite=Form.startNewDimensionnedGridLayout(sash,1,leftCompositeWidth,height);
  Composite rightComposite=Form.startNewDimensionnedGridLayout(sash,1,rightCompositeWidth,height);
  sash.setWeights(new int[]{1,4});
  addTreeNavigator(leftComposite,leftCompositeWidth,height);
  gridData=new GridData(SWT.FILL,SWT.BOTTOM,true,false);
  gridData.widthHint=rightCompositeWidth;
  gridData.horizontalSpan=4;
  Composite composite1=Form.startNewDimensionnedGridLayout(rightComposite,4,SWT.DEFAULT,SWT.DEFAULT,false);
  ((GridData)composite1.getLayoutData()).verticalAlignment=GridData.VERTICAL_ALIGN_CENTER;
  nameText=new LabelledText(composite1,Messages.getString("String_Node_Str"),3);
  commentText=new LabelledText(composite1,Messages.getString("String_Node_Str"),3);
  typeText=new Label(composite1,SWT.NONE);
  typeText.setLayoutData(gridData);
  GridData gridData1=new GridData(GridData.FILL_HORIZONTAL);
  gridData1.horizontalSpan=4;
  Composite container=Form.startNewGridLayout(composite1,4,false,SWT.CENTER,SWT.TOP);
  container.setLayoutData(gridData1);
  tableCombo=new LabelledCombo(container,Messages.getString("String_Node_Str"),Messages.getString("String_Node_Str"),itemTableName != null ? itemTableName.toArray(new String[0]) : null,1,true,SWT.NONE);
  tableCombo.setEnabled(false);
  button=new Button(container,SWT.PUSH);
  button.setImage(ImageProvider.getImage(EImage.REFRESH_ICON));
  button.setToolTipText(Messages.getString("String_Node_Str"));
  Composite compositeRetreiveSchemaButton=Form.startNewGridLayout(container,3,false,SWT.CENTER,SWT.TOP);
  GC gc=new GC(compositeRetreiveSchemaButton);
  String displayStr=Messages.getString("String_Node_Str");
  Point buttonSize=gc.stringExtent(displayStr);
  retreiveSchemaButton=new UtilsButton(compositeRetreiveSchemaButton,displayStr,buttonSize.x + 12,HEIGHT_BUTTON_PIXEL);
  retreiveSchemaButton.setToolTipText(RETRIEVE_SCHEMA_TOOLTIP);
  tableSettingsInfoLabel=new Label(composite1,SWT.NONE);
  tableSettingsInfoLabel.setLayoutData(gridData);
  displayStr=Messages.getString("String_Node_Str");
  buttonSize=gc.stringExtent(displayStr);
  guessSchemaButton=new UtilsButton(compositeRetreiveSchemaButton,displayStr,buttonSize.x + 12,HEIGHT_BUTTON_PIXEL);
  guessSchemaButton.setToolTipText(GUESS_SCHEMA_TOOLTIP);
  gc.dispose();
  if (LanguageManager.getCurrentLanguage() == ECodeLanguage.JAVA) {
    guessSchemaButton.setVisible(true);
  }
 else {
    guessSchemaButton.setVisible(false);
  }
  streamDetachCheckbox=new Button(composite1,SWT.CHECK);
  streamDetachCheckbox.setText(Messages.getString("String_Node_Str"));
  streamDetachCheckbox.setAlignment(SWT.LEFT);
  streamDetachCheckbox.setVisible(STREAM_DETACH_IS_VISIBLE);
  Group groupMetaData=Form.createGroup(rightComposite,1,Messages.getString("String_Node_Str"),tableCompositeHeight);
  Composite compositeMetaData=Form.startNewGridLayout(groupMetaData,1);
  Composite compositeTable=Form.startNewDimensionnedGridLayout(compositeMetaData,1,rightCompositeWidth,tableCompositeHeight);
  compositeTable.setLayout(new FillLayout());
  metadataEditor=new MetadataEmfTableEditor("String_Node_Str");
  tableEditorView=new MetadataEmfTableEditorView(compositeTable,SWT.NONE,false);
  tableEditorView.setShowDbTypeColumn(true,true,true);
  tableEditorView.setShowDbColumnName(true,false);
  final DatabaseConnection databaseConnection=getConnection();
  String trueDbmsID=databaseConnection.getDbmsId();
  if (databaseConnection.isContextMode()) {
    ContextType contextType=ConnectionContextHelper.getContextTypeForContextMode(getShell(),databaseConnection,null,false);
    trueDbmsID=ConnectionContextHelper.getOriginalValue(contextType,trueDbmsID);
  }
  tableEditorView.setCurrentDbms(trueDbmsID);
  tableEditorView.initGraphicComponents();
  metadataEditor.setDefaultLabel(Messages.getString("String_Node_Str"));
}