Program: 66054
Project: 66054
Buggy source:
/** 
 * Adds an orthogonal axis. Ensures only one event is fired.
 * @param chartModel chart model
 */
public static void addAxis(final ChartWithAxes chartModel){
  ChartAdapter.beginIgnoreNotifications();
  Axis xAxis=chartModel.getAxes().get(0);
  Axis yAxis=xAxis.getAssociatedAxes().get(0);
  Axis overlayAxis=yAxis.copyInstance();
  overlayAxis.setAligned(false);
  overlayAxis.setSideBySide(false);
  overlayAxis.setPrimaryAxis(false);
  overlayAxis.setOrigin(AxisOriginImpl.create(IntersectionType.MAX_LITERAL,null));
  overlayAxis.setLabelPosition(Position.RIGHT_LITERAL);
  overlayAxis.setTitlePosition(Position.RIGHT_LITERAL);
  overlayAxis.getTitle().getCaption().setValue(Messages.getString("String_Node_Str"));
  overlayAxis.eAdapters().addAll(yAxis.eAdapters());
  if (overlayAxis.getSeriesDefinitions().size() > 1) {
    EList<SeriesDefinition> list=overlayAxis.getSeriesDefinitions();
    for (int i=list.size() - 1; i > 0; i--) {
      list.remove(i);
    }
  }
  SeriesDefinition sdOverlay=overlayAxis.getSeriesDefinitions().get(0);
  EList<Query> dds=sdOverlay.getDesignTimeSeries().getDataDefinition();
  for (int i=0; i < dds.size(); i++) {
    dds.get(i).setDefinition("String_Node_Str");
  }
  SampleData sd=chartModel.getSampleData();
  int currentSize=sd.getOrthogonalSampleData().size();
  OrthogonalSampleData sdOrthogonal=chartModel.getSampleData().getOrthogonalSampleData().get(0).copyInstance();
  sdOrthogonal.setDataSetRepresentation(ChartUtil.getNewSampleData(overlayAxis.getType(),currentSize));
  sdOrthogonal.setSeriesDefinitionIndex(currentSize);
  sdOrthogonal.eAdapters().addAll(sd.eAdapters());
  sd.getOrthogonalSampleData().add(sdOrthogonal);
  chartModel.getAxes().get(0).getAssociatedAxes().add(overlayAxis);
  ChartAdapter.endIgnoreNotifications();
  setSeriesName(chartModel);
}

Fixed version (ground truth):
/** 
 * Adds an orthogonal axis. Ensures only one event is fired.
 * @param chartModel chart model
 */
public static void addAxis(final ChartWithAxes chartModel){
  ChartAdapter.beginIgnoreNotifications();
  Axis xAxis=chartModel.getAxes().get(0);
  Axis yAxis=xAxis.getAssociatedAxes().get(0);
  Axis overlayAxis=yAxis.copyInstance();
  overlayAxis.setPrimaryAxis(false);
  overlayAxis.setOrigin(AxisOriginImpl.create(IntersectionType.MAX_LITERAL,null));
  overlayAxis.setLabelPosition(Position.RIGHT_LITERAL);
  overlayAxis.setTitlePosition(Position.RIGHT_LITERAL);
  overlayAxis.eAdapters().addAll(yAxis.eAdapters());
  if (overlayAxis.getSeriesDefinitions().size() > 1) {
    EList<SeriesDefinition> list=overlayAxis.getSeriesDefinitions();
    for (int i=list.size() - 1; i > 0; i--) {
      list.remove(i);
    }
  }
  SeriesDefinition sdOverlay=overlayAxis.getSeriesDefinitions().get(0);
  EList<Query> dds=sdOverlay.getDesignTimeSeries().getDataDefinition();
  for (int i=0; i < dds.size(); i++) {
    dds.get(i).setDefinition("String_Node_Str");
  }
  SampleData sd=chartModel.getSampleData();
  int currentSize=sd.getOrthogonalSampleData().size();
  OrthogonalSampleData sdOrthogonal=chartModel.getSampleData().getOrthogonalSampleData().get(0).copyInstance();
  sdOrthogonal.setDataSetRepresentation(ChartUtil.getNewSampleData(overlayAxis.getType(),currentSize));
  sdOrthogonal.setSeriesDefinitionIndex(currentSize);
  sdOrthogonal.eAdapters().addAll(sd.eAdapters());
  sd.getOrthogonalSampleData().add(sdOrthogonal);
  chartModel.getAxes().get(0).getAssociatedAxes().add(overlayAxis);
  ChartAdapter.endIgnoreNotifications();
  setSeriesName(chartModel);
}