Program: 70699
Project: 70699
Buggy source:
/** 
 * A convenient method to get an instance copy. This is much faster than the ECoreUtil.copy().
 * @param src
 * @return
 */
public static BarSeries copyInstance(BarSeries src){
  if (src == null) {
    return null;
  }
  BarSeriesImpl dest=new BarSeriesImpl();
  if (src.getLabel() != null) {
    dest.setLabel(LabelImpl.copyInstance(src.getLabel()));
  }
  if (src.getDataDefinition() != null) {
    EList<Query> list=dest.getDataDefinition();
    for (    Query element : src.getDataDefinition()) {
      list.add(QueryImpl.copyInstance(element));
    }
  }
  if (src.getDataPoint() != null) {
    dest.setDataPoint(DataPointImpl.copyInstance(src.getDataPoint()));
  }
  if (src.getDataSets() != null) {
    EMap<String,DataSet> map=dest.getDataSets();
    map.putAll(src.getDataSets());
  }
  if (src.getTriggers() != null) {
    EList<Trigger> list=dest.getTriggers();
    for (    Trigger element : src.getTriggers()) {
      list.add(TriggerImpl.copyInstance(element));
    }
  }
  if (src.getCurveFitting() != null) {
    dest.setCurveFitting(CurveFittingImpl.copyInstance(src.getCurveFitting()));
  }
  if (src.getCursor() != null) {
    dest.setCursor(CursorImpl.copyInstance(src.getCursor()));
  }
  if (src.getRiserOutline() != null) {
    dest.setRiserOutline(ColorDefinitionImpl.copyInstance(src.getRiserOutline()));
  }
  dest.visible=src.isVisible();
  dest.visibleESet=src.isSetVisible();
  dest.seriesIdentifier=src.getSeriesIdentifier();
  dest.labelPosition=src.getLabelPosition();
  dest.labelPositionESet=src.isSetLabelPosition();
  dest.stacked=src.isStacked();
  dest.stackedESet=src.isSetStacked();
  dest.translucent=src.isTranslucent();
  dest.translucentESet=src.isSetTranslucent();
  dest.riser=src.getRiser();
  dest.riserESet=src.isSetRiser();
  return dest;
}

Fixed version (ground truth):
/** 
 * A convenient method to get an instance copy. This is much faster than the ECoreUtil.copy().
 * @param src
 * @return
 */
public static BarSeries copyInstance(BarSeries src){
  if (src == null) {
    return null;
  }
  BarSeriesImpl dest=new BarSeriesImpl();
  if (src.getLabel() != null) {
    dest.setLabel(LabelImpl.copyInstance(src.getLabel()));
  }
  if (src.getDataDefinition() != null) {
    EList<Query> list=dest.getDataDefinition();
    for (    Query element : src.getDataDefinition()) {
      list.add(QueryImpl.copyInstance(element));
    }
  }
  if (src.getDataPoint() != null) {
    dest.setDataPoint(DataPointImpl.copyInstance(src.getDataPoint()));
  }
  if (src.getDataSets() != null) {
    EMap<String,DataSet> map=dest.getDataSets();
    for (    Map.Entry<String,DataSet> entry : src.getDataSets().entrySet()) {
      map.put(entry.getKey(),DataSetImpl.copyInstance(entry.getValue()));
    }
  }
  if (src.getTriggers() != null) {
    EList<Trigger> list=dest.getTriggers();
    for (    Trigger element : src.getTriggers()) {
      list.add(TriggerImpl.copyInstance(element));
    }
  }
  if (src.getCurveFitting() != null) {
    dest.setCurveFitting(CurveFittingImpl.copyInstance(src.getCurveFitting()));
  }
  if (src.getCursor() != null) {
    dest.setCursor(CursorImpl.copyInstance(src.getCursor()));
  }
  if (src.getRiserOutline() != null) {
    dest.setRiserOutline(ColorDefinitionImpl.copyInstance(src.getRiserOutline()));
  }
  dest.visible=src.isVisible();
  dest.visibleESet=src.isSetVisible();
  dest.seriesIdentifier=src.getSeriesIdentifier();
  dest.labelPosition=src.getLabelPosition();
  dest.labelPositionESet=src.isSetLabelPosition();
  dest.stacked=src.isStacked();
  dest.stackedESet=src.isSetStacked();
  dest.translucent=src.isTranslucent();
  dest.translucentESet=src.isSetTranslucent();
  dest.riser=src.getRiser();
  dest.riserESet=src.isSetRiser();
  return dest;
}