Program: 67209
Project: 67209
Buggy source:
public void handleEvent(Event event){
  try {
    List<ComputedColumn> columnList=new ArrayList<ComputedColumn>();
    CubeHandle cubeHandle=ChartCubeUtil.getBindingCube(inputElement);
    if (cubeHandle != null) {
      if (inputElement.getCube() == null) {
        refreshBindingTable();
      }
 else {
        List<LevelHandle> levels=ChartCubeUtil.getAllLevels(cubeHandle);
        for (Iterator<LevelHandle> iter=levels.iterator(); iter.hasNext(); ) {
          LevelHandle levelHandle=iter.next();
          ComputedColumn column=StructureFactory.newComputedColumn(inputElement,ChartCubeUtil.createLevelBindingName(levelHandle));
          column.setDataType(levelHandle.getDataType());
          column.setExpression(ChartCubeUtil.createDimensionExpression(levelHandle));
          columnList.add(column);
        }
        List<MeasureHandle> measures=ChartCubeUtil.getAllMeasures(cubeHandle);
        for (Iterator<MeasureHandle> iter=measures.iterator(); iter.hasNext(); ) {
          MeasureHandle measureHandle=iter.next();
          ComputedColumn column=StructureFactory.newComputedColumn(inputElement,ChartCubeUtil.createMeasureBindingName(measureHandle));
          column.setDataType(measureHandle.getDataType());
          column.setExpression(ExpressionUtil.createJSMeasureExpression(measureHandle.getName()));
          column.setAggregateFunction(measureHandle.getFunction());
          columnList.add(column);
        }
        if (columnList.size() > 0) {
          for (Iterator<ComputedColumn> iter=columnList.iterator(); iter.hasNext(); ) {
            DEUtil.addColumn(inputElement,iter.next(),false);
          }
        }
      }
    }
 else {
      DataSetHandle dataSetHandle=inputElement.getDataSet();
      if (dataSetHandle == null) {
        refreshBindingTable();
      }
 else {
        List resultSetColumnList=DataUtil.getColumnList(dataSetHandle);
        for (Iterator iterator=resultSetColumnList.iterator(); iterator.hasNext(); ) {
          ResultSetColumnHandle resultSetColumn=(ResultSetColumnHandle)iterator.next();
          ComputedColumn column=StructureFactory.newComputedColumn(inputElement,resultSetColumn.getColumnName());
          column.setDataType(resultSetColumn.getDataType());
          column.setExpression(DEUtil.getExpression(resultSetColumn));
          columnList.add(column);
        }
        if (columnList.size() > 0) {
          for (Iterator<ComputedColumn> iter=columnList.iterator(); iter.hasNext(); ) {
            DEUtil.addColumn(inputElement,iter.next(),false);
          }
        }
      }
    }
    bindingTable.setInput(inputElement);
  }
 catch (  SemanticException e) {
    WizardBase.displayException(e);
  }
}

Fixed version (ground truth):
public void handleEvent(Event event){
  try {
    List<ComputedColumn> columnList=new ArrayList<ComputedColumn>();
    CubeHandle cubeHandle=ChartCubeUtil.getBindingCube(inputElement);
    if (cubeHandle != null) {
      if (inputElement.getCube() == null) {
        refreshBindingTable();
      }
 else {
        inputElement.getColumnBindings().clearValue();
        columnList=ChartXTabUIUtil.generateComputedColumns((ExtendedItemHandle)inputElement,cubeHandle);
        if (columnList.size() > 0) {
          for (Iterator<ComputedColumn> iter=columnList.iterator(); iter.hasNext(); ) {
            DEUtil.addColumn(inputElement,iter.next(),false);
          }
        }
      }
    }
 else {
      DataSetHandle dataSetHandle=inputElement.getDataSet();
      if (dataSetHandle == null) {
        refreshBindingTable();
      }
 else {
        List resultSetColumnList=DataUtil.getColumnList(dataSetHandle);
        for (Iterator iterator=resultSetColumnList.iterator(); iterator.hasNext(); ) {
          ResultSetColumnHandle resultSetColumn=(ResultSetColumnHandle)iterator.next();
          ComputedColumn column=StructureFactory.newComputedColumn(inputElement,resultSetColumn.getColumnName());
          column.setDataType(resultSetColumn.getDataType());
          column.setExpression(DEUtil.getExpression(resultSetColumn));
          columnList.add(column);
        }
        if (columnList.size() > 0) {
          for (Iterator<ComputedColumn> iter=columnList.iterator(); iter.hasNext(); ) {
            DEUtil.addColumn(inputElement,iter.next(),false);
          }
        }
      }
    }
    bindingTable.setInput(inputElement);
  }
 catch (  SemanticException e) {
    WizardBase.displayException(e);
  }
}