Program: 22006
Project: 22006
Buggy source:
@Override public Control setupOn(Composite parent){
  inSetup=true;
  labels=new ArrayList<Label>();
  Composite dlgArea=new Composite(parent,SWT.NONE);
  GridLayout gridLayout=new GridLayout();
  gridLayout.numColumns=4;
  dlgArea.setLayout(gridLayout);
  Label nameLabel=buildLabel(dlgArea,StringKeys.PREF_RULEEDIT_LABEL_NAME);
  GridData data=new GridData();
  data.horizontalSpan=1;
  nameLabel.setLayoutData(data);
  labels.add(nameLabel);
  nameField=buildNameText(dlgArea);
  data=new GridData();
  data.horizontalAlignment=GridData.FILL;
  data.horizontalSpan=3;
  data.grabExcessHorizontalSpace=true;
  nameField.setLayoutData(data);
  Label ruleSetNameLabel=buildLabel(dlgArea,StringKeys.PREF_RULEEDIT_LABEL_RULESET_NAME);
  data=new GridData();
  data.horizontalSpan=1;
  ruleSetNameLabel.setLayoutData(data);
  labels.add(ruleSetNameLabel);
  ruleSetNameField=buildRuleSetNameField(dlgArea);
  data=new GridData();
  data.horizontalAlignment=GridData.FILL;
  data.horizontalSpan=3;
  data.grabExcessHorizontalSpace=true;
  ruleSetNameField.setLayoutData(data);
  Label implTypeLabel=buildLabel(dlgArea,StringKeys.PREF_RULEEDIT_LABEL_IMPLEMENTED_BY);
  data=new GridData();
  data.horizontalSpan=1;
  implTypeLabel.setLayoutData(data);
  labels.add(implTypeLabel);
  implementationTypeCombo=buildImplementationTypeCombo(dlgArea);
  data=new GridData();
  data.horizontalAlignment=GridData.FILL;
  data.horizontalSpan=3;
  data.grabExcessHorizontalSpace=true;
  implementationTypeCombo.setLayoutData(data);
  Label implementationClassLabel=buildLabel(dlgArea,StringKeys.PREF_RULEEDIT_LABEL_IMPLEMENTATION_CLASS);
  data=new GridData();
  data.horizontalSpan=1;
  implementationClassLabel.setLayoutData(data);
  labels.add(implementationClassLabel);
  implementationClassField=buildImplementationClassField(dlgArea);
  data=new GridData();
  data.horizontalAlignment=GridData.FILL;
  data.horizontalSpan=3;
  data.grabExcessHorizontalSpace=true;
  implementationClassField.setLayoutData(data);
  buildLabel(dlgArea,null);
  usesTypeResolutionButton=buildUsesTypeResolutionButton(dlgArea);
  usesDfaButton=buildUsesDfaButton(dlgArea);
  buildLabel(dlgArea,null);
  Label languageLabel=buildLabel(dlgArea,StringKeys.PREF_RULEEDIT_LABEL_LANGUAGE);
  data=new GridData();
  data.horizontalSpan=1;
  languageLabel.setLayoutData(data);
  labels.add(languageLabel);
  languageCombo=buildLanguageCombo(dlgArea);
  data=new GridData();
  data.horizontalAlignment=GridData.FILL;
  data.horizontalSpan=3;
  data.grabExcessHorizontalSpace=true;
  languageCombo.setLayoutData(data);
  GridData lblGD=new GridData();
  lblGD.horizontalSpan=1;
  lblGD.horizontalAlignment=SWT.END;
  GridData cmboGD=new GridData();
  cmboGD.horizontalAlignment=GridData.FILL;
  cmboGD.horizontalSpan=2;
  cmboGD.grabExcessHorizontalSpace=true;
  buildLabel(dlgArea,null);
  minLanguageLabel=buildLabel(dlgArea,StringKeys.PREF_RULEEDIT_LABEL_LANGUAGE_MIN);
  minLanguageLabel.setAlignment(SWT.RIGHT);
  minLanguageLabel.setLayoutData(lblGD);
  labels.add(minLanguageLabel);
  minLanguageVersionCombo=buildLanguageVersionCombo(dlgArea,true);
  minLanguageVersionCombo.setLayoutData(cmboGD);
  buildLabel(dlgArea,null);
  maxLanguageLabel=buildLabel(dlgArea,StringKeys.PREF_RULEEDIT_LABEL_LANGUAGE_MAX);
  maxLanguageLabel.setAlignment(SWT.RIGHT);
  maxLanguageLabel.setLayoutData(lblGD);
  labels.add(maxLanguageLabel);
  maxLanguageVersionCombo=buildLanguageVersionCombo(dlgArea,false);
  maxLanguageVersionCombo.setLayoutData(cmboGD);
  Label priorityLabel=buildLabel(dlgArea,StringKeys.PREF_RULEEDIT_LABEL_PRIORITY);
  data=new GridData();
  data.horizontalSpan=1;
  priorityLabel.setLayoutData(data);
  labels.add(priorityLabel);
  Composite priorityComp=new Composite(dlgArea,0);
  priorityComp.setLayout(new GridLayout(2,false));
  priorityComp.setLayoutData(new GridData(SWT.LEFT,SWT.CENTER,false,false,2,1));
  priorityCombo=buildPriorityCombo(priorityComp);
  priorityCombo.setLayoutData(new GridData(SWT.LEFT,SWT.CENTER,false,false,1,1));
  priorityDisplay=new ShapePicker(priorityComp,SWT.NONE,14);
  priorityDisplay.setLayoutData(new GridData(SWT.LEFT,SWT.CENTER,true,false,1,1));
  priorityDisplay.setShapeMap(UISettings.shapesByPriority());
  priorityDisplay.setSize(90,25);
  if (usageMode == EditorUsageMode.CreateNew) {
    implementationType(ImplementationType.XPath);
  }
  setControl(dlgArea);
  validate();
  inSetup=false;
  return dlgArea;
}

Fixed version (ground truth):
@Override public Control setupOn(Composite parent){
  inSetup=true;
  labels=new ArrayList<Label>();
  Composite dlgArea=new Composite(parent,SWT.NONE);
  GridLayout gridLayout=new GridLayout();
  gridLayout.numColumns=4;
  dlgArea.setLayout(gridLayout);
  Label nameLabel=buildLabel(dlgArea,StringKeys.PREF_RULEEDIT_LABEL_NAME);
  GridData data=new GridData();
  data.horizontalSpan=1;
  nameLabel.setLayoutData(data);
  labels.add(nameLabel);
  nameField=buildNameText(dlgArea);
  data=new GridData();
  data.horizontalAlignment=GridData.FILL;
  data.horizontalSpan=3;
  data.grabExcessHorizontalSpace=true;
  nameField.setLayoutData(data);
  Label ruleSetNameLabel=buildLabel(dlgArea,StringKeys.PREF_RULEEDIT_LABEL_RULESET_NAME);
  data=new GridData();
  data.horizontalSpan=1;
  ruleSetNameLabel.setLayoutData(data);
  labels.add(ruleSetNameLabel);
  ruleSetNameField=buildRuleSetNameField(dlgArea);
  data=new GridData();
  data.horizontalAlignment=GridData.FILL;
  data.horizontalSpan=3;
  data.grabExcessHorizontalSpace=true;
  ruleSetNameField.setLayoutData(data);
  Label implTypeLabel=buildLabel(dlgArea,StringKeys.PREF_RULEEDIT_LABEL_IMPLEMENTED_BY);
  data=new GridData();
  data.horizontalSpan=1;
  implTypeLabel.setLayoutData(data);
  labels.add(implTypeLabel);
  implementationTypeCombo=buildImplementationTypeCombo(dlgArea);
  data=new GridData();
  data.horizontalAlignment=GridData.FILL;
  data.horizontalSpan=3;
  data.grabExcessHorizontalSpace=true;
  implementationTypeCombo.setLayoutData(data);
  Label implementationClassLabel=buildLabel(dlgArea,StringKeys.PREF_RULEEDIT_LABEL_IMPLEMENTATION_CLASS);
  data=new GridData();
  data.horizontalSpan=1;
  implementationClassLabel.setLayoutData(data);
  labels.add(implementationClassLabel);
  implementationClassField=buildImplementationClassField(dlgArea);
  data=new GridData();
  data.horizontalAlignment=GridData.FILL;
  data.horizontalSpan=3;
  data.grabExcessHorizontalSpace=true;
  implementationClassField.setLayoutData(data);
  buildLabel(dlgArea,null);
  usesTypeResolutionButton=buildUsesTypeResolutionButton(dlgArea);
  usesDfaButton=buildUsesDfaButton(dlgArea);
  buildLabel(dlgArea,null);
  Label languageLabel=buildLabel(dlgArea,StringKeys.PREF_RULEEDIT_LABEL_LANGUAGE);
  data=new GridData();
  data.horizontalSpan=1;
  languageLabel.setLayoutData(data);
  labels.add(languageLabel);
  languageCombo=buildLanguageCombo(dlgArea);
  data=new GridData();
  data.horizontalAlignment=GridData.FILL;
  data.horizontalSpan=3;
  data.grabExcessHorizontalSpace=true;
  languageCombo.setLayoutData(data);
  GridData lblGD=new GridData();
  lblGD.horizontalSpan=1;
  lblGD.horizontalAlignment=SWT.END;
  GridData cmboGD=new GridData();
  cmboGD.horizontalAlignment=GridData.FILL;
  cmboGD.horizontalSpan=2;
  cmboGD.grabExcessHorizontalSpace=true;
  buildLabel(dlgArea,null);
  minLanguageLabel=buildLabel(dlgArea,StringKeys.PREF_RULEEDIT_LABEL_LANGUAGE_MIN);
  minLanguageLabel.setAlignment(SWT.RIGHT);
  minLanguageLabel.setLayoutData(lblGD);
  labels.add(minLanguageLabel);
  minLanguageVersionCombo=buildLanguageVersionCombo(dlgArea,true);
  minLanguageVersionCombo.setLayoutData(cmboGD);
  buildLabel(dlgArea,null);
  maxLanguageLabel=buildLabel(dlgArea,StringKeys.PREF_RULEEDIT_LABEL_LANGUAGE_MAX);
  maxLanguageLabel.setAlignment(SWT.RIGHT);
  maxLanguageLabel.setLayoutData(lblGD);
  labels.add(maxLanguageLabel);
  maxLanguageVersionCombo=buildLanguageVersionCombo(dlgArea,false);
  maxLanguageVersionCombo.setLayoutData(cmboGD);
  Label priorityLabel=buildLabel(dlgArea,StringKeys.PREF_RULEEDIT_LABEL_PRIORITY);
  data=new GridData();
  data.horizontalSpan=1;
  priorityLabel.setLayoutData(data);
  labels.add(priorityLabel);
  Composite priorityComp=new Composite(dlgArea,0);
  priorityComp.setLayout(new GridLayout(2,false));
  priorityComp.setLayoutData(new GridData(SWT.LEFT,SWT.CENTER,false,false,2,1));
  priorityCombo=buildPriorityCombo(priorityComp);
  priorityCombo.setLayoutData(new GridData(SWT.LEFT,SWT.CENTER,false,false,1,1));
  priorityDisplay=new ShapePicker(priorityComp,SWT.NONE,14);
  priorityDisplay.setLayoutData(new GridData(SWT.LEFT,SWT.CENTER,true,false,1,1));
  priorityDisplay.setShapeMap(UISettings.shapesByPriority());
  priorityDisplay.setSize(90,25);
  if (creatingNewRule()) {
    implementationType(ImplementationType.XPath);
  }
  setControl(dlgArea);
  validate();
  inSetup=false;
  return dlgArea;
}