Program: 126531
Project: 126531
Buggy source:
/** 
 * DOC YeXiaowei Comment method "addCheckAndStandardButtons".
 * @param width
 * @param compositeGroupDbSettings
 */
private void addCheckAndStandardButtons(int width,Composite compositeGroupDbSettings){
  fileField.hide();
  directoryField.hide();
  Composite unionBtnsCompsite=new Composite(dbConnectionArea,SWT.NONE);
  FormLayout formLayout=new FormLayout();
  unionBtnsCompsite.setLayout(formLayout);
  moveButton=new Button(unionBtnsCompsite,SWT.PUSH);
  moveButton.setText(DOWN);
  moveButton.setToolTipText(Messages.getString("String_Node_Str"));
  addMoveButtonListener();
  FormData moveButtonFormData=new FormData();
  moveButtonFormData.right=new FormAttachment(100,0);
  moveButton.setLayoutData(moveButtonFormData);
  Composite checkGroup=new Composite(unionBtnsCompsite,SWT.NONE);
  moveButtonFormData.top=new FormAttachment(checkGroup,0,SWT.CENTER);
  FormData checkGroupFormData=new FormData();
  checkGroupFormData.left=new FormAttachment(0,0);
  checkGroupFormData.right=new FormAttachment(100,0);
  checkGroup.setLayoutData(checkGroupFormData);
  GridLayout gridLayout=new GridLayout(1,false);
  checkGroup.setLayout(gridLayout);
  Composite compositeCheckButton=Form.startNewGridLayout(checkGroup,1,false,SWT.CENTER,SWT.BOTTOM);
  unionBtnsCompsite.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
  checkButton=new UtilsButton(compositeCheckButton,Messages.getString("String_Node_Str"),WIDTH_BUTTON_PIXEL,HEIGHT_BUTTON_PIXEL);
  checkButton.setEnabled(false);
  hidableArea=new Composite(sash,SWT.NONE);
  GridLayout hidableAreaLayout=new GridLayout(1,false);
  hidableArea.setLayout(hidableAreaLayout);
  Group group1=Form.createGroup(hidableArea,1,Messages.getString("String_Node_Str"));
  GridData gridData=new GridData(GridData.FILL_HORIZONTAL);
  gridData.heightHint=80;
  group1.setLayoutData(gridData);
  Composite compositeGroupDbProperties=Form.startNewDimensionnedGridLayout(group1,8,width,50);
  String[] item={"String_Node_Str"};
  sqlSyntaxCombo=new LabelledCombo(compositeGroupDbProperties,Messages.getString("String_Node_Str"),null,item,3);
  stringQuoteText=new LabelledText(compositeGroupDbProperties,Messages.getString("String_Node_Str"),false);
  nullCharText=new LabelledText(compositeGroupDbProperties,Messages.getString("String_Node_Str"),false);
  gridData=new GridData();
  gridData.horizontalSpan=2;
  standardButton=new Button(compositeGroupDbProperties,SWT.RADIO);
  standardButton.setText(Messages.getString("String_Node_Str"));
  standardButton.setLayoutData(gridData);
  systemButton=new Button(compositeGroupDbProperties,SWT.RADIO);
  systemButton.setText(Messages.getString("String_Node_Str"));
  gridData=new GridData();
  gridData.horizontalSpan=2;
  systemButton.setLayoutData(gridData);
  Composite c=new Composite(compositeGroupDbProperties,SWT.NONE);
  GridLayout layout=new GridLayout(4,false);
  layout.horizontalSpacing=15;
  layout.verticalSpacing=0;
  GridData layoutData=new GridData(GridData.FILL_HORIZONTAL);
  layoutData.horizontalSpan=4;
  c.setLayoutData(layoutData);
  c.setLayout(layout);
  sqlModeLabel=new Label(c,SWT.NONE);
  sqlModeLabel.setText(Messages.getString("String_Node_Str"));
  button1=new Button(c,SWT.RADIO);
  button1.setText(Messages.getString("String_Node_Str"));
  button2=new Button(c,SWT.RADIO);
  button2.setText(Messages.getString("String_Node_Str"));
  sqlModeLabel.setVisible(false);
  button1.setVisible(false);
  button2.setVisible(false);
  sqlSyntaxCombo.setVisible(!CoreRuntimePlugin.getInstance().isDataProfilePerspectiveSelected());
  hiveModeCombo.setVisible(!CoreRuntimePlugin.getInstance().isDataProfilePerspectiveSelected());
  group1.setVisible(!isTOPStandaloneMode());
  if (metadataconnection != null) {
    IDBMetadataProviderObject providerObj=ExtractMetaDataFromDataBase.getProviderObjectByDbType(metadataconnection.getDbType());
    if (providerObj != null && !providerObj.isSupportJDBC()) {
      group1.setVisible(false);
    }
  }
}

