Program: 65688
Project: 65688
Buggy source:
public void initDialog(){
  cmbType.setItems(dataTypes);
  txtDisplayName.setFocus();
  if (isAggregate()) {
    initFunction();
    initFilter();
    initGroups();
  }
  if (isCreate) {
    if (isRef) {
      if (getBinding() == null) {
        for (Iterator iterator=getBindingHolder().getDataBindingReference().getColumnBindings().iterator(); iterator.hasNext(); ) {
          ComputedColumnHandle computedColumn=(ComputedColumnHandle)iterator.next();
          if (isAggregate()) {
            if (computedColumn.getAggregateFunction() == null || computedColumn.getAggregateFunction().equals("String_Node_Str"))             continue;
          }
 else {
            if (computedColumn.getAggregateFunction() != null && !computedColumn.getAggregateFunction().equals("String_Node_Str"))             continue;
          }
          cmbName.add(computedColumn.getName());
        }
      }
 else {
        setDisplayName(getBinding().getDisplayName());
        setDisplayNameID(getBinding().getDisplayNameID());
        setAllowExport(getBinding().allowExport());
        for (int i=0; i < DATA_TYPE_CHOICES.length; i++) {
          if (DATA_TYPE_CHOICES[i].getName().equals(getBinding().getDataType())) {
            setTypeSelect(DATA_TYPE_CHOICES[i].getDisplayName());
            break;
          }
        }
        setDataFieldExpression(getBinding());
      }
    }
 else {
      this.newBinding=StructureFactory.newComputedColumn(getBindingHolder(),isAggregate() ? DEFAULT_AGGREGATION_NAME : DEFAULT_ITEM_NAME);
      setName(this.newBinding.getName());
      setAllowExport(this.newBinding.allowExport());
      if (!isAggregate()) {
        setTypeSelect(getDataTypeDisplayName(DesignChoiceConstants.COLUMN_DATA_TYPE_STRING));
      }
    }
  }
 else {
    if (isRef) {
      int i=0;
      for (Iterator iterator=getBindingHolder().getDataBindingReference().getColumnBindings().iterator(); iterator.hasNext(); ) {
        ComputedColumnHandle computedColumn=(ComputedColumnHandle)iterator.next();
        if (isAggregate()) {
          if (computedColumn.getAggregateFunction() == null || computedColumn.getAggregateFunction().equals("String_Node_Str"))           continue;
        }
 else {
          if (computedColumn.getAggregateFunction() != null && !computedColumn.getAggregateFunction().equals("String_Node_Str"))           continue;
        }
        cmbName.add(computedColumn.getName());
        if (getBinding().getName().equals(computedColumn.getName()))         cmbName.select(i);
        i++;
      }
      setDisplayName(getBinding().getDisplayName());
      setDisplayNameID(getBinding().getDisplayNameID());
      setAllowExport(getBinding().allowExport());
      for (i=0; i < DATA_TYPE_CHOICES.length; i++) {
        if (DATA_TYPE_CHOICES[i].getName().equals(getBinding().getDataType())) {
          setTypeSelect(DATA_TYPE_CHOICES[i].getDisplayName());
          break;
        }
      }
      setDataFieldExpression(getBinding());
    }
 else {
      setName(getBinding().getName());
      setDisplayName(getBinding().getDisplayName());
      setDisplayNameID(getBinding().getDisplayNameID());
      setAllowExport(getBinding().allowExport());
      if (getBinding().getDataType() != null) {
        if (DATA_TYPE_CHOICE_SET.findChoice(getBinding().getDataType()) != null)         setTypeSelect(DATA_TYPE_CHOICE_SET.findChoice(getBinding().getDataType()).getDisplayName());
 else         cmbType.setText("String_Node_Str");
      }
      setDataFieldExpression(getBinding());
    }
  }
  if (!isCreate) {
    if (isRef) {
      this.cmbName.setEnabled(true);
    }
 else {
      this.txtName.setEnabled(false);
    }
  }
  validate();
  hasInitDialog=true;
}

