Program: 118472
Project: 118472
Buggy source:
@Override public Control createControl(final Composite subComposite,final IElementParameter param,final int numInRow,final int nbInRow,final int top,final Control lastControl){
  this.curParameter=param;
  this.paramFieldType=param.getFieldType();
  FormData data;
  final DecoratedField dField=new DecoratedField(subComposite,SWT.BORDER,new SelectAllTextControlCreator());
  if (param.isRequired()) {
    FieldDecoration decoration=FieldDecorationRegistry.getDefault().getFieldDecoration(FieldDecorationRegistry.DEC_REQUIRED);
    dField.addFieldDecoration(decoration,SWT.RIGHT | SWT.TOP,false);
  }
  if (param.isRepositoryValueUsed()) {
    FieldDecoration decoration=FieldDecorationRegistry.getDefault().getFieldDecoration(FieldDecorationRegistry.DEC_CONTENT_PROPOSAL);
    decoration.setDescription(Messages.getString("String_Node_Str"));
    dField.addFieldDecoration(decoration,SWT.RIGHT | SWT.BOTTOM,false);
  }
  Control cLayout=dField.getLayoutControl();
  labelText=(Text)dField.getControl();
  labelText.setData(PARAMETER_NAME,param.getName());
  editionControlHelper.register(param.getName(),labelText);
  cLayout.setBackground(subComposite.getBackground());
  if (elem instanceof Node) {
    labelText.setToolTipText(VARIABLE_TOOLTIP + param.getVariableName());
  }
  if (!isReadOnly()) {
    if (param.isRepositoryValueUsed() && !(elem instanceof org.talend.designer.core.ui.editor.process.Process || elem instanceof StatsAndLogsElement || elem instanceof ImplicitContextLoadElement)) {
      addRepositoryPropertyListener(labelText);
    }
    if (param.isRequired()) {
      labelText.addModifyListener(new ModifyListener(){
        @Override public void modifyText(        ModifyEvent e){
          checkTextError(param,labelText,labelText.getText());
        }
      }
);
    }
    boolean editable=!param.isReadOnly() && !param.isRepositoryValueUsed();
    labelText.setEditable(editable);
  }
 else {
    labelText.setEditable(false);
  }
  addDragAndDropTarget(labelText);
  CLabel labelLabel=getWidgetFactory().createCLabel(subComposite,param.getDisplayName());
  data=new FormData();
  if (lastControl != null) {
    data.left=new FormAttachment(lastControl,0);
  }
 else {
    data.left=new FormAttachment((((numInRow - 1) * MAX_PERCENT) / nbInRow),0);
  }
  data.top=new FormAttachment(0,top);
  labelLabel.setLayoutData(data);
  if (isInWizard()) {
    labelLabel.setAlignment(SWT.RIGHT);
  }
  data=new FormData();
  int currentLabelWidth=STANDARD_LABEL_WIDTH;
  GC gc=new GC(labelLabel);
  Point labelSize=gc.stringExtent(param.getDisplayName());
  gc.dispose();
  if ((labelSize.x + (ITabbedPropertyConstants.HSPACE * 2)) > currentLabelWidth) {
    currentLabelWidth=labelSize.x + (ITabbedPropertyConstants.HSPACE * 2);
  }
  if (numInRow == 1) {
    if (lastControl != null) {
      data.left=new FormAttachment(lastControl,currentLabelWidth);
    }
 else {
      data.left=new FormAttachment(0,currentLabelWidth);
    }
  }
 else {
    data.left=new FormAttachment(labelLabel,0,SWT.RIGHT);
  }
  data.right=new FormAttachment((numInRow * MAX_PERCENT) / nbInRow,0);
  data.top=new FormAttachment(0,top);
  cLayout.setLayoutData(data);
  hashCurControls.put(param.getName(),labelText);
  Point initialSize=cLayout.computeSize(SWT.DEFAULT,SWT.DEFAULT);
  dynamicProperty.setCurRowSize(initialSize.y + ITabbedPropertyConstants.VSPACE);
  if (isInWizard()) {
    data.left=new FormAttachment(lastControl,currentLabelWidth + (ITabbedPropertyConstants.HSPACE * 2));
    data=(FormData)labelLabel.getLayoutData();
    if (lastControl == null) {
      data.right=new FormAttachment(cLayout,-ITabbedPropertyConstants.HSPACE);
    }
 else {
      data.left=new FormAttachment(lastControl,ITabbedPropertyConstants.HSPACE,SWT.RIGHT);
      data.right=new FormAttachment(lastControl,currentLabelWidth + (ITabbedPropertyConstants.HSPACE * 2),SWT.RIGHT);
    }
  }
  return cLayout;
}

