Program: 68253
Project: 68253
Buggy source:
private String getTooltipForDataText(String queryText){
  if (isTableSharedBinding()) {
    int index=cmbDefinition.getSelectionIndex();
    if (index >= 0) {
      ColumnBindingInfo cbi=(ColumnBindingInfo)((Object[])cmbDefinition.getData())[index];
      if (cbi.getColumnType() == ColumnBindingInfo.GROUP_COLUMN || cbi.getColumnType() == ColumnBindingInfo.AGGREGATE_COLUMN) {
        return cbi.getTooltip();
      }
    }
  }
  if (queryText.trim().length() == 0) {
    return tooltipWhenBlank;
  }
  if (ChartUIConstants.QUERY_VALUE.equals(queryType) && context.getDataServiceProvider().checkState(IDataServiceProvider.HAS_DATA_SET)) {
    SeriesDefinition baseSd=ChartUIUtil.getBaseSeriesDefinitions(context.getModel()).get(0);
    SeriesGrouping sg=null;
    boolean baseEnabled=baseSd.getGrouping() != null && baseSd.getGrouping().isEnabled();
    if (baseEnabled) {
      sg=baseSd.getGrouping();
      if (seriesdefinition.getGrouping() != null && seriesdefinition.getGrouping().isEnabled()) {
        sg=seriesdefinition.getGrouping();
      }
    }
    if (query.getGrouping() != null && query.getGrouping().isEnabled()) {
      sg=query.getGrouping();
    }
    if (sg != null) {
      StringBuffer sbuf=new StringBuffer();
      sbuf.append(sg.getAggregateExpression());
      sbuf.append("String_Node_Str");
      sbuf.append(queryText);
      IAggregateFunction aFunc=null;
      try {
        aFunc=PluginSettings.instance().getAggregateFunction(sg.getAggregateExpression());
      }
 catch (      ChartException e) {
      }
      if (!baseEnabled && aFunc != null && aFunc.getType() == IAggregateFunction.SUMMARY_AGGR) {
        return queryText;
      }
      int count=aFunc != null ? aFunc.getParametersCount() : sg.getAggregateParameters().size();
      for (int i=0; i < sg.getAggregateParameters().size(); i++) {
        if (i < count) {
          sbuf.append("String_Node_Str");
          sbuf.append(sg.getAggregateParameters().get(i));
        }
      }
      sbuf.append("String_Node_Str");
      return sbuf.toString();
    }
  }
  return queryText;
}

Fixed version (ground truth):
private String getTooltipForDataText(String queryText){
  if (isTableSharedBinding()) {
    int index=cmbDefinition.getSelectionIndex();
    if (index >= 0 && cmbDefinition.getData() != null) {
      ColumnBindingInfo cbi=(ColumnBindingInfo)((Object[])cmbDefinition.getData())[index];
      if (cbi.getColumnType() == ColumnBindingInfo.GROUP_COLUMN || cbi.getColumnType() == ColumnBindingInfo.AGGREGATE_COLUMN) {
        return cbi.getTooltip();
      }
    }
  }
  if (queryText.trim().length() == 0) {
    return tooltipWhenBlank;
  }
  if (ChartUIConstants.QUERY_VALUE.equals(queryType) && context.getDataServiceProvider().checkState(IDataServiceProvider.HAS_DATA_SET)) {
    SeriesDefinition baseSd=ChartUIUtil.getBaseSeriesDefinitions(context.getModel()).get(0);
    SeriesGrouping sg=null;
    boolean baseEnabled=baseSd.getGrouping() != null && baseSd.getGrouping().isEnabled();
    if (baseEnabled) {
      sg=baseSd.getGrouping();
      if (seriesdefinition.getGrouping() != null && seriesdefinition.getGrouping().isEnabled()) {
        sg=seriesdefinition.getGrouping();
      }
    }
    if (query.getGrouping() != null && query.getGrouping().isEnabled()) {
      sg=query.getGrouping();
    }
    if (sg != null) {
      StringBuffer sbuf=new StringBuffer();
      sbuf.append(sg.getAggregateExpression());
      sbuf.append("String_Node_Str");
      sbuf.append(queryText);
      IAggregateFunction aFunc=null;
      try {
        aFunc=PluginSettings.instance().getAggregateFunction(sg.getAggregateExpression());
      }
 catch (      ChartException e) {
      }
      if (!baseEnabled && aFunc != null && aFunc.getType() == IAggregateFunction.SUMMARY_AGGR) {
        return queryText;
      }
      int count=aFunc != null ? aFunc.getParametersCount() : sg.getAggregateParameters().size();
      for (int i=0; i < sg.getAggregateParameters().size(); i++) {
        if (i < count) {
          sbuf.append("String_Node_Str");
          sbuf.append(sg.getAggregateParameters().get(i));
        }
      }
      sbuf.append("String_Node_Str");
      return sbuf.toString();
    }
  }
  return queryText;
}