Program: 67582
Project: 67582
Buggy source:
/** 
 * Updates using state of groups, if category expression and Y optional expression have related group on specified GroupDefinition, set <code>true</code> value to that item of group indexes array.
 * @param cm current chart model.
 * @param groupDefinitions grouping definition.
 * @throws ChartException
 */
private void updateEnabledGroupIndexes(Chart cm,List<IGroupDefinition> groupDefinitions) throws ChartException {
  faEnabledGroups=new boolean[fGroupCount];
  EList<SeriesDefinition> baseSDs=ChartUtil.getBaseSeriesDefinitions(cm);
  for (  SeriesDefinition sd : baseSDs) {
    if (sd.getDesignTimeSeries().getDataDefinition().isEmpty() || sd.getGrouping() == null || !sd.getGrouping().isEnabled()) {
      continue;
    }
    Query q=sd.getDesignTimeSeries().getDataDefinition().get(0);
    String expr=q.getDefinition();
    int index=getGroupIndex(expr,groupDefinitions);
    if (index >= 0) {
      faEnabledGroups[index]=true;
    }
  }
  List<SeriesDefinition> orthoSDs=ChartUtil.getAllOrthogonalSeriesDefinitions(cm);
  for (  SeriesDefinition sd : orthoSDs) {
    Query q=sd.getQuery();
    if (q == null || q.getDefinition() == null || "String_Node_Str".equals(q.getDefinition().trim())) {
      continue;
    }
    String expr=q.getDefinition();
    int index=getGroupIndex(expr,groupDefinitions);
    if (index >= 0) {
      faEnabledGroups[index]=true;
    }
  }
}

Fixed version (ground truth):
/** 
 * Updates using state of groups, if category expression and Y optional expression have related group on specified GroupDefinition, set <code>true</code> value to that item of group indexes array.
 * @param cm current chart model.
 * @param groupDefinitions grouping definition.
 * @throws ChartException
 */
private void updateEnabledGroupIndexes(Chart cm,List<IGroupDefinition> groupDefinitions) throws ChartException {
  faEnabledGroups=new boolean[fGroupCount];
  boolean isSharing=isSharing();
  EList<SeriesDefinition> baseSDs=ChartUtil.getBaseSeriesDefinitions(cm);
  for (  SeriesDefinition sd : baseSDs) {
    if (sd.getDesignTimeSeries().getDataDefinition().isEmpty() || sd.getGrouping() == null || !sd.getGrouping().isEnabled()) {
      continue;
    }
    Query q=sd.getDesignTimeSeries().getDataDefinition().get(0);
    String expr=q.getDefinition();
    int index=getGroupIndex(expr,groupDefinitions);
    if (index >= 0) {
      faEnabledGroups[index]=true;
      if (isSharing && sd.getGrouping() != null) {
        IGroupDefinition gd=groupDefinitions.get(index);
        setGroupingInterval(sd.getGrouping(),gd);
      }
    }
  }
  List<SeriesDefinition> orthoSDs=ChartUtil.getAllOrthogonalSeriesDefinitions(cm);
  for (  SeriesDefinition sd : orthoSDs) {
    Query q=sd.getQuery();
    if (q == null || q.getDefinition() == null || "String_Node_Str".equals(q.getDefinition().trim())) {
      continue;
    }
    String expr=q.getDefinition();
    int index=getGroupIndex(expr,groupDefinitions);
    if (index >= 0) {
      faEnabledGroups[index]=true;
      if (isSharing && sd.getQuery() != null) {
        IGroupDefinition gd=groupDefinitions.get(index);
        setGroupingInterval(sd.getQuery().getGrouping(),gd);
      }
    }
  }
}