Fixed version (ground truth):
@Override public Control createControl(final Composite subComposite,final IElementParameter param,final int numInRow,final int nbInRow,final int top,final Control lastControl){
  this.curParameter=param;
  this.paramFieldType=param.getFieldType();
  FormData data;
  final DecoratedField dField=new DecoratedField(subComposite,SWT.BORDER,new SelectAllTextControlCreator());
  if (param.isRequired()) {
    FieldDecoration decoration=FieldDecorationRegistry.getDefault().getFieldDecoration(FieldDecorationRegistry.DEC_REQUIRED);
    dField.addFieldDecoration(decoration,SWT.RIGHT | SWT.TOP,false);
  }
  if (canAddRepositoryDecoration(param)) {
    FieldDecoration decoration=FieldDecorationRegistry.getDefault().getFieldDecoration(FieldDecorationRegistry.DEC_CONTENT_PROPOSAL);
    decoration.setDescription(Messages.getString("String_Node_Str"));
    dField.addFieldDecoration(decoration,SWT.RIGHT | SWT.BOTTOM,false);
  }
  Control cLayout=dField.getLayoutControl();
  labelText=(Text)dField.getControl();
  labelText.setData(PARAMETER_NAME,param.getName());
  editionControlHelper.register(param.getName(),labelText);
  cLayout.setBackground(subComposite.getBackground());
  if (elem instanceof Node) {
    labelText.setToolTipText(VARIABLE_TOOLTIP + param.getVariableName());
  }
  if (!isReadOnly()) {
    if (param.isRepositoryValueUsed() && !(elem instanceof org.talend.designer.core.ui.editor.process.Process || elem instanceof StatsAndLogsElement || elem instanceof ImplicitContextLoadElement)) {
      addRepositoryPropertyListener(labelText);
    }
    if (param.isRequired()) {
      labelText.addModifyListener(new ModifyListener(){
        @Override public void modifyText(        ModifyEvent e){
          checkTextError(param,labelText,labelText.getText());
        }
      }
);
    }
    boolean editable=!param.isReadOnly() && (elem instanceof FakeElement || !param.isRepositoryValueUsed());
    labelText.setEditable(editable);
  }
 else {
    labelText.setEditable(false);
  }
  addDragAndDropTarget(labelText);
  CLabel labelLabel=getWidgetFactory().createCLabel(subComposite,param.getDisplayName());
  data=new FormData();
  if (lastControl != null) {
    data.left=new FormAttachment(lastControl,0);
  }
 else {
    data.left=new FormAttachment((((numInRow - 1) * MAX_PERCENT) / nbInRow),0);
  }
  data.top=new FormAttachment(0,top);
  labelLabel.setLayoutData(data);
  if (isInWizard()) {
    labelLabel.setAlignment(SWT.RIGHT);
  }
  data=new FormData();
  int currentLabelWidth=STANDARD_LABEL_WIDTH;
  GC gc=new GC(labelLabel);
  Point labelSize=gc.stringExtent(param.getDisplayName());
  gc.dispose();
  if ((labelSize.x + (ITabbedPropertyConstants.HSPACE * 2)) > currentLabelWidth) {
    currentLabelWidth=labelSize.x + (ITabbedPropertyConstants.HSPACE * 2);
  }
  if (numInRow == 1) {
    if (lastControl != null) {
      data.left=new FormAttachment(lastControl,currentLabelWidth);
    }
 else {
      data.left=new FormAttachment(0,currentLabelWidth);
    }
  }
 else {
    data.left=new FormAttachment(labelLabel,0,SWT.RIGHT);
  }
  data.right=new FormAttachment((numInRow * MAX_PERCENT) / nbInRow,0);
  data.top=new FormAttachment(0,top);
  cLayout.setLayoutData(data);
  hashCurControls.put(param.getName(),labelText);
  Point initialSize=cLayout.computeSize(SWT.DEFAULT,SWT.DEFAULT);
  dynamicProperty.setCurRowSize(initialSize.y + ITabbedPropertyConstants.VSPACE);
  if (isInWizard()) {
    data.left=new FormAttachment(lastControl,currentLabelWidth + (ITabbedPropertyConstants.HSPACE * 2));
    data=(FormData)labelLabel.getLayoutData();
    if (lastControl == null) {
      data.right=new FormAttachment(cLayout,-ITabbedPropertyConstants.HSPACE);
    }
 else {
      data.left=new FormAttachment(lastControl,ITabbedPropertyConstants.HSPACE,SWT.RIGHT);
      data.right=new FormAttachment(lastControl,currentLabelWidth + (ITabbedPropertyConstants.HSPACE * 2),SWT.RIGHT);
    }
  }
  return cLayout;
}