Program: 71364
Project: 71364
Buggy source:
protected ScaleContext createSharedScale(IBaseResultSet baseResultSet) throws BirtException {
  if (baseResultSet instanceof IQueryResultSet) {
    Object min=baseResultSet.evaluate("String_Node_Str" + ChartReportItemUtil.QUERY_MIN + "String_Node_Str");
    Object max=baseResultSet.evaluate("String_Node_Str" + ChartReportItemUtil.QUERY_MAX + "String_Node_Str");
    return ScaleContext.createSimpleScale(min,max);
  }
 else   if (baseResultSet instanceof CubeResultSet) {
    try {
      List<EdgeCursor> edgeCursors=((CubeResultSet)baseResultSet).getCubeCursor().getOrdinateEdge();
      for (      EdgeCursor edge : edgeCursors) {
        edge.first();
      }
      Axis xAxis=(Axis)((ChartWithAxes)cm).getAxes().get(0);
      SeriesDefinition sdValue=(SeriesDefinition)((ChartWithAxes)cm).getOrthogonalAxes(xAxis,true)[0].getSeriesDefinitions().get(0);
      Query queryValue=(Query)sdValue.getDesignTimeSeries().getDataDefinition().get(0);
      String bindingValue=ChartXTabUtil.getBindingName(queryValue.getDefinition(),false);
      String maxBindingName=ChartReportItemConstants.QUERY_MAX + bindingValue;
      String minBindingName=ChartReportItemConstants.QUERY_MIN + bindingValue;
      Object min=baseResultSet.evaluate(ExpressionUtil.createJSDataExpression(minBindingName));
      Object max=baseResultSet.evaluate(ExpressionUtil.createJSDataExpression(maxBindingName));
      if (min != null && max != null) {
        return ScaleContext.createSimpleScale(min,max);
      }
    }
 catch (    OLAPException e) {
      logger.log(e);
    }
catch (    BirtException e) {
    }
catch (    EvaluatorException e) {
    }
  }
  return null;
}

Fixed version (ground truth):
protected ScaleContext createSharedScale(IBaseResultSet baseResultSet) throws BirtException {
  if (baseResultSet instanceof IQueryResultSet) {
    Object min=baseResultSet.evaluate("String_Node_Str" + ChartReportItemConstants.QUERY_MIN + "String_Node_Str");
    Object max=baseResultSet.evaluate("String_Node_Str" + ChartReportItemConstants.QUERY_MAX + "String_Node_Str");
    return ScaleContext.createSimpleScale(min,max);
  }
 else   if (baseResultSet instanceof CubeResultSet) {
    try {
      List<EdgeCursor> edgeCursors=((CubeResultSet)baseResultSet).getCubeCursor().getOrdinateEdge();
      for (      EdgeCursor edge : edgeCursors) {
        edge.first();
      }
      Axis xAxis=(Axis)((ChartWithAxes)cm).getAxes().get(0);
      SeriesDefinition sdValue=(SeriesDefinition)((ChartWithAxes)cm).getOrthogonalAxes(xAxis,true)[0].getSeriesDefinitions().get(0);
      Query queryValue=(Query)sdValue.getDesignTimeSeries().getDataDefinition().get(0);
      String bindingValue=ChartXTabUtil.getBindingName(queryValue.getDefinition(),false);
      String maxBindingName=ChartReportItemConstants.QUERY_MAX + bindingValue;
      String minBindingName=ChartReportItemConstants.QUERY_MIN + bindingValue;
      Object min=baseResultSet.evaluate(ExpressionUtil.createJSDataExpression(minBindingName));
      Object max=baseResultSet.evaluate(ExpressionUtil.createJSDataExpression(maxBindingName));
      if (min != null && max != null) {
        return ScaleContext.createSimpleScale(min,max);
      }
    }
 catch (    OLAPException e) {
      logger.log(e);
    }
catch (    BirtException e) {
    }
catch (    EvaluatorException e) {
    }
  }
  return null;
}