Program: 65559
Project: 65559
Buggy source:
private void initMeasureDialog(){
  typeCombo.setItems(getDataTypeDisplayNames());
  functionCombo.setItems(getFunctionDisplayNames());
  if (!isEdit) {
    if (typeCombo.getItemCount() > 0) {
      typeCombo.select(0);
    }
    if (functionCombo.getItemCount() > 0) {
      functionCombo.select(0);
    }
    handleFunctionSelectEvent();
  }
 else {
    try {
      functionCombo.setText(getFunctionDisplayName(DataAdapterUtil.adaptModelAggregationType(input.getFunction())) == null ? "String_Node_Str" : getFunctionDisplayName(DataAdapterUtil.adaptModelAggregationType(input.getFunction())));
    }
 catch (    AdapterException e) {
      ExceptionUtil.handle(e);
    }
    ExpressionButtonUtil.initExpressionButtonControl(expressionText,input,MeasureHandle.MEASURE_EXPRESSION_PROP);
    nameText.setText(input.getName() == null ? "String_Node_Str" : input.getName());
    handleFunctionSelectEvent();
    typeCombo.setText(getDataTypeDisplayName(input.getDataType()) == null ? "String_Node_Str" : getDataTypeDisplayName(input.getDataType()));
    derivedMeasureBtn.setSelection(input.isCalculated());
    updateDerivedMeasureStatus();
  }
  if (formatHelper != null) {
    if (typeCombo.getSelectionIndex() > -1) {
      formatHelper.setProperty(BuilderConstants.FORMAT_VALUE_TYPE,getDataTypeNames()[typeCombo.getSelectionIndex()]);
    }
    formatHelper.update(true);
  }
  if (alignmentHelper != null) {
    if (input.getAlignment() != null) {
      alignmentHelper.setProperty(BuilderConstants.ALIGNMENT_VALUE,input.getAlignment());
    }
 else     if (!isEdit && input.getDataType() != null) {
      if (isNumber(input.getDataType())) {
        alignmentHelper.setProperty(BuilderConstants.ALIGNMENT_VALUE,DesignChoiceConstants.TEXT_ALIGN_RIGHT);
      }
 else {
        alignmentHelper.setProperty(BuilderConstants.ALIGNMENT_VALUE,DesignChoiceConstants.TEXT_ALIGN_LEFT);
      }
    }
    alignmentHelper.update(true);
  }
}

Fixed version (ground truth):
private void initMeasureDialog(){
  typeCombo.setItems(getDataTypeDisplayNames());
  functionCombo.setItems(getFunctionDisplayNames());
  if (!isEdit) {
    if (typeCombo.getItemCount() > 0) {
      typeCombo.select(0);
    }
    if (functionCombo.getItemCount() > 0) {
      functionCombo.select(0);
    }
    handleFunctionSelectEvent();
  }
 else {
    try {
      functionCombo.setText(getFunctionDisplayName(DataAdapterUtil.adaptModelAggregationType(input.getFunction())) == null ? "String_Node_Str" : getFunctionDisplayName(DataAdapterUtil.adaptModelAggregationType(input.getFunction())));
    }
 catch (    AdapterException e) {
      ExceptionUtil.handle(e);
    }
    ExpressionButtonUtil.initExpressionButtonControl(expressionText,input,MeasureHandle.MEASURE_EXPRESSION_PROP);
    nameText.setText(input.getName() == null ? "String_Node_Str" : input.getName());
    displayNameText.setText(input.getDisplayName() == null ? "String_Node_Str" : input.getDisplayName());
    handleFunctionSelectEvent();
    typeCombo.setText(getDataTypeDisplayName(input.getDataType()) == null ? "String_Node_Str" : getDataTypeDisplayName(input.getDataType()));
    derivedMeasureBtn.setSelection(input.isCalculated());
    updateDerivedMeasureStatus();
  }
  if (formatHelper != null) {
    if (typeCombo.getSelectionIndex() > -1) {
      formatHelper.setProperty(BuilderConstants.FORMAT_VALUE_TYPE,getDataTypeNames()[typeCombo.getSelectionIndex()]);
    }
    formatHelper.update(true);
  }
  if (alignmentHelper != null) {
    if (input.getAlignment() != null) {
      alignmentHelper.setProperty(BuilderConstants.ALIGNMENT_VALUE,input.getAlignment());
    }
 else     if (!isEdit && input.getDataType() != null) {
      if (isNumber(input.getDataType())) {
        alignmentHelper.setProperty(BuilderConstants.ALIGNMENT_VALUE,DesignChoiceConstants.TEXT_ALIGN_RIGHT);
      }
 else {
        alignmentHelper.setProperty(BuilderConstants.ALIGNMENT_VALUE,DesignChoiceConstants.TEXT_ALIGN_LEFT);
      }
    }
    alignmentHelper.update(true);
  }
}