Program: 76677
Project: 76677
Buggy source:
private void populateLists(Series series){
  String[] componentsDisplayName=LiteralHelper.dataPointComponentTypeSet.getDisplayNames();
  try {
    IDataPointDefinition dpd=PluginSettings.instance().getDataPointDefinition(getSeriesForProcessing().getClass());
    if (dpd != null) {
      String[] dpType=dpd.getDataPointTypes();
      String[] dpTypeDisplay=new String[dpType.length];
      for (int i=0; i < dpType.length; i++) {
        dpTypeDisplay[i]=dpd.getDisplayText(dpType[i]);
        mapDataPointNames.put(dpType[i],dpTypeDisplay[i]);
        mapDataPointNames.put(dpTypeDisplay[i],dpType[i]);
      }
      componentsDisplayName=concatenateArrays(dpTypeDisplay,componentsDisplayName);
    }
  }
 catch (  ChartException e) {
    WizardBase.displayException(e);
  }
  cmbComponentTypes.setItems(componentsDisplayName);
  cmbComponentTypes.select(0);
  this.lstComponents.setItems(getDataPointComponents(series.getDataPoint()));
  String str=series.getDataPoint().getPrefix();
  this.txtPrefix.setText((str == null) ? "String_Node_Str" : str);
  str=series.getDataPoint().getSuffix();
  this.txtSuffix.setText((str == null) ? "String_Node_Str" : str);
  str=series.getDataPoint().getSeparator();
  this.txtSeparator.setText((str == null) ? "String_Node_Str" : str);
  int positionScope=(getSeriesForProcessing() instanceof PieSeries || getSeriesForProcessing() instanceof BarSeries) ? LabelAttributesComposite.ALLOW_INOUT_POSITION : (LabelAttributesComposite.ALLOW_HORIZONTAL_POSITION | LabelAttributesComposite.ALLOW_VERTICAL_POSITION);
  Position lpCurrent=getSeriesForProcessing().getLabelPosition();
  if (positionScope == LabelAttributesComposite.ALLOW_ALL_POSITION) {
    cmbPosition.setItems(LiteralHelper.fullPositionSet.getDisplayNames());
    if (lpCurrent != null) {
      if (context.getModel() instanceof ChartWithAxes) {
        cmbPosition.select(LiteralHelper.fullPositionSet.getSafeNameIndex(ChartUIUtil.getFlippedPosition(lpCurrent,isFlippedAxes()).getName()));
      }
 else {
        cmbPosition.select(LiteralHelper.fullPositionSet.getSafeNameIndex(lpCurrent.getName()));
      }
    }
  }
 else {
    if ((positionScope & LabelAttributesComposite.ALLOW_VERTICAL_POSITION) != 0) {
      if (context.getModel() instanceof ChartWithAxes && isFlippedAxes()) {
        String[] ns=LiteralHelper.horizontalPositionSet.getDisplayNames();
        for (int i=0; i < ns.length; i++) {
          cmbPosition.add(ns[i]);
        }
      }
 else {
        String[] ns=LiteralHelper.verticalPositionSet.getDisplayNames();
        for (int i=0; i < ns.length; i++) {
          cmbPosition.add(ns[i]);
        }
      }
    }
    if ((positionScope & LabelAttributesComposite.ALLOW_HORIZONTAL_POSITION) != 0) {
      if (context.getModel() instanceof ChartWithAxes && isFlippedAxes()) {
        String[] ns=LiteralHelper.verticalPositionSet.getDisplayNames();
        for (int i=0; i < ns.length; i++) {
          cmbPosition.add(ns[i]);
        }
      }
 else {
        String[] ns=LiteralHelper.horizontalPositionSet.getDisplayNames();
        for (int i=0; i < ns.length; i++) {
          cmbPosition.add(ns[i]);
        }
      }
    }
    if ((positionScope & LabelAttributesComposite.ALLOW_INOUT_POSITION) != 0) {
      if ((getSeriesForProcessing() instanceof BarSeries) && (getContext().getModel().getDimension() == ChartDimension.THREE_DIMENSIONAL_LITERAL)) {
        cmbPosition.add(LiteralHelper.inoutPositionSet.getDisplayNameByName(Position.OUTSIDE_LITERAL.getName()));
      }
 else {
        String[] ns=LiteralHelper.inoutPositionSet.getDisplayNames();
        for (int i=0; i < ns.length; i++) {
          cmbPosition.add(ns[i]);
        }
      }
    }
    if (lpCurrent != null) {
      String positionName=null;
      if (context.getModel() instanceof ChartWithAxes) {
        positionName=ChartUIUtil.getFlippedPosition(lpCurrent,isFlippedAxes()).getName();
      }
 else {
        positionName=lpCurrent.getName();
      }
      for (int i=0; i < cmbPosition.getItemCount(); i++) {
        if (positionName.equals(LiteralHelper.fullPositionSet.getNameByDisplayName(cmbPosition.getItem(i)))) {
          cmbPosition.select(i);
        }
      }
      if (cmbPosition.getSelectionIndex() < 0) {
        cmbPosition.select(0);
        cmbPosition.notifyListeners(SWT.Selection,new Event());
      }
    }
  }
}

