Program: 133736
Project: 133736
Buggy source:
/** 
 * <!-- begin-UML-doc --> <p> This operation renders the SWT widgets for the Entry. </p> <!-- end-UML-doc -->
 * @generated "UML to Java (com.ibm.xtools.transform.uml2.java5.internal.UML2JavaTransform)"
 */
protected void render(){
  int numAllowedValues=0, maxValueLength=12, maxShortValues=8;
  boolean shortValues=true;
  AllowedValueType valueType=null;
  for (  String value : entry.getAllowedValues()) {
    lowercaseAllowedValues.add(value.toLowerCase());
  }
  valueType=entry.getValueType();
  numAllowedValues=entry.getAllowedValues().size();
  for (  String i : entry.getAllowedValues()) {
    if (i.length() > maxValueLength) {
      shortValues=false;
      break;
    }
  }
  if (getLayout() == null) {
    FillLayout layout=new FillLayout(SWT.VERTICAL);
    layout.marginHeight=5;
    layout.marginWidth=3;
    layout.spacing=5;
    setLayout(layout);
  }
  FillLayout fillLayout=new FillLayout(SWT.VERTICAL);
  fillLayout.marginHeight=5;
  fillLayout.marginWidth=3;
  fillLayout.spacing=5;
  Layout layout=fillLayout;
  if (valueType == AllowedValueType.Discrete && numAllowedValues > 0) {
    if (numAllowedValues <= maxShortValues && shortValues) {
      if (numAllowedValues == 2 && allowedBinaryValues.containsAll(lowercaseAllowedValues)) {
        createCheckbox();
      }
 else {
        createLabel();
        createButtons();
      }
    }
 else {
      createLabel();
      createDropdown();
    }
  }
 else   if (valueType == AllowedValueType.Discrete) {
    throwMissingValuesError();
  }
 else   if (valueType == AllowedValueType.File) {
    createLabel();
    if (numAllowedValues > 0) {
      createDropdown();
    }
    createBrowseButton();
    final RowLayout rowLayout=new RowLayout();
    rowLayout.wrap=true;
    rowLayout.fill=false;
    rowLayout.center=true;
    layout=rowLayout;
    final RowData rowData=new RowData();
    dropDown.setLayoutData(rowData);
    final int minWidth=50;
    final int unwrappedWidth;
    Button button=buttons.get(0);
    int labelWidth=label.computeSize(SWT.DEFAULT,SWT.DEFAULT).x;
    int buttonWidth=button.computeSize(SWT.DEFAULT,SWT.DEFAULT).x;
    int padding=2 * rowLayout.spacing + rowLayout.marginLeft + rowLayout.marginWidth * 2 + rowLayout.marginRight + 30;
    unwrappedWidth=labelWidth + buttonWidth + padding;
    int availableWidth=getClientArea().width - unwrappedWidth;
    rowData.width=(availableWidth > minWidth ? availableWidth : minWidth);
    if (resizeListener != null) {
      removeControlListener(resizeListener);
    }
    resizeListener=new ControlAdapter(){
      @Override public void controlResized(      ControlEvent e){
        int availableWidth=getClientArea().width - unwrappedWidth;
        rowData.width=(availableWidth > minWidth ? availableWidth : minWidth);
        layout();
      }
    }
;
    addControlListener(resizeListener);
  }
 else {
    createLabel();
    createTextfield();
  }
  setLayout(layout);
  return;
}

Fixed version (ground truth):
/** 
 * <!-- begin-UML-doc --> <p> This operation renders the SWT widgets for the Entry. </p> <!-- end-UML-doc -->
 * @generated "UML to Java (com.ibm.xtools.transform.uml2.java5.internal.UML2JavaTransform)"
 */
protected void render(){
  int numAllowedValues=0, maxValueLength=12, maxShortValues=8;
  boolean shortValues=true;
  AllowedValueType valueType=null;
  for (  String value : entry.getAllowedValues()) {
    lowercaseAllowedValues.add(value.toLowerCase());
  }
  valueType=entry.getValueType();
  numAllowedValues=entry.getAllowedValues().size();
  for (  String i : entry.getAllowedValues()) {
    if (i.length() > maxValueLength) {
      shortValues=false;
      break;
    }
  }
  FillLayout fillLayout=new FillLayout(SWT.VERTICAL);
  fillLayout.marginHeight=5;
  fillLayout.marginWidth=3;
  fillLayout.spacing=5;
  Layout layout=fillLayout;
  if (valueType == AllowedValueType.Discrete && numAllowedValues > 0) {
    if (numAllowedValues <= maxShortValues && shortValues) {
      if (numAllowedValues == 2 && allowedBinaryValues.containsAll(lowercaseAllowedValues)) {
        createCheckbox();
      }
 else {
        createLabel();
        createButtons();
      }
    }
 else {
      createLabel();
      createDropdown();
    }
  }
 else   if (valueType == AllowedValueType.Discrete) {
    throwMissingValuesError();
  }
 else   if (valueType == AllowedValueType.File) {
    createLabel();
    createDropdown();
    createBrowseButton();
    final RowLayout rowLayout=new RowLayout();
    rowLayout.wrap=true;
    rowLayout.fill=false;
    rowLayout.center=true;
    layout=rowLayout;
    final RowData rowData=new RowData();
    dropDown.setLayoutData(rowData);
    final int minWidth=50;
    final int unwrappedWidth;
    Button button=buttons.get(0);
    int labelWidth=label.computeSize(SWT.DEFAULT,SWT.DEFAULT).x;
    int buttonWidth=button.computeSize(SWT.DEFAULT,SWT.DEFAULT).x;
    int padding=2 * rowLayout.spacing + rowLayout.marginLeft + rowLayout.marginWidth * 2 + rowLayout.marginRight + 30;
    unwrappedWidth=labelWidth + buttonWidth + padding;
    int availableWidth=getClientArea().width - unwrappedWidth;
    rowData.width=(availableWidth > minWidth ? availableWidth : minWidth);
    if (resizeListener != null) {
      removeControlListener(resizeListener);
    }
    resizeListener=new ControlAdapter(){
      @Override public void controlResized(      ControlEvent e){
        int availableWidth=getClientArea().width - unwrappedWidth;
        rowData.width=(availableWidth > minWidth ? availableWidth : minWidth);
        layout();
      }
    }
;
    addControlListener(resizeListener);
  }
 else {
    createLabel();
    createTextfield();
  }
  setLayout(layout);
  return;
}