Program: 67122
Project: 67122
Buggy source:
private Chart getConvertedChart(Chart currentChart,String sNewSubType,String sNewDimension){
  Chart helperModel=currentChart.copyInstance();
  helperModel.eAdapters().addAll(currentChart.eAdapters());
  ChartCacheManager.getInstance().cacheSeries(ChartUIUtil.getAllOrthogonalSeriesDefinitions(helperModel));
  if (currentChart instanceof ChartWithAxes) {
    if (!ChartPreviewPainter.isLivePreviewActive()) {
      helperModel.setSampleData(getConvertedSampleData(helperModel.getSampleData(),(((ChartWithAxes)currentChart).getAxes().get(0)).getType(),AxisType.LINEAR_LITERAL));
    }
    currentChart=ChartWithoutAxesImpl.create();
    copyChartProperties(helperModel,currentChart);
    currentChart.setType(Radar.TYPE_LITERAL);
    currentChart.setSubType(sNewSubType);
    currentChart.setDimension(getDimensionFor(sNewDimension));
    ((ChartWithoutAxes)currentChart).getSeriesDefinitions().add((((ChartWithAxes)helperModel).getAxes().get(0)).getSeriesDefinitions().get(0));
    Vector<SeriesDefinition> vOSD=new Vector<SeriesDefinition>();
    Axis primaryOrthogonalAxis=((ChartWithAxes)helperModel).getAxes().get(0).getAssociatedAxes().get(0);
    EList<SeriesDefinition> osd=primaryOrthogonalAxis.getSeriesDefinitions();
    for (int j=0; j < osd.size(); j++) {
      SeriesDefinition sd=osd.get(j);
      Series series=sd.getDesignTimeSeries();
      sd.getSeries().clear();
      sd.getSeries().add(getConvertedSeries(series,j));
      vOSD.add(sd);
    }
    (((ChartWithoutAxes)currentChart).getSeriesDefinitions().get(0)).getSeriesDefinitions().clear();
    (((ChartWithoutAxes)currentChart).getSeriesDefinitions().get(0)).getSeriesDefinitions().addAll(vOSD);
    currentChart.getLegend().setItemType(LegendItemType.SERIES_LITERAL);
    currentChart.getTitle().getLabel().getCaption().setValue(getDefaultTitle());
  }
 else   if (currentChart instanceof ChartWithoutAxes) {
    if (currentChart.getType().equals(Radar.TYPE_LITERAL)) {
      currentChart.setSubType(sNewSubType);
      if (!currentChart.getDimension().equals(getDimensionFor(sNewDimension))) {
        currentChart.setDimension(getDimensionFor(sNewDimension));
      }
    }
 else {
      currentChart=ChartWithoutAxesImpl.create();
      copyChartProperties(helperModel,currentChart);
      currentChart.setType(Radar.TYPE_LITERAL);
      currentChart.setSubType(sNewSubType);
      currentChart.setDimension(getDimensionFor(sNewDimension));
      ((ChartWithoutAxes)currentChart).getSeriesDefinitions().clear();
      ((ChartWithoutAxes)currentChart).getSeriesDefinitions().add(((ChartWithoutAxes)helperModel).getSeriesDefinitions().get(0));
      EList<SeriesDefinition> seriesdefinitions=(((ChartWithoutAxes)currentChart).getSeriesDefinitions().get(0)).getSeriesDefinitions();
      for (int j=0; j < seriesdefinitions.size(); j++) {
        Series series=seriesdefinitions.get(j).getDesignTimeSeries();
        series=getConvertedSeries(series,j);
        seriesdefinitions.get(j).getSeries().clear();
        seriesdefinitions.get(j).getSeries().add(series);
      }
      currentChart.getLegend().setItemType(LegendItemType.SERIES_LITERAL);
      currentChart.getTitle().getLabel().getCaption().setValue(getDefaultTitle());
    }
  }
 else {
    return null;
  }
  return currentChart;
}