Fixed version (ground truth):
private void populateLists(Series series){
  String[] componentsDisplayName=LiteralHelper.dataPointComponentTypeSet.getDisplayNames();
  try {
    IDataPointDefinition dpd=PluginSettings.instance().getDataPointDefinition(getSeriesForProcessing().getClass());
    if (dpd != null) {
      String[] dpType=dpd.getDataPointTypes();
      String[] dpTypeDisplay=new String[dpType.length];
      for (int i=0; i < dpType.length; i++) {
        dpTypeDisplay[i]=dpd.getDisplayText(dpType[i]);
        mapDataPointNames.put(dpType[i],dpTypeDisplay[i]);
        mapDataPointNames.put(dpTypeDisplay[i],dpType[i]);
      }
      componentsDisplayName=concatenateArrays(dpTypeDisplay,componentsDisplayName);
    }
  }
 catch (  ChartException e) {
    WizardBase.displayException(e);
  }
  cmbComponentTypes.setItems(componentsDisplayName);
  cmbComponentTypes.select(0);
  this.lstComponents.setItems(getDataPointComponents(series.getDataPoint()));
  String str=series.getDataPoint().getPrefix();
  this.txtPrefix.setText((str == null) ? "String_Node_Str" : str);
  str=series.getDataPoint().getSuffix();
  this.txtSuffix.setText((str == null) ? "String_Node_Str" : str);
  str=series.getDataPoint().getSeparator();
  this.txtSeparator.setText((str == null) ? "String_Node_Str" : str);
  int positionScope=LabelAttributesComposite.ALLOW_HORIZONTAL_POSITION | LabelAttributesComposite.ALLOW_VERTICAL_POSITION;
  if (getSeriesForProcessing() instanceof PieSeries || getSeriesForProcessing() instanceof BarSeries) {
    positionScope=LabelAttributesComposite.ALLOW_INOUT_POSITION;
  }
 else   if (getSeriesForProcessing() instanceof GanttSeriesImpl) {
    positionScope|=LabelAttributesComposite.ALLOW_INOUT_POSITION;
  }
  Position lpCurrent=getSeriesForProcessing().getLabelPosition();
  if (positionScope == LabelAttributesComposite.ALLOW_ALL_POSITION) {
    cmbPosition.setItems(LiteralHelper.fullPositionSet.getDisplayNames());
    if (lpCurrent != null) {
      if (context.getModel() instanceof ChartWithAxes) {
        cmbPosition.select(LiteralHelper.fullPositionSet.getSafeNameIndex(ChartUIUtil.getFlippedPosition(lpCurrent,isFlippedAxes()).getName()));
      }
 else {
        cmbPosition.select(LiteralHelper.fullPositionSet.getSafeNameIndex(lpCurrent.getName()));
      }
    }
  }
 else {
    if ((positionScope & LabelAttributesComposite.ALLOW_VERTICAL_POSITION) != 0) {
      if (context.getModel() instanceof ChartWithAxes && isFlippedAxes()) {
        String[] ns=LiteralHelper.horizontalPositionSet.getDisplayNames();
        for (int i=0; i < ns.length; i++) {
          cmbPosition.add(ns[i]);
        }
      }
 else {
        String[] ns=LiteralHelper.verticalPositionSet.getDisplayNames();
        for (int i=0; i < ns.length; i++) {
          cmbPosition.add(ns[i]);
        }
      }
    }
    if ((positionScope & LabelAttributesComposite.ALLOW_HORIZONTAL_POSITION) != 0) {
      if (context.getModel() instanceof ChartWithAxes && isFlippedAxes()) {
        String[] ns=LiteralHelper.verticalPositionSet.getDisplayNames();
        for (int i=0; i < ns.length; i++) {
          cmbPosition.add(ns[i]);
        }
      }
 else {
        String[] ns=LiteralHelper.horizontalPositionSet.getDisplayNames();
        for (int i=0; i < ns.length; i++) {
          cmbPosition.add(ns[i]);
        }
      }
    }
    if ((positionScope & LabelAttributesComposite.ALLOW_INOUT_POSITION) != 0) {
      if ((getSeriesForProcessing() instanceof BarSeries) && (getContext().getModel().getDimension() == ChartDimension.THREE_DIMENSIONAL_LITERAL)) {
        cmbPosition.add(LiteralHelper.inoutPositionSet.getDisplayNameByName(Position.OUTSIDE_LITERAL.getName()));
      }
 else       if (getSeriesForProcessing() instanceof GanttSeriesImpl) {
        cmbPosition.add(LiteralHelper.inoutPositionSet.getDisplayNameByName(Position.INSIDE_LITERAL.getName()));
      }
 else {
        String[] ns=LiteralHelper.inoutPositionSet.getDisplayNames();
        for (int i=0; i < ns.length; i++) {
          cmbPosition.add(ns[i]);
        }
      }
    }
    if (lpCurrent != null) {
      String positionName=null;
      if (context.getModel() instanceof ChartWithAxes) {
        positionName=ChartUIUtil.getFlippedPosition(lpCurrent,isFlippedAxes()).getName();
      }
 else {
        positionName=lpCurrent.getName();
      }
      for (int i=0; i < cmbPosition.getItemCount(); i++) {
        if (positionName.equals(LiteralHelper.fullPositionSet.getNameByDisplayName(cmbPosition.getItem(i)))) {
          cmbPosition.select(i);
        }
      }
      if (cmbPosition.getSelectionIndex() < 0) {
        cmbPosition.select(0);
        cmbPosition.notifyListeners(SWT.Selection,new Event());
      }
    }
  }
}