Fixed version (ground truth):
public void initDialog(){
  cmbType.setItems(dataTypes);
  txtExpression.setFocus();
  if (isAggregate()) {
    initFunction();
    initFilter();
    initGroups();
  }
  if (isCreate) {
    if (isRef) {
      if (getBinding() == null) {
        for (Iterator iterator=getBindingHolder().getDataBindingReference().getColumnBindings().iterator(); iterator.hasNext(); ) {
          ComputedColumnHandle computedColumn=(ComputedColumnHandle)iterator.next();
          if (isAggregate()) {
            if (computedColumn.getAggregateFunction() == null || computedColumn.getAggregateFunction().equals("String_Node_Str"))             continue;
          }
 else {
            if (computedColumn.getAggregateFunction() != null && !computedColumn.getAggregateFunction().equals("String_Node_Str"))             continue;
          }
          cmbName.add(computedColumn.getName());
        }
      }
 else {
        setDisplayName(getBinding().getDisplayName());
        setDisplayNameID(getBinding().getDisplayNameID());
        setAllowExport(getBinding().allowExport());
        for (int i=0; i < DATA_TYPE_CHOICES.length; i++) {
          if (DATA_TYPE_CHOICES[i].getName().equals(getBinding().getDataType())) {
            setTypeSelect(DATA_TYPE_CHOICES[i].getDisplayName());
            break;
          }
        }
        setDataFieldExpression(getBinding());
      }
    }
 else {
      this.newBinding=StructureFactory.newComputedColumn(getBindingHolder(),isAggregate() ? DEFAULT_AGGREGATION_NAME : DEFAULT_ITEM_NAME);
      setName(this.newBinding.getName());
      setAllowExport(this.newBinding.allowExport());
      if (!isAggregate()) {
        setTypeSelect(getDataTypeDisplayName(DesignChoiceConstants.COLUMN_DATA_TYPE_STRING));
      }
    }
  }
 else {
    if (isRef) {
      int i=0;
      for (Iterator iterator=getBindingHolder().getDataBindingReference().getColumnBindings().iterator(); iterator.hasNext(); ) {
        ComputedColumnHandle computedColumn=(ComputedColumnHandle)iterator.next();
        if (isAggregate()) {
          if (computedColumn.getAggregateFunction() == null || computedColumn.getAggregateFunction().equals("String_Node_Str"))           continue;
        }
 else {
          if (computedColumn.getAggregateFunction() != null && !computedColumn.getAggregateFunction().equals("String_Node_Str"))           continue;
        }
        cmbName.add(computedColumn.getName());
        if (getBinding().getName().equals(computedColumn.getName()))         cmbName.select(i);
        i++;
      }
      setDisplayName(getBinding().getDisplayName());
      setDisplayNameID(getBinding().getDisplayNameID());
      setAllowExport(getBinding().allowExport());
      for (i=0; i < DATA_TYPE_CHOICES.length; i++) {
        if (DATA_TYPE_CHOICES[i].getName().equals(getBinding().getDataType())) {
          setTypeSelect(DATA_TYPE_CHOICES[i].getDisplayName());
          break;
        }
      }
      setDataFieldExpression(getBinding());
    }
 else {
      setName(getBinding().getName());
      setDisplayName(getBinding().getDisplayName());
      setDisplayNameID(getBinding().getDisplayNameID());
      setAllowExport(getBinding().allowExport());
      if (getBinding().getDataType() != null) {
        if (DATA_TYPE_CHOICE_SET.findChoice(getBinding().getDataType()) != null)         setTypeSelect(DATA_TYPE_CHOICE_SET.findChoice(getBinding().getDataType()).getDisplayName());
 else         cmbType.setText("String_Node_Str");
      }
      setDataFieldExpression(getBinding());
    }
  }
  if (!isCreate) {
    if (isRef) {
      this.cmbName.setEnabled(true);
    }
 else {
      this.txtName.setEnabled(false);
    }
  }
  validate();
  hasInitDialog=true;
}