Fixed version (ground truth):
/** 
 * DOC YeXiaowei Comment method "addCheckAndStandardButtons".
 * @param width
 * @param compositeGroupDbSettings
 */
private void addCheckAndStandardButtons(int width,Composite compositeGroupDbSettings){
  fileField.hide();
  directoryField.hide();
  Composite unionBtnsCompsite=new Composite(dbConnectionArea,SWT.NONE);
  FormLayout formLayout=new FormLayout();
  unionBtnsCompsite.setLayout(formLayout);
  moveButton=new Button(unionBtnsCompsite,SWT.PUSH);
  moveButton.setText(DOWN);
  moveButton.setToolTipText(Messages.getString("String_Node_Str"));
  addMoveButtonListener();
  FormData moveButtonFormData=new FormData();
  moveButtonFormData.right=new FormAttachment(100,0);
  moveButton.setLayoutData(moveButtonFormData);
  Composite checkGroup=new Composite(unionBtnsCompsite,SWT.NONE);
  moveButtonFormData.top=new FormAttachment(checkGroup,0,SWT.CENTER);
  FormData checkGroupFormData=new FormData();
  checkGroupFormData.left=new FormAttachment(0,0);
  checkGroupFormData.right=new FormAttachment(100,0);
  checkGroup.setLayoutData(checkGroupFormData);
  GridLayout gridLayout=new GridLayout(1,false);
  checkGroup.setLayout(gridLayout);
  Composite compositeCheckButton=Form.startNewGridLayout(checkGroup,1,false,SWT.CENTER,SWT.BOTTOM);
  unionBtnsCompsite.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
  checkButton=new UtilsButton(compositeCheckButton,Messages.getString("String_Node_Str"),WIDTH_BUTTON_PIXEL,HEIGHT_BUTTON_PIXEL);
  checkButton.setEnabled(false);
  hidableArea=new Composite(sash,SWT.NONE);
  GridLayout hidableAreaLayout=new GridLayout(1,false);
  hidableArea.setLayout(hidableAreaLayout);
  Group group1=Form.createGroup(hidableArea,1,Messages.getString("String_Node_Str"));
  GridData gridData=new GridData(GridData.FILL_HORIZONTAL);
  gridData.heightHint=80;
  group1.setLayoutData(gridData);
  Composite compositeGroupDbProperties=Form.startNewDimensionnedGridLayout(group1,8,width,50);
  String[] item={"String_Node_Str"};
  sqlSyntaxCombo=new LabelledCombo(compositeGroupDbProperties,Messages.getString("String_Node_Str"),null,item,3);
  stringQuoteText=new LabelledText(compositeGroupDbProperties,Messages.getString("String_Node_Str"),false);
  nullCharText=new LabelledText(compositeGroupDbProperties,Messages.getString("String_Node_Str"),false);
  gridData=new GridData();
  gridData.horizontalSpan=2;
  standardButton=new Button(compositeGroupDbProperties,SWT.RADIO);
  standardButton.setText(Messages.getString("String_Node_Str"));
  standardButton.setLayoutData(gridData);
  systemButton=new Button(compositeGroupDbProperties,SWT.RADIO);
  systemButton.setText(Messages.getString("String_Node_Str"));
  gridData=new GridData();
  gridData.horizontalSpan=2;
  systemButton.setLayoutData(gridData);
  Composite c=new Composite(compositeGroupDbProperties,SWT.NONE);
  GridLayout layout=new GridLayout(4,false);
  layout.horizontalSpacing=15;
  layout.verticalSpacing=0;
  GridData layoutData=new GridData(GridData.FILL_HORIZONTAL);
  layoutData.horizontalSpan=4;
  c.setLayoutData(layoutData);
  c.setLayout(layout);
  sqlModeLabel=new Label(c,SWT.NONE);
  sqlModeLabel.setText(Messages.getString("String_Node_Str"));
  button1=new Button(c,SWT.RADIO);
  button1.setText(Messages.getString("String_Node_Str"));
  button2=new Button(c,SWT.RADIO);
  button2.setText(Messages.getString("String_Node_Str"));
  sqlModeLabel.setVisible(false);
  button1.setVisible(false);
  button2.setVisible(false);
  sqlSyntaxCombo.setVisible(!CoreRuntimePlugin.getInstance().isDataProfilePerspectiveSelected());
  hiveModeCombo.setVisible(!CoreRuntimePlugin.getInstance().isDataProfilePerspectiveSelected());
  group1.setVisible(!isTOPStandaloneMode());
  if (metadataconnection != null) {
    IDBMetadataProviderObject providerObj=ExtractMetaDataFromDataBase.getProviderObjectByDbType(metadataconnection.getDbType());
    if (providerObj != null && !providerObj.isSupportJDBC()) {
      group1.setVisible(false);
    }
  }
  isDbPropertiesVisible=group1.getVisible();
}