Program: 67581
Project: 67581
Buggy source:
/** 
 * Prepare data expression evaluator for query share with table.
 * @param cm
 * @param columnExpression
 * @return
 * @throws BirtException
 * @throws AdapterException
 * @throws DataException
 * @throws ChartException
 */
@SuppressWarnings("String_Node_Str") private IDataRowExpressionEvaluator createShareBindingEvaluator(Chart cm,List<String> columnExpression) throws BirtException, AdapterException, DataException, ChartException {
  IQueryResults actualResultSet;
  QueryDefinition queryDefn=new QueryDefinition();
  int maxRow=getMaxRow();
  queryDefn.setMaxRows(maxRow);
  final Map<String,String> bindingExprsMap=new HashMap<String,String>();
  Iterator<ComputedColumnHandle> iterator=ChartReportItemUtil.getColumnDataBindings(itemHandle);
  List<ComputedColumnHandle> columnList=new ArrayList<ComputedColumnHandle>();
  while (iterator.hasNext()) {
    columnList.add(iterator.next());
  }
  generateShareBindingsWithTable(getPreviewHeadersInfo(columnList),queryDefn,session,bindingExprsMap);
  addCustomExpressions(queryDefn,cm,columnExpression,bindingExprsMap);
  Iterator<?> filtersIterator=getPropertyIterator(itemHandle.getPropertyHandle(ExtendedItemHandle.FILTER_PROP));
  if (filtersIterator != null) {
    while (filtersIterator.hasNext()) {
      IFilterDefinition filter=session.getModelAdaptor().adaptFilter((FilterConditionHandle)filtersIterator.next());
      queryDefn.addFilter(filter);
    }
  }
  actualResultSet=executeSharedQuery(queryDefn);
  if (actualResultSet != null) {
    return new BaseGroupedQueryResultSetEvaluator(actualResultSet.getResultIterator(),ChartReportItemUtil.isSetSummaryAggregation(cm),cm){
      public Object evaluate(      String expression){
        try {
          String newExpr=bindingExprsMap.get(expression);
          if (newExpr != null) {
            return fResultIterator.getValue(newExpr);
          }
 else {
            return fResultIterator.getValue(expression);
          }
        }
 catch (        BirtException e) {
          sLogger.log(e);
        }
        return null;
      }
    }
;
  }
  return null;
}

Fixed version (ground truth):
/** 
 * Prepare data expression evaluator for query share with table.
 * @param cm
 * @param columnExpression
 * @return
 * @throws BirtException
 * @throws AdapterException
 * @throws DataException
 * @throws ChartException
 */
@SuppressWarnings("String_Node_Str") private IDataRowExpressionEvaluator createShareBindingEvaluator(Chart cm,List<String> columnExpression) throws BirtException, AdapterException, DataException, ChartException {
  IQueryResults actualResultSet;
  QueryDefinition queryDefn=new QueryDefinition();
  int maxRow=getMaxRow();
  queryDefn.setMaxRows(maxRow);
  final Map<String,String> bindingExprsMap=new HashMap<String,String>();
  Iterator<ComputedColumnHandle> iterator=ChartReportItemUtil.getColumnDataBindings(itemHandle);
  List<ComputedColumnHandle> columnList=new ArrayList<ComputedColumnHandle>();
  while (iterator.hasNext()) {
    columnList.add(iterator.next());
  }
  generateShareBindingsWithTable(getPreviewHeadersInfo(columnList),queryDefn,session,bindingExprsMap);
  addCustomExpressions(queryDefn,cm,columnExpression,bindingExprsMap);
  Iterator<?> filtersIterator=getPropertyIterator(itemHandle.getPropertyHandle(ExtendedItemHandle.FILTER_PROP));
  if (filtersIterator != null) {
    while (filtersIterator.hasNext()) {
      IFilterDefinition filter=session.getModelAdaptor().adaptFilter((FilterConditionHandle)filtersIterator.next());
      queryDefn.addFilter(filter);
    }
  }
  actualResultSet=executeSharedQuery(queryDefn);
  if (actualResultSet != null) {
    return new BaseGroupedQueryResultSetEvaluator(actualResultSet.getResultIterator(),ChartReportItemUtil.isSetSummaryAggregation(cm),cm,itemHandle){
      public Object evaluate(      String expression){
        try {
          String newExpr=bindingExprsMap.get(expression);
          if (newExpr != null) {
            return fResultIterator.getValue(newExpr);
          }
 else {
            return fResultIterator.getValue(expression);
          }
        }
 catch (        BirtException e) {
          sLogger.log(e);
        }
        return null;
      }
    }
;
  }
  return null;
}