Fixed version (ground truth):
private Chart getConvertedChart(Chart currentChart,String sNewSubType,String sNewDimension){
  Chart helperModel=currentChart.copyInstance();
  helperModel.eAdapters().addAll(currentChart.eAdapters());
  ChartCacheManager.getInstance().cacheSeries(ChartUIUtil.getAllOrthogonalSeriesDefinitions(helperModel));
  IChartType oldType=ChartUIUtil.getChartType(currentChart.getType());
  if (currentChart instanceof ChartWithAxes) {
    if (!ChartPreviewPainter.isLivePreviewActive()) {
      helperModel.setSampleData(getConvertedSampleData(helperModel.getSampleData(),(((ChartWithAxes)currentChart).getAxes().get(0)).getType(),AxisType.LINEAR_LITERAL));
    }
    currentChart=ChartWithoutAxesImpl.create();
    copyChartProperties(helperModel,currentChart);
    currentChart.setType(Radar.TYPE_LITERAL);
    currentChart.setSubType(sNewSubType);
    currentChart.setDimension(getDimensionFor(sNewDimension));
    ((ChartWithoutAxes)currentChart).getSeriesDefinitions().add((((ChartWithAxes)helperModel).getAxes().get(0)).getSeriesDefinitions().get(0));
    Vector<SeriesDefinition> vOSD=new Vector<SeriesDefinition>();
    Axis primaryOrthogonalAxis=((ChartWithAxes)helperModel).getAxes().get(0).getAssociatedAxes().get(0);
    EList<SeriesDefinition> osd=primaryOrthogonalAxis.getSeriesDefinitions();
    for (int j=0; j < osd.size(); j++) {
      SeriesDefinition sd=osd.get(j);
      Series series=sd.getDesignTimeSeries();
      sd.getSeries().clear();
      sd.getSeries().add(getConvertedSeries(series,j));
      vOSD.add(sd);
    }
    (((ChartWithoutAxes)currentChart).getSeriesDefinitions().get(0)).getSeriesDefinitions().clear();
    (((ChartWithoutAxes)currentChart).getSeriesDefinitions().get(0)).getSeriesDefinitions().addAll(vOSD);
    currentChart.getLegend().setItemType(LegendItemType.SERIES_LITERAL);
    Text title=currentChart.getTitle().getLabel().getCaption();
    if (title.getValue() == null || title.getValue().trim().length() == 0 || title.getValue().trim().equals(oldType.getDefaultTitle().trim())) {
      title.setValue(getDefaultTitle());
    }
  }
 else   if (currentChart instanceof ChartWithoutAxes) {
    if (currentChart.getType().equals(Radar.TYPE_LITERAL)) {
      currentChart.setSubType(sNewSubType);
      if (!currentChart.getDimension().equals(getDimensionFor(sNewDimension))) {
        currentChart.setDimension(getDimensionFor(sNewDimension));
      }
    }
 else {
      currentChart=ChartWithoutAxesImpl.create();
      copyChartProperties(helperModel,currentChart);
      currentChart.setType(Radar.TYPE_LITERAL);
      currentChart.setSubType(sNewSubType);
      currentChart.setDimension(getDimensionFor(sNewDimension));
      ((ChartWithoutAxes)currentChart).getSeriesDefinitions().clear();
      ((ChartWithoutAxes)currentChart).getSeriesDefinitions().add(((ChartWithoutAxes)helperModel).getSeriesDefinitions().get(0));
      EList<SeriesDefinition> seriesdefinitions=(((ChartWithoutAxes)currentChart).getSeriesDefinitions().get(0)).getSeriesDefinitions();
      for (int j=0; j < seriesdefinitions.size(); j++) {
        Series series=seriesdefinitions.get(j).getDesignTimeSeries();
        series=getConvertedSeries(series,j);
        seriesdefinitions.get(j).getSeries().clear();
        seriesdefinitions.get(j).getSeries().add(series);
      }
      currentChart.getLegend().setItemType(LegendItemType.SERIES_LITERAL);
      Text title=currentChart.getTitle().getLabel().getCaption();
      if (title.getValue() == null || title.getValue().trim().length() == 0 || title.getValue().trim().equals(oldType.getDefaultTitle().trim())) {
        title.setValue(getDefaultTitle());
      }
    }
  }
 else {
    return null;
  }
  return currentChart;
}