Program: 122987
Project: 122987
Buggy source:
@Override public Control createControl(Composite subComposite,IElementParameter param,int numInRow,int nbInRow,int top,Control lastControl){
  this.curParameter=param;
  this.paramFieldType=param.getFieldType();
  CCombo combo;
  Control lastControlUsed=lastControl;
  combo=new CCombo(subComposite,SWT.BORDER);
  IElementParameter propertyTypeParameter=param.getChildParameters().get(getRepositoryTypeParamName());
  FormData data;
  String[] originalList=propertyTypeParameter.getListItemsDisplayName();
  List<String> stringToDisplay=new ArrayList<String>();
  for (int i=0; i < originalList.length; i++) {
    stringToDisplay.add(originalList[i]);
  }
  combo.setItems(stringToDisplay.toArray(new String[0]));
  combo.setEditable(false);
  combo.setEnabled(!propertyTypeParameter.isReadOnly());
  if (elem instanceof Node) {
    combo.setToolTipText(VARIABLE_TOOLTIP + propertyTypeParameter.getVariableName());
  }
  if (param.getFieldType() == EParameterFieldType.PROPERTY_TYPE || param.getFieldType() == EParameterFieldType.SCHEMA_TYPE || param.getFieldType() == EParameterFieldType.QUERYSTORE_TYPE) {
    combo.setEnabled(ExtractMetaDataUtils.haveLoadMetadataNode());
  }
  CLabel labelLabel=getWidgetFactory().createCLabel(subComposite,propertyTypeParameter.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 (numInRow != 1) {
    labelLabel.setAlignment(SWT.RIGHT);
  }
  data=new FormData();
  int currentLabelWidth=STANDARD_LABEL_WIDTH;
  GC gc=new GC(labelLabel);
  Point labelSize=gc.stringExtent(propertyTypeParameter.getDisplayName());
  gc.dispose();
  if ((labelSize.x + ITabbedPropertyConstants.HSPACE) > currentLabelWidth) {
    currentLabelWidth=labelSize.x + ITabbedPropertyConstants.HSPACE;
  }
  if (param.isRepositoryValueUsed()) {
    param.setReadOnly(true);
  }
  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.top=new FormAttachment(0,top);
  combo.setLayoutData(data);
  combo.addSelectionListener(listenerSelection);
  combo.setData(PARAMETER_NAME,param.getName() + "String_Node_Str" + propertyTypeParameter.getName());
  lastControlUsed=combo;
  String propertyType=(String)propertyTypeParameter.getValue();
  param.setReadOnly(propertyTypeParameter.isReadOnly());
  if (propertyType != null && propertyType.equals(EmfComponent.REPOSITORY)) {
    lastControlUsed=addRepositoryChoice(subComposite,lastControlUsed,numInRow,nbInRow,top,param);
  }
  hashCurControls.put(param.getName() + "String_Node_Str" + propertyTypeParameter.getName(),combo);
  Point initialSize=combo.computeSize(SWT.DEFAULT,SWT.DEFAULT);
  dynamicProperty.setCurRowSize(initialSize.y + ITabbedPropertyConstants.VSPACE);
  return lastControlUsed;
}

Fixed version (ground truth):
@Override public Control createControl(Composite subComposite,IElementParameter param,int numInRow,int nbInRow,int top,Control lastControl){
  this.curParameter=param;
  this.paramFieldType=param.getFieldType();
  CCombo combo;
  Control lastControlUsed=lastControl;
  combo=new CCombo(subComposite,SWT.BORDER);
  IElementParameter propertyTypeParameter=param.getChildParameters().get(getRepositoryTypeParamName());
  FormData data;
  String[] originalList=propertyTypeParameter.getListItemsDisplayName();
  List<String> stringToDisplay=new ArrayList<String>();
  for (  String element : originalList) {
    stringToDisplay.add(element);
  }
  combo.setItems(stringToDisplay.toArray(new String[0]));
  combo.setEditable(false);
  combo.setEnabled(!propertyTypeParameter.isReadOnly());
  if (elem instanceof Node) {
    combo.setToolTipText(VARIABLE_TOOLTIP + propertyTypeParameter.getVariableName());
  }
  if (!propertyTypeParameter.isReadOnly()) {
    if (param.getFieldType() == EParameterFieldType.PROPERTY_TYPE || param.getFieldType() == EParameterFieldType.SCHEMA_TYPE || param.getFieldType() == EParameterFieldType.QUERYSTORE_TYPE) {
      combo.setEnabled(ExtractMetaDataUtils.haveLoadMetadataNode());
    }
  }
  CLabel labelLabel=getWidgetFactory().createCLabel(subComposite,propertyTypeParameter.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 (numInRow != 1) {
    labelLabel.setAlignment(SWT.RIGHT);
  }
  data=new FormData();
  int currentLabelWidth=STANDARD_LABEL_WIDTH;
  GC gc=new GC(labelLabel);
  Point labelSize=gc.stringExtent(propertyTypeParameter.getDisplayName());
  gc.dispose();
  if ((labelSize.x + ITabbedPropertyConstants.HSPACE) > currentLabelWidth) {
    currentLabelWidth=labelSize.x + ITabbedPropertyConstants.HSPACE;
  }
  if (param.isRepositoryValueUsed()) {
    param.setReadOnly(true);
  }
  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.top=new FormAttachment(0,top);
  combo.setLayoutData(data);
  combo.addSelectionListener(listenerSelection);
  combo.setData(PARAMETER_NAME,param.getName() + "String_Node_Str" + propertyTypeParameter.getName());
  lastControlUsed=combo;
  String propertyType=(String)propertyTypeParameter.getValue();
  param.setReadOnly(propertyTypeParameter.isReadOnly());
  if (propertyType != null && propertyType.equals(EmfComponent.REPOSITORY)) {
    lastControlUsed=addRepositoryChoice(subComposite,lastControlUsed,numInRow,nbInRow,top,param);
  }
  hashCurControls.put(param.getName() + "String_Node_Str" + propertyTypeParameter.getName(),combo);
  Point initialSize=combo.computeSize(SWT.DEFAULT,SWT.DEFAULT);
  dynamicProperty.setCurRowSize(initialSize.y + ITabbedPropertyConstants.VSPACE);
  return lastControlUsed;
}