Program: 122847
Project: 122847
Buggy source:
/** 
 * DOC wzhang Comment method "addButton".
 * @param subComposite
 * @param param
 * @param lastControl
 * @param numInRow
 * @param top
 * @return
 */
private Control addButton(Composite subComposite,final IElementParameter param,Control lastControl,int numInRow,int top){
  Button button;
  Button resetBtn=null;
  Control lastControlUsed=lastControl;
  Point buttonSize;
  FormData data;
  button=getWidgetFactory().createButton(subComposite,"String_Node_Str",SWT.PUSH);
  buttonSize=button.computeSize(SWT.DEFAULT,SWT.DEFAULT);
  button.setImage(ImageProvider.getImage(EImage.SAVE_ICON));
  button.setToolTipText(Messages.getString("String_Node_Str"));
  button.setData(PARAMETER_NAME,param.getName());
  if (param.getFieldType() == EParameterFieldType.PROPERTY_TYPE) {
    button.setEnabled(ExtractMetaDataUtils.haveLoadMetadataNode());
  }
  lastControlUsed=button;
  button.addSelectionListener(listenerSelection);
  CLabel labelLabel=getWidgetFactory().createCLabel(subComposite,"String_Node_Str");
  data=new FormData();
  data.left=new FormAttachment(lastControl,0);
  data.right=new FormAttachment(lastControl,labelLabel.computeSize(SWT.DEFAULT,SWT.DEFAULT).x + (ITabbedPropertyConstants.HSPACE * 2),SWT.RIGHT);
  if (resetBtn != null) {
    data.top=new FormAttachment(resetBtn,0,SWT.CENTER);
  }
 else {
    data.top=new FormAttachment(0,top);
  }
  labelLabel.setLayoutData(data);
  if (numInRow != 1) {
    labelLabel.setAlignment(SWT.RIGHT);
  }
  data=new FormData();
  data.left=new FormAttachment(labelLabel,-1);
  data.right=new FormAttachment(labelLabel,STANDARD_BUTTON_WIDTH,SWT.RIGHT);
  if (resetBtn != null) {
    data.top=new FormAttachment(resetBtn,0,SWT.CENTER);
  }
 else {
    data.top=new FormAttachment(0,top);
  }
  data.height=STANDARD_HEIGHT - 2;
  button.setLayoutData(data);
  dynamicProperty.setCurRowSize(buttonSize.y + ITabbedPropertyConstants.VSPACE);
  return lastControlUsed;
}

Fixed version (ground truth):
/** 
 * DOC wzhang Comment method "addButton".
 * @param subComposite
 * @param param
 * @param lastControl
 * @param numInRow
 * @param top
 * @return
 */
private Control addButton(Composite subComposite,final IElementParameter param,Control lastControl,int numInRow,int top){
  Button button;
  Button resetBtn=null;
  Control lastControlUsed=lastControl;
  Point buttonSize;
  FormData data;
  button=getWidgetFactory().createButton(subComposite,"String_Node_Str",SWT.PUSH);
  buttonSize=button.computeSize(SWT.DEFAULT,SWT.DEFAULT);
  button.setImage(ImageProvider.getImage(EImage.SAVE_ICON));
  button.setToolTipText(Messages.getString("String_Node_Str"));
  button.setData(PARAMETER_NAME,param.getName());
  button.setEnabled(!param.isReadOnly());
  if (!param.isReadOnly()) {
    if (param.getFieldType() == EParameterFieldType.PROPERTY_TYPE) {
      button.setEnabled(ExtractMetaDataUtils.haveLoadMetadataNode());
    }
  }
  lastControlUsed=button;
  button.addSelectionListener(listenerSelection);
  CLabel labelLabel=getWidgetFactory().createCLabel(subComposite,"String_Node_Str");
  data=new FormData();
  data.left=new FormAttachment(lastControl,0);
  data.right=new FormAttachment(lastControl,labelLabel.computeSize(SWT.DEFAULT,SWT.DEFAULT).x + (ITabbedPropertyConstants.HSPACE * 2),SWT.RIGHT);
  if (resetBtn != null) {
    data.top=new FormAttachment(resetBtn,0,SWT.CENTER);
  }
 else {
    data.top=new FormAttachment(0,top);
  }
  labelLabel.setLayoutData(data);
  if (numInRow != 1) {
    labelLabel.setAlignment(SWT.RIGHT);
  }
  data=new FormData();
  data.left=new FormAttachment(labelLabel,-1);
  data.right=new FormAttachment(labelLabel,STANDARD_BUTTON_WIDTH,SWT.RIGHT);
  if (resetBtn != null) {
    data.top=new FormAttachment(resetBtn,0,SWT.CENTER);
  }
 else {
    data.top=new FormAttachment(0,top);
  }
  data.height=STANDARD_HEIGHT - 2;
  button.setLayoutData(data);
  dynamicProperty.setCurRowSize(buttonSize.y + ITabbedPropertyConstants.VSPACE);
  return lastControlUsed;
}