Program: 76665
Project: 76665
Buggy source:
protected void okPressed(){
  try {
    String familyValue=getRawFontFamily();
    String sizeValue=getRawFontSize();
    int colorValue=DEUtil.getRGBInt(color.getRGB());
    int backColorValue=DEUtil.getRGBInt(backColor.getRGB());
    String italicValue=italic.getSelection() ? DesignChoiceConstants.FONT_STYLE_ITALIC : DesignChoiceConstants.FONT_STYLE_NORMAL;
    String weightValue=bold.getSelection() ? DesignChoiceConstants.FONT_WEIGHT_BOLD : DesignChoiceConstants.FONT_WEIGHT_NORMAL;
    String underlineValue=underline.getSelection() ? DesignChoiceConstants.TEXT_UNDERLINE_UNDERLINE : DesignChoiceConstants.TEXT_UNDERLINE_NONE;
    String lingthroughValue=linethrough.getSelection() ? DesignChoiceConstants.TEXT_LINE_THROUGH_LINE_THROUGH : DesignChoiceConstants.TEXT_LINE_THROUGH_NONE;
    if (handle == null) {
      HighlightRule rule=StructureFactory.createHighlightRule();
      rule.setProperty(HighlightRule.OPERATOR_MEMBER,DEUtil.resolveNull(getValueForOperator(operator.getText())));
      rule.setProperty(HighlightRule.VALUE1_MEMBER,DEUtil.resolveNull(value1.getText()));
      rule.setProperty(HighlightRule.VALUE2_MEMBER,DEUtil.resolveNull(value2.getText()));
      rule.setTestExpression(DEUtil.resolveNull(expression.getText()));
      if (!stylesChooser.getText().equals(NONE_DISPLAY_TEXT)) {
        rule.setStyle((StyleHandle)styles.get(stylesChooser.getText()));
      }
 else {
        if (color.getRGB() != null) {
          rule.setProperty(HighlightRule.COLOR_MEMBER,new Integer(colorValue));
        }
        if (backColor.getRGB() != null) {
          rule.setProperty(HighlightRule.BACKGROUND_COLOR_MEMBER,new Integer(backColorValue));
        }
        if (familyValue != null) {
          rule.setProperty(HighlightRule.FONT_FAMILY_MEMBER,familyValue);
        }
        if (sizeValue != null) {
          rule.setProperty(HighlightRule.FONT_SIZE_MEMBER,sizeValue);
        }
        if (isItalicChanged) {
          rule.setProperty(HighlightRule.FONT_STYLE_MEMBER,italicValue);
        }
        if (isBoldChanged) {
          rule.setProperty(HighlightRule.FONT_WEIGHT_MEMBER,weightValue);
        }
        if (isLinethroughChanged) {
          rule.setProperty(HighlightRule.TEXT_LINE_THROUGH_MEMBER,lingthroughValue);
        }
        if (isUnderlineChanged) {
          rule.setProperty(HighlightRule.TEXT_UNDERLINE_MEMBER,underlineValue);
        }
      }
      handle=provider.doAddItem(rule,handleCount);
    }
 else {
      handle.setTestExpression(DEUtil.resolveNull(expression.getText()));
      handle.setOperator(DEUtil.resolveNull(getValueForOperator(operator.getText())));
      handle.setValue1(DEUtil.resolveNull(value1.getText()));
      if (handle.getOperator().equals(DesignChoiceConstants.MAP_OPERATOR_BETWEEN) || handle.getOperator().equals(DesignChoiceConstants.MAP_OPERATOR_NOT_BETWEEN)) {
        handle.setValue2(DEUtil.resolveNull(value2.getText()));
      }
      if (!stylesChooser.getText().equals(NONE_DISPLAY_TEXT)) {
        if (handle.getStyle() == null) {
          handle.setStyle((StyleHandle)styles.get(stylesChooser.getText()));
        }
 else         if (!stylesChooser.getText().equals(handle.getStyle().getName())) {
          handle.setStyle((StyleHandle)styles.get(stylesChooser.getText()));
        }
        removeLocalStyleProperties();
      }
 else {
        handle.setStyle(null);
        handle.getFontFamilyHandle().setStringValue(DEUtil.resolveNull(familyValue));
        handle.getFontSize().setStringValue(DEUtil.resolveNull(sizeValue));
        if (color.getRGB() != null) {
          handle.getColor().setRGB(colorValue);
        }
 else {
          handle.getColor().setValue(null);
        }
        if (backColor.getRGB() != null) {
          handle.getBackgroundColor().setRGB(backColorValue);
        }
 else {
          handle.getBackgroundColor().setValue(null);
        }
        if (isItalicChanged) {
          handle.setFontStyle(italicValue);
        }
        if (isBoldChanged) {
          handle.setFontWeight(weightValue);
        }
        if (isUnderlineChanged) {
          handle.setTextUnderline(underlineValue);
        }
        if (isLinethroughChanged) {
          handle.setTextLineThrough(lingthroughValue);
        }
      }
    }
  }
 catch (  Exception e) {
    WidgetUtil.processError(getShell(),e);
  }
  super.okPressed();
}

