Program: 64982
Project: 64982
Buggy source:
public IBinding adaptBinding(ComputedColumnHandle handle,ExpressionLocation el) throws AdapterException {
  if (el.equals(ExpressionLocation.TABLE)) {
    return this.adaptBinding(handle);
  }
 else {
    Binding binding=null;
    try {
      binding=new Binding(handle.getName());
      binding.setAggrFunction(handle.getAggregateFunction() == null ? null : DataAdapterUtil.adaptModelAggregationType(handle.getAggregateFunction()));
      binding.setDisplayName(handle.getExternalizedValue(org.eclipse.birt.report.model.api.elements.structures.ComputedColumn.DISPLAY_NAME_ID_MEMBER,org.eclipse.birt.report.model.api.elements.structures.ComputedColumn.DISPLAY_NAME_MEMBER,this.context.getDataEngineContext().getLocale()));
      binding.setExportable(handle.allowExport());
      if (handle.getElementHandle() instanceof ReportItemHandle && LinkedDataSetUtil.bindToLinkedDataSet(((ReportItemHandle)handle.getElementHandle()))) {
        binding.setExpression(adaptExpression((Expression)handle.getExpressionProperty(org.eclipse.birt.report.model.api.elements.structures.ComputedColumn.EXPRESSION_MEMBER).getValue(),ExpressionLocation.TABLE));
      }
 else {
        binding.setExpression(adaptExpression((Expression)handle.getExpressionProperty(org.eclipse.birt.report.model.api.elements.structures.ComputedColumn.EXPRESSION_MEMBER).getValue(),ExpressionLocation.CUBE));
      }
      binding.setDataType(DataAdapterUtil.adaptModelDataType(handle.getDataType()));
      if (handle.getFilterExpression() != null) {
        binding.setFilter(adaptExpression((Expression)handle.getExpressionProperty(org.eclipse.birt.report.model.api.elements.structures.ComputedColumn.FILTER_MEMBER).getValue(),ExpressionLocation.CUBE));
      }
      for (Iterator argItr=handle.argumentsIterator(); argItr.hasNext(); ) {
        AggregationArgumentHandle aah=(AggregationArgumentHandle)argItr.next();
        binding.addArgument(aah.getName(),adaptExpression((Expression)aah.getExpressionProperty(AggregationArgument.VALUE_MEMBER).getValue(),ExpressionLocation.CUBE));
      }
    }
 catch (    Exception e) {
      logger.log(Level.WARNING,e.getMessage(),e);
      return null;
    }
    try {
      binding.setTimeFunction(adaptTimeFunction(handle));
    }
 catch (    BirtException ex) {
      throw new AdapterException(ex.getLocalizedMessage());
    }
    return binding;
  }
}

Fixed version (ground truth):
public IBinding adaptBinding(ComputedColumnHandle handle,ExpressionLocation el) throws AdapterException {
  if (el.equals(ExpressionLocation.TABLE)) {
    return this.adaptBinding(handle);
  }
 else {
    Binding binding=null;
    try {
      binding=new Binding(handle.getName());
      binding.setAggrFunction(handle.getAggregateFunction() == null ? null : DataAdapterUtil.adaptModelAggregationType(handle.getAggregateFunction()));
      binding.setDisplayName(handle.getExternalizedValue(org.eclipse.birt.report.model.api.elements.structures.ComputedColumn.DISPLAY_NAME_ID_MEMBER,org.eclipse.birt.report.model.api.elements.structures.ComputedColumn.DISPLAY_NAME_MEMBER,this.context.getDataEngineContext().getLocale()));
      binding.setExportable(handle.allowExport());
      ExpressionLocation location=el;
      if (handle.getElementHandle() instanceof ReportItemHandle && LinkedDataSetUtil.bindToLinkedDataSet(((ReportItemHandle)handle.getElementHandle()))) {
        location=ExpressionLocation.TABLE;
      }
      binding.setExpression(adaptExpression((Expression)handle.getExpressionProperty(org.eclipse.birt.report.model.api.elements.structures.ComputedColumn.EXPRESSION_MEMBER).getValue(),location));
      if (handle.getFilterExpression() != null) {
        binding.setFilter(adaptExpression((Expression)handle.getExpressionProperty(org.eclipse.birt.report.model.api.elements.structures.ComputedColumn.FILTER_MEMBER).getValue(),location));
      }
      binding.setDataType(DataAdapterUtil.adaptModelDataType(handle.getDataType()));
      for (Iterator argItr=handle.argumentsIterator(); argItr.hasNext(); ) {
        AggregationArgumentHandle aah=(AggregationArgumentHandle)argItr.next();
        binding.addArgument(aah.getName(),adaptExpression((Expression)aah.getExpressionProperty(AggregationArgument.VALUE_MEMBER).getValue(),location));
      }
    }
 catch (    Exception e) {
      logger.log(Level.WARNING,e.getMessage(),e);
      return null;
    }
    try {
      binding.setTimeFunction(adaptTimeFunction(handle));
    }
 catch (    BirtException ex) {
      throw new AdapterException(ex.getLocalizedMessage());
    }
    return binding;
  }
}