Program: 21948
Project: 21948
Buggy source:
public Control setupOn(Composite parent){
  GridData gridData;
  Composite panel=new Composite(parent,0);
  GridLayout layout=new GridLayout(2,false);
  panel.setLayout(layout);
  xpathField=newCodeField(panel);
  SyntaxManager.adapt(xpathField,"String_Node_Str",null);
  gridData=new GridData(GridData.FILL_BOTH);
  gridData.grabExcessHorizontalSpace=true;
  gridData.horizontalSpan=2;
  xpathField.setLayoutData(gridData);
  xpathField.addModifyListener(new ModifyListener(){
    public void modifyText(    ModifyEvent event){
      if (!isActive())       return;
      Rule soleRule=soleRule();
      if (soleRule == null)       return;
      String newValue=xpathField.getText().trim();
      String existingValue=soleRule.getProperty(XPathRule.XPATH_DESCRIPTOR).trim();
      if (StringUtil.areSemanticEquals(existingValue,newValue))       return;
      validate();
      soleRule.setProperty(XPathRule.XPATH_DESCRIPTOR,newValue);
      valueChanged(XPathRule.XPATH_DESCRIPTOR,newValue);
    }
  }
);
  versionLabel=new Label(panel,0);
  versionLabel.setText(SWTUtil.stringFor(StringKeys.PREF_RULEEDIT_LABEL_XPATH_VERSION));
  gridData=new GridData();
  gridData.horizontalSpan=1;
  gridData.grabExcessHorizontalSpace=false;
  versionLabel.setLayoutData(gridData);
  final EnumeratedProperty<String> ep=XPathRule.VERSION_DESCRIPTOR;
  xpathVersionField=new Combo(panel,SWT.READ_ONLY);
  gridData=new GridData();
  gridData.horizontalSpan=1;
  gridData.grabExcessHorizontalSpace=false;
  xpathVersionField.setLayoutData(gridData);
  xpathVersionField.setItems(SWTUtil.labelsIn(ep.choices(),0));
  xpathVersionField.addSelectionListener(new SelectionAdapter(){
    public void widgetSelected(    SelectionEvent e){
      Rule rule=soleRule();
      int selectionIdx=xpathVersionField.getSelectionIndex();
      Object newValue=ep.choices()[selectionIdx][1];
      if (newValue.equals(rule.getProperty(ep)))       return;
      rule.setProperty(ep,newValue);
    }
  }
);
  return panel;
}

Fixed version (ground truth):
public Control setupOn(Composite parent){
  GridData gridData;
  Composite panel=new Composite(parent,0);
  GridLayout layout=new GridLayout(2,false);
  panel.setLayout(layout);
  xpathField=newCodeField(panel);
  SyntaxManager.adapt(xpathField,"String_Node_Str",null);
  gridData=new GridData(GridData.FILL_BOTH);
  gridData.grabExcessHorizontalSpace=true;
  gridData.horizontalSpan=2;
  xpathField.setLayoutData(gridData);
  xpathField.addModifyListener(new ModifyListener(){
    public void modifyText(    ModifyEvent event){
      if (!isActive())       return;
      Rule soleRule=soleRule();
      if (soleRule == null)       return;
      String newValue=xpathField.getText().trim();
      String existingValue=soleRule.getProperty(XPathRule.XPATH_DESCRIPTOR).trim();
      if (StringUtil.areSemanticEquals(existingValue,newValue))       return;
      validate();
      soleRule.setProperty(XPathRule.XPATH_DESCRIPTOR,newValue);
      valueChanged(XPathRule.XPATH_DESCRIPTOR,newValue);
    }
  }
);
  versionLabel=new Label(panel,0);
  versionLabel.setText(SWTUtil.stringFor(StringKeys.PREF_RULEEDIT_LABEL_XPATH_VERSION));
  gridData=new GridData();
  gridData.horizontalSpan=1;
  gridData.grabExcessHorizontalSpace=false;
  versionLabel.setLayoutData(gridData);
  final EnumeratedProperty<String> ep=XPathRule.VERSION_DESCRIPTOR;
  xpathVersionField=new Combo(panel,SWT.READ_ONLY);
  gridData=new GridData();
  gridData.horizontalSpan=1;
  gridData.grabExcessHorizontalSpace=false;
  xpathVersionField.setLayoutData(gridData);
  xpathVersionField.setItems(SWTUtil.labelsIn(ep.choices(),0));
  xpathVersionField.addSelectionListener(new SelectionAdapter(){
    public void widgetSelected(    SelectionEvent e){
      Rule rule=soleRule();
      int selectionIdx=xpathVersionField.getSelectionIndex();
      String newValue=(String)ep.choices()[selectionIdx][1];
      if (newValue.equals(rule.getProperty(ep)))       return;
      rule.setProperty(ep,newValue);
    }
  }
);
  return panel;
}