Fixed version (ground truth):
protected void okPressed(){
  try {
    String familyValue=getRawFontFamily();
    String sizeValue=getRawFontSize();
    int colorValue=DEUtil.getRGBInt(color.getRGB());
    int backColorValue=DEUtil.getRGBInt(backColor.getRGB());
    String italicValue=italic.getSelection() ? DesignChoiceConstants.FONT_STYLE_ITALIC : DesignChoiceConstants.FONT_STYLE_NORMAL;
    String weightValue=bold.getSelection() ? DesignChoiceConstants.FONT_WEIGHT_BOLD : DesignChoiceConstants.FONT_WEIGHT_NORMAL;
    String underlineValue=underline.getSelection() ? DesignChoiceConstants.TEXT_UNDERLINE_UNDERLINE : DesignChoiceConstants.TEXT_UNDERLINE_NONE;
    String lingthroughValue=linethrough.getSelection() ? DesignChoiceConstants.TEXT_LINE_THROUGH_LINE_THROUGH : DesignChoiceConstants.TEXT_LINE_THROUGH_NONE;
    if (handle == null) {
      HighlightRule rule=StructureFactory.createHighlightRule();
      rule.setProperty(HighlightRule.OPERATOR_MEMBER,DEUtil.resolveNull(getValueForOperator(operator.getText())));
      if (value1.isVisible()) {
        rule.setProperty(HighlightRule.VALUE1_MEMBER,DEUtil.resolveNull(value1.getText()));
      }
      if (value2.isVisible()) {
        rule.setProperty(HighlightRule.VALUE2_MEMBER,DEUtil.resolveNull(value2.getText()));
      }
      rule.setTestExpression(DEUtil.resolveNull(expression.getText()));
      if (!stylesChooser.getText().equals(NONE_DISPLAY_TEXT)) {
        rule.setStyle((StyleHandle)styles.get(stylesChooser.getText()));
      }
 else {
        if (color.getRGB() != null) {
          rule.setProperty(HighlightRule.COLOR_MEMBER,new Integer(colorValue));
        }
        if (backColor.getRGB() != null) {
          rule.setProperty(HighlightRule.BACKGROUND_COLOR_MEMBER,new Integer(backColorValue));
        }
        if (familyValue != null) {
          rule.setProperty(HighlightRule.FONT_FAMILY_MEMBER,familyValue);
        }
        if (sizeValue != null) {
          rule.setProperty(HighlightRule.FONT_SIZE_MEMBER,sizeValue);
        }
        if (isItalicChanged) {
          rule.setProperty(HighlightRule.FONT_STYLE_MEMBER,italicValue);
        }
        if (isBoldChanged) {
          rule.setProperty(HighlightRule.FONT_WEIGHT_MEMBER,weightValue);
        }
        if (isLinethroughChanged) {
          rule.setProperty(HighlightRule.TEXT_LINE_THROUGH_MEMBER,lingthroughValue);
        }
        if (isUnderlineChanged) {
          rule.setProperty(HighlightRule.TEXT_UNDERLINE_MEMBER,underlineValue);
        }
      }
      handle=provider.doAddItem(rule,handleCount);
    }
 else {
      handle.setTestExpression(DEUtil.resolveNull(expression.getText()));
      handle.setOperator(DEUtil.resolveNull(getValueForOperator(operator.getText())));
      if (value1.isVisible()) {
        handle.setValue1(DEUtil.resolveNull(value1.getText()));
      }
      if (value2.isVisible()) {
        handle.setValue2(DEUtil.resolveNull(value2.getText()));
      }
      if (!stylesChooser.getText().equals(NONE_DISPLAY_TEXT)) {
        if (handle.getStyle() == null) {
          handle.setStyle((StyleHandle)styles.get(stylesChooser.getText()));
        }
 else         if (!stylesChooser.getText().equals(handle.getStyle().getName())) {
          handle.setStyle((StyleHandle)styles.get(stylesChooser.getText()));
        }
        removeLocalStyleProperties();
      }
 else {
        handle.setStyle(null);
        handle.getFontFamilyHandle().setStringValue(DEUtil.resolveNull(familyValue));
        handle.getFontSize().setStringValue(DEUtil.resolveNull(sizeValue));
        if (color.getRGB() != null) {
          handle.getColor().setRGB(colorValue);
        }
 else {
          handle.getColor().setValue(null);
        }
        if (backColor.getRGB() != null) {
          handle.getBackgroundColor().setRGB(backColorValue);
        }
 else {
          handle.getBackgroundColor().setValue(null);
        }
        if (isItalicChanged) {
          handle.setFontStyle(italicValue);
        }
        if (isBoldChanged) {
          handle.setFontWeight(weightValue);
        }
        if (isUnderlineChanged) {
          handle.setTextUnderline(underlineValue);
        }
        if (isLinethroughChanged) {
          handle.setTextLineThrough(lingthroughValue);
        }
      }
    }
  }
 catch (  Exception e) {
    WidgetUtil.processError(getShell(),e);
  }
  super.okPressed();
}