nus-yam/ex-repair huggingface dataset:
Program: 66193
Project: 66193
Buggy source:
public void widgetSelected(SelectionEvent e){
  Object oSource=e.getSource();
  if (e.widget == btnHidden) {
    boolean visible=btnHidden.getSelectionState() == TristateCheckbox.STATE_SELECTED;
    ChartElementUtil.setEObjectAttribute(getAxisForProcessing().getLineAttributes(),"String_Node_Str",visible,btnHidden.getSelectionState() == TristateCheckbox.STATE_GRAYED);
    lblColor.setEnabled(visible);
    fccLine.setEnabled(visible);
  }
 else   if (oSource.equals(btnTickBetweenCategory)) {
    ChartElementUtil.setEObjectAttribute(getAxisForProcessing().getScale(),"String_Node_Str",btnTickBetweenCategory.getSelectionState() == TristateCheckbox.STATE_SELECTED,btnTickBetweenCategory.getSelectionState() == TristateCheckbox.STATE_GRAYED);
  }
  if (oSource.equals(iscGridCount)) {
    getAxisForProcessing().getScale().setMinorGridsPerUnit(iscGridCount.getSelection());
  }
 else   if (oSource.equals(majGridStNum)) {
    getAxisForProcessing().getScale().setMajorGridsStepNumber(majGridStNum.getSelection());
  }
 else   if (e.widget == btnMajStpNum) {
    ChartElementUtil.setEObjectAttribute(getAxisForProcessing().getScale(),"String_Node_Str",majGridStNum.getSelection(),btnMajStpNum.getSelection());
    majGridStNum.setEnabled(!btnMajStpNum.getSelection());
  }
 else   if (e.widget == btnGridCountUnit) {
    ChartElementUtil.setEObjectAttribute(getAxisForProcessing().getScale(),"String_Node_Str",iscGridCount.getSelection(),btnGridCountUnit.getSelection());
    iscGridCount.setEnabled(!btnGridCountUnit.getSelection());
  }
}

Fixed version (ground truth):
public void widgetSelected(SelectionEvent e){
  Object oSource=e.getSource();
  if (e.widget == btnHidden) {
    boolean visible=btnHidden.getSelectionState() == TristateCheckbox.STATE_SELECTED;
    ChartElementUtil.setEObjectAttribute(getAxisForProcessing().getLineAttributes(),"String_Node_Str",visible,btnHidden.getSelectionState() == TristateCheckbox.STATE_GRAYED);
    lblColor.setEnabled(visible);
    fccLine.setEnabled(visible);
  }
 else   if (oSource.equals(btnTickBetweenCategory)) {
    ChartElementUtil.setEObjectAttribute(getAxisForProcessing().getScale(),"String_Node_Str",btnTickBetweenCategory.getSelectionState() == TristateCheckbox.STATE_SELECTED,btnTickBetweenCategory.getSelectionState() == TristateCheckbox.STATE_GRAYED);
  }
  if (oSource.equals(iscGridCount)) {
    getAxisForProcessing().getScale().setMinorGridsPerUnit(iscGridCount.getSelection());
  }
 else   if (oSource.equals(majGridStNum)) {
    getAxisForProcessing().getScale().setMajorGridsStepNumber(majGridStNum.getSelection());
  }
 else   if (e.widget == btnMajStpNum) {
    ChartElementUtil.setEObjectAttribute(getAxisForProcessing().getScale(),"String_Node_Str",majGridStNum.getSelection(),btnMajStpNum.getSelection());
    setStateOfMajorGrid();
  }
 else   if (e.widget == btnGridCountUnit) {
    ChartElementUtil.setEObjectAttribute(getAxisForProcessing().getScale(),"String_Node_Str",iscGridCount.getSelection(),btnGridCountUnit.getSelection());
    setStateOfMinorGrid();
  }
}
Program: 66194
Project: 66194
Buggy source:
private void setStateOfMinorGrid(){
  boolean enabled;
  if (ChartUIUtil.is3DWallFloorSet(getChart())) {
    enabled=getAxisForProcessing().getMinorGrid().getLineAttributes().isSetVisible() && getAxisForProcessing().getMinorGrid().getLineAttributes().isVisible();
    if (!ChartUIUtil.is3DType(getChart())) {
      enabled=enabled || (getAxisForProcessing().getMinorGrid().getTickAttributes().isSetVisible() && getAxisForProcessing().getMinorGrid().getTickAttributes().isVisible());
    }
  }
 else {
    enabled=false;
  }
  lblGridCount.setEnabled(enabled);
  iscGridCount.setEnabled(enabled);
}

Fixed version (ground truth):
private void setStateOfMinorGrid(){
  boolean enabled;
  if (ChartUIUtil.is3DWallFloorSet(getChart())) {
    enabled=getAxisForProcessing().getMinorGrid().getLineAttributes().isSetVisible() && getAxisForProcessing().getMinorGrid().getLineAttributes().isVisible();
    if (!ChartUIUtil.is3DType(getChart())) {
      enabled=enabled || (getAxisForProcessing().getMinorGrid().getTickAttributes().isSetVisible() && getAxisForProcessing().getMinorGrid().getTickAttributes().isVisible());
    }
  }
 else {
    enabled=false;
  }
  if (enabled) {
    boolean isAuto=btnGridCountUnit.getSelection();
    lblGridCount.setEnabled(true);
    iscGridCount.setEnabled(true && !isAuto);
    btnGridCountUnit.setEnabled(true);
  }
 else {
    lblGridCount.setEnabled(false);
    iscGridCount.setEnabled(false);
    btnGridCountUnit.setEnabled(false);
  }
}
Program: 66195
Project: 66195
Buggy source:
private void populateLists(){
  NameSet nameSet=LiteralHelper.legendBehaviorTypeSet;
  List<String> names=new ArrayList<String>(Arrays.asList(nameSet.getDisplayNames()));
  names.add(0,ChartUIExtensionUtil.getAutoMessage());
  cmbLegendBehavior.setItems(names.toArray(new String[]{}));
  if (!getChart().getInteractivity().isSetLegendBehavior()) {
    cmbLegendBehavior.select(0);
  }
 else {
    cmbLegendBehavior.select(nameSet.getSafeNameIndex(getChart().getInteractivity().getLegendBehavior().getName()) + 1);
  }
}

Fixed version (ground truth):
private void populateLists(){
  NameSet nameSet=LiteralHelper.legendBehaviorTypeSet;
  List<String> names=new ArrayList<String>(Arrays.asList(nameSet.getDisplayNames()));
  names.add(0,ChartUIExtensionUtil.getAutoMessage());
  if (getContext().getOutputFormat().equalsIgnoreCase("String_Node_Str")) {
    cmbLegendBehavior.setItems(names.toArray(new String[]{}));
    if (!getChart().getInteractivity().isSetLegendBehavior()) {
      cmbLegendBehavior.select(0);
    }
 else {
      cmbLegendBehavior.select(nameSet.getSafeNameIndex(getChart().getInteractivity().getLegendBehavior().getName()) + 1);
    }
  }
 else {
    cmbLegendBehavior.setItems(new String[]{nameSet.getDisplayNames()[0]});
    cmbLegendBehavior.select(0);
  }
}
Program: 66197
Project: 66197
Buggy source:
public void initDialog(){
  cmbType.setItems(dataTypes);
  txtDisplayName.setFocus();
  if (isAggregate()) {
    initFunction();
    initFilter();
    if (!isTimePeriod()) {
      initAggOn();
    }
  }
  if (isTimePeriod()) {
    initTimeDimension();
    initReferenceDate();
    initCalculationTypeCombo(getTimeDimsionName());
  }
  if (getBinding() == null) {
    setTypeSelect(dataTypes[0]);
    if (isTimePeriod()) {
      this.newBinding=StructureFactory.newComputedColumn(getBindingHolder(),DEFAULT_TIMEPERIOD_NAME);
    }
 else {
      this.newBinding=StructureFactory.newComputedColumn(getBindingHolder(),isAggregate() ? DEFAULT_AGGREGATION_NAME : DEFAULT_ITEM_NAME);
    }
    setName(this.newBinding.getName());
  }
 else {
    setName(getBinding().getName());
    setDisplayName(getBinding().getDisplayName());
    setDisplayNameID(getBinding().getDisplayNameID());
    if (getBinding().getDataType() != null)     if (DATA_TYPE_CHOICE_SET.findChoice(getBinding().getDataType()) != null)     setTypeSelect(DATA_TYPE_CHOICE_SET.findChoice(getBinding().getDataType()).getDisplayName());
 else     cmbType.setText("String_Node_Str");
    if (getBinding().getExpression() != null)     setDataFieldExpression(getBinding());
  }
  if (this.getBinding() != null) {
    this.txtName.setEnabled(false);
  }
  validate();
  hasInitDialog=true;
  composite.getShell().pack();
}

Fixed version (ground truth):
public void initDialog(){
  cmbType.setItems(dataTypes);
  txtDisplayName.setFocus();
  if (isAggregate()) {
    initFunction();
    initFilter();
{
      initAggOn();
    }
  }
  if (isTimePeriod()) {
    initTimeDimension();
    initReferenceDate();
    initCalculationTypeCombo(getTimeDimsionName());
  }
  if (getBinding() == null) {
    setTypeSelect(dataTypes[0]);
    if (isTimePeriod()) {
      this.newBinding=StructureFactory.newComputedColumn(getBindingHolder(),DEFAULT_TIMEPERIOD_NAME);
    }
 else {
      this.newBinding=StructureFactory.newComputedColumn(getBindingHolder(),isAggregate() ? DEFAULT_AGGREGATION_NAME : DEFAULT_ITEM_NAME);
    }
    setName(this.newBinding.getName());
  }
 else {
    setName(getBinding().getName());
    setDisplayName(getBinding().getDisplayName());
    setDisplayNameID(getBinding().getDisplayNameID());
    if (getBinding().getDataType() != null)     if (DATA_TYPE_CHOICE_SET.findChoice(getBinding().getDataType()) != null)     setTypeSelect(DATA_TYPE_CHOICE_SET.findChoice(getBinding().getDataType()).getDisplayName());
 else     cmbType.setText("String_Node_Str");
    if (getBinding().getExpression() != null)     setDataFieldExpression(getBinding());
  }
  if (this.getBinding() != null) {
    this.txtName.setEnabled(false);
  }
  validate();
  hasInitDialog=true;
  composite.getShell().pack();
}
Program: 66200
Project: 66200
Buggy source:
public BaseTimeFunction(ITimeFunction function,List<IArgumentInfo.Period_Type> timeType){
  this(function.getName(),function.getDisplayName(),function.getDescription());
  this.timeType=timeType;
}

Fixed version (ground truth):
public BaseTimeFunction(ITimeFunction function,List<IArgumentInfo.Period_Type> timeType){
  this(function.getName(),function.getDisplayName(),function.getDescription());
  period_type1=new ArrayList<Period_Type>();
  period_type2=new ArrayList<Period_Type>();
  period_type1.addAll(timeType);
  period_type2.addAll(timeType);
}
Program: 66204
Project: 66204
Buggy source:
private boolean isTitleEnabled(){
  return getChart().getTitle().isSetVisible() && getChart().getTitle().isVisible() && getChart().getTitle().getLabel().getCaption().getValue() != null && !isAutoTitle();
}

Fixed version (ground truth):
private boolean isTitleEnabled(){
  if (btnAutoTitle != null) {
    return getChart().getTitle().isSetVisible() && getChart().getTitle().isVisible() && !isAutoTitle();
  }
 else {
    return getChart().getTitle().isSetVisible() && getChart().getTitle().isVisible() && getChart().getTitle().getLabel().getCaption().getValue() != null && !isAutoTitle();
  }
}
Program: 66205
Project: 66205
Buggy source:
public void widgetSelected(SelectionEvent e){
  if (detachPopup(e.widget)) {
    return;
  }
  if (isRegistered(e.widget)) {
    attachPopup(((Button)e.widget).getData().toString());
  }
  if (e.widget.equals(btnVisible)) {
    boolean visible=btnVisible.getSelectionState() == TristateCheckbox.STATE_SELECTED;
    if (btnVisible.getSelectionState() == TristateCheckbox.STATE_GRAYED) {
      getChart().getTitle().unsetVisible();
    }
 else {
      getChart().getTitle().setVisible(visible);
    }
    updateUIState(visible);
    if (getToggleButton(BUTTON_TEXT).getSelection() || getToggleButton(BUTTON_LAYOUT).getSelection()) {
      detachPopup();
    }
  }
 else   if (e.widget.equals(btnAutoTitle)) {
    if (btnAutoTitle.getSelectionState() == TristateCheckbox.STATE_GRAYED) {
      getChart().getTitle().unsetAuto();
    }
 else {
      getChart().getTitle().setAuto(btnAutoTitle.getSelectionState() == TristateCheckbox.STATE_SELECTED);
    }
    updateTextTitleState();
  }
 else   if (e.widget == btnTitleContentAuto) {
    if (btnTitleContentAuto.getSelection()) {
      getChart().getTitle().getLabel().getCaption().setValue(null);
    }
 else {
      String title=ChartUIUtil.getChartType(getChart().getType()).getDefaultTitle();
      getChart().getTitle().getLabel().getCaption().setValue(title);
    }
    updateTextTitleState();
  }
}

Fixed version (ground truth):
public void widgetSelected(SelectionEvent e){
  if (detachPopup(e.widget)) {
    return;
  }
  if (isRegistered(e.widget)) {
    attachPopup(((Button)e.widget).getData().toString());
  }
  if (e.widget.equals(btnVisible)) {
    boolean visible=btnVisible.getSelectionState() == TristateCheckbox.STATE_SELECTED;
    if (btnVisible.getSelectionState() == TristateCheckbox.STATE_GRAYED) {
      getChart().getTitle().unsetVisible();
    }
 else {
      getChart().getTitle().setVisible(visible);
    }
    updateUIState(visible);
    if (getToggleButton(BUTTON_TEXT).getSelection() || getToggleButton(BUTTON_LAYOUT).getSelection()) {
      detachPopup();
    }
  }
 else   if (e.widget.equals(btnAutoTitle)) {
    if (btnAutoTitle.getSelectionState() == TristateCheckbox.STATE_GRAYED) {
      getChart().getTitle().unsetAuto();
    }
 else {
      getChart().getTitle().setAuto(btnAutoTitle.getSelectionState() == TristateCheckbox.STATE_SELECTED);
    }
    updateTextTitleState();
  }
 else   if (e.widget == btnTitleContentAuto) {
    if (btnTitleContentAuto.getSelection()) {
      getChart().getTitle().getLabel().getCaption().setValue(null);
    }
 else {
      getChart().getTitle().getLabel().getCaption().setValue(ChartUIUtil.getChartType(getChart().getType()).getDefaultTitle());
    }
    updateTextTitleState();
  }
}
Program: 66206
Project: 66206
Buggy source:
protected void updateTextTitleState(){
  btnTitleContentAuto.setEnabled(getChart().getTitle().isSetVisible() && getChart().getTitle().isVisible() && !isAutoTitle());
  txtTitle.setEnabled(isTitleEnabled());
  txtTitle.setText(getTitleText());
}

Fixed version (ground truth):
protected void updateTextTitleState(){
  txtTitle.setEnabled(isTitleEnabled());
  txtTitle.setText(getTitleText());
}
Program: 66207
Project: 66207
Buggy source:
protected void updateUIState(boolean enabled){
  btnTitleContentAuto.setEnabled(enabled && !isAutoTitle());
  txtTitle.setEnabled(isTitleEnabled());
  btnAutoTitle.setEnabled(isAutoEnabled());
  setToggleButtonEnabled(BUTTON_TEXT,enabled);
  setToggleButtonEnabled(BUTTON_LAYOUT,enabled);
}

Fixed version (ground truth):
protected void updateUIState(boolean enabled){
  if (btnTitleContentAuto != null) {
    btnTitleContentAuto.setEnabled(!(getChart().getTitle().isSetVisible() && !getChart().getTitle().isVisible()));
  }
  txtTitle.setEnabled(isTitleEnabled());
  if (btnAutoTitle != null) {
    btnAutoTitle.setEnabled(isAutoEnabled());
  }
  setToggleButtonEnabled(BUTTON_TEXT,enabled);
  setToggleButtonEnabled(BUTTON_LAYOUT,enabled);
}
Program: 66209
Project: 66209
Buggy source:
/** 
 * Initializes all member variables Note: Manually written
 */
protected final void initialize(){
  super.initialize();
  Axis xAxisBase=AxisImpl.create(Axis.BASE);
  xAxisBase.setTitlePosition(Position.BELOW_LITERAL);
  xAxisBase.getTitle().getCaption().setValue(Messages.getString("String_Node_Str"));
  xAxisBase.getTitle().setVisible(false);
  xAxisBase.setPrimaryAxis(true);
  xAxisBase.setLabelPosition(Position.BELOW_LITERAL);
  xAxisBase.setOrientation(Orientation.HORIZONTAL_LITERAL);
  xAxisBase.getOrigin().setType(IntersectionType.MIN_LITERAL);
  xAxisBase.getOrigin().setValue(NumberDataElementImpl.create(0));
  xAxisBase.setType(AxisType.TEXT_LITERAL);
  Axis yAxisOrthogonal=AxisImpl.create(Axis.ORTHOGONAL);
  yAxisOrthogonal.setTitlePosition(Position.LEFT_LITERAL);
  yAxisOrthogonal.getTitle().getCaption().setValue(Messages.getString("String_Node_Str"));
  yAxisOrthogonal.getTitle().getCaption().getFont().setRotation(90);
  yAxisOrthogonal.getTitle().setVisible(false);
  yAxisOrthogonal.setPrimaryAxis(true);
  yAxisOrthogonal.setLabelPosition(Position.LEFT_LITERAL);
  yAxisOrthogonal.setOrientation(Orientation.VERTICAL_LITERAL);
  yAxisOrthogonal.getOrigin().setType(IntersectionType.MIN_LITERAL);
  yAxisOrthogonal.getOrigin().setValue(NumberDataElementImpl.create(0));
  yAxisOrthogonal.setType(AxisType.LINEAR_LITERAL);
  xAxisBase.getAssociatedAxes().add(yAxisOrthogonal);
  getAxes().add(xAxisBase);
  setRotation(Rotation3DImpl.create());
}

Fixed version (ground truth):
/** 
 * Initializes all member variables Note: Manually written
 */
protected final void initialize(){
  super.initialize();
  Axis xAxisBase=AxisImpl.create(Axis.BASE);
  xAxisBase.setTitlePosition(Position.BELOW_LITERAL);
  xAxisBase.getTitle().getCaption().setValue(Messages.getString("String_Node_Str"));
  xAxisBase.getTitle().setVisible(false);
  xAxisBase.setPrimaryAxis(true);
  xAxisBase.setLabelPosition(Position.BELOW_LITERAL);
  xAxisBase.setOrientation(Orientation.HORIZONTAL_LITERAL);
  xAxisBase.getOrigin().setType(IntersectionType.MIN_LITERAL);
  xAxisBase.getOrigin().setValue(NumberDataElementImpl.create(0));
  xAxisBase.setType(AxisType.TEXT_LITERAL);
  Axis yAxisOrthogonal=AxisImpl.create(Axis.ORTHOGONAL);
  yAxisOrthogonal.setTitlePosition(Position.LEFT_LITERAL);
  yAxisOrthogonal.getTitle().getCaption().setValue(Messages.getString("String_Node_Str"));
  try {
    ChartElementUtil.setDefaultValue(yAxisOrthogonal.getTitle().getCaption().getFont(),"String_Node_Str",90);
  }
 catch (  ChartException e) {
  }
  yAxisOrthogonal.getTitle().setVisible(false);
  yAxisOrthogonal.setPrimaryAxis(true);
  yAxisOrthogonal.setLabelPosition(Position.LEFT_LITERAL);
  yAxisOrthogonal.setOrientation(Orientation.VERTICAL_LITERAL);
  yAxisOrthogonal.getOrigin().setType(IntersectionType.MIN_LITERAL);
  yAxisOrthogonal.getOrigin().setValue(NumberDataElementImpl.create(0));
  yAxisOrthogonal.setType(AxisType.LINEAR_LITERAL);
  xAxisBase.getAssociatedAxes().add(yAxisOrthogonal);
  getAxes().add(xAxisBase);
  setRotation(Rotation3DImpl.create());
}
Program: 66210
Project: 66210
Buggy source:
/** 
 * @return
 */
public static PieSeries defPieSeries(){
  return defPieSeries;
}

Fixed version (ground truth):
/** 
 * @return default instance of pie series.
 */
public static PieSeries defPieSeries(){
  return defPieSeries;
}
Program: 66211
Project: 66211
Buggy source:
/** 
 * @return
 */
public static DifferenceSeries defDifferenceSeries(){
  return defDifferenceSeries;
}

Fixed version (ground truth):
/** 
 * @return default instance of different series.
 */
public static DifferenceSeries defDifferenceSeries(){
  return defDifferenceSeries;
}
Program: 66212
Project: 66212
Buggy source:
/** 
 * @return
 */
public static StockSeries defStockSeries(){
  return defStockSeries;
}

Fixed version (ground truth):
/** 
 * @return default instance of stock series.
 */
public static StockSeries defStockSeries(){
  return defStockSeries;
}
Program: 66213
Project: 66213
Buggy source:
private static ChartWithAxes createChartWithAxes(){
  ChartWithAxes newChart=ChartWithAxesImpl.create();
  newChart.setDimension(ChartDimension.TWO_DIMENSIONAL_LITERAL);
  Axis axBase=newChart.getAxes().get(0);
  axBase.getMarkerLines().add(MarkerLineImpl.create(axBase,null));
  axBase.getMarkerRanges().add(MarkerRangeImpl.create(axBase,null,null,ColorDefinitionImpl.TRANSPARENT(),ColorDefinitionImpl.RED()));
  axBase.setCategoryAxis(true);
  axBase.getSeriesDefinitions().add(createSeriesDefinition(0));
  axBase.getLineAttributes().setColor(ColorDefinitionImpl.BLACK());
  Axis axOrth=axBase.getAssociatedAxes().get(0);
  axOrth.getMarkerLines().add(MarkerLineImpl.create(axOrth,null));
  axOrth.getMarkerRanges().add(MarkerRangeImpl.create(axOrth,null,null,ColorDefinitionImpl.TRANSPARENT(),ColorDefinitionImpl.RED()));
  axOrth.getSeriesDefinitions().add(createSeriesDefinition(0));
  axOrth.getLineAttributes().setColor(ColorDefinitionImpl.BLACK());
  createAncillaryAxis(newChart);
  return newChart;
}

Fixed version (ground truth):
private static ChartWithAxes createChartWithAxes(){
  ChartWithAxes newChart=ChartWithAxesImpl.create();
  newChart.setDimension(ChartDimension.TWO_DIMENSIONAL_LITERAL);
  newChart.setOrientation(Orientation.VERTICAL_LITERAL);
  Axis axBase=newChart.getAxes().get(0);
  axBase.getMarkerLines().add(MarkerLineImpl.create(axBase,null));
  axBase.getMarkerRanges().add(MarkerRangeImpl.create(axBase,null,null,ColorDefinitionImpl.TRANSPARENT(),ColorDefinitionImpl.RED()));
  axBase.setCategoryAxis(true);
  axBase.getSeriesDefinitions().add(createSeriesDefinition(0));
  axBase.getLineAttributes().setColor(ColorDefinitionImpl.BLACK());
  Axis axOrth=axBase.getAssociatedAxes().get(0);
  axOrth.getMarkerLines().add(MarkerLineImpl.create(axOrth,null));
  axOrth.getMarkerRanges().add(MarkerRangeImpl.create(axOrth,null,null,ColorDefinitionImpl.TRANSPARENT(),ColorDefinitionImpl.RED()));
  axOrth.getSeriesDefinitions().add(createSeriesDefinition(0));
  axOrth.getLineAttributes().setColor(ColorDefinitionImpl.BLACK());
  createAncillaryAxis(newChart);
  return newChart;
}
Program: 66214
Project: 66214
Buggy source:
/** 
 * @return
 */
public static Plot defPlot(){
  return defPlot;
}

Fixed version (ground truth):
/** 
 * @return default instance of plot.
 */
public static Plot defPlot(){
  return defPlot;
}
Program: 66215
Project: 66215
Buggy source:
/** 
 * @return
 */
public static Axis defAncillaryAxis(){
  return defAncillaryAxis;
}

Fixed version (ground truth):
/** 
 * @return default instance of z axis.
 */
public static Axis defAncillaryAxis(){
  return defAncillaryAxis;
}
Program: 66216
Project: 66216
Buggy source:
/** 
 * @return
 */
public static Legend defLegend(){
  return defLegend;
}

Fixed version (ground truth):
/** 
 * @return default instance of legend.
 */
public static Legend defLegend(){
  return defLegend;
}
Program: 66217
Project: 66217
Buggy source:
/** 
 * @return
 */
public static BubbleSeries defBubbleSeries(){
  return defBubbleSeries;
}

Fixed version (ground truth):
/** 
 * @return default instance of bubble series.
 */
public static BubbleSeries defBubbleSeries(){
  return defBubbleSeries;
}
Program: 66218
Project: 66218
Buggy source:
/** 
 * @return
 */
public static Axis defOrthogonalAxis(){
  return defOrthAxis;
}

Fixed version (ground truth):
/** 
 * @return default instance of y axis or value axis.
 */
public static Axis defOrthogonalAxis(){
  return defOrthAxis;
}
Program: 66219
Project: 66219
Buggy source:
/** 
 * @return
 */
public static DialChart defDialChart(){
  return defDialChart;
}

Fixed version (ground truth):
/** 
 * @return default instance of  dial chart.
 */
public static DialChart defDialChart(){
  return defDialChart;
}
Program: 66220
Project: 66220
Buggy source:
/** 
 * @return
 */
public static SeriesDefinition defSeriesDefinition(int id){
  return defSeriesDefinitions.get(id);
}

Fixed version (ground truth):
/** 
 * @return default instance of series definition.
 */
public static SeriesDefinition defSeriesDefinition(int id){
  return defSeriesDefinitions.get(id);
}
Program: 66221
Project: 66221
Buggy source:
/** 
 * @return
 */
public static TitleBlock defTitleBlock(){
  return defTitleBlock;
}

Fixed version (ground truth):
/** 
 * @return default instance of title
 */
public static TitleBlock defTitleBlock(){
  return defTitleBlock;
}
Program: 66222
Project: 66222
Buggy source:
/** 
 * @return
 */
public static ScatterSeries defScatterSeries(){
  return defScatterSeries;
}

Fixed version (ground truth):
/** 
 * @return default instance of scatter series.
 */
public static ScatterSeries defScatterSeries(){
  return defScatterSeries;
}
Program: 66223
Project: 66223
Buggy source:
/** 
 * @return
 */
public static GanttSeries defGanttSeries(){
  return defGanttSeries;
}

Fixed version (ground truth):
/** 
 * @return default instance of gantt series.
 */
public static GanttSeries defGanttSeries(){
  return defGanttSeries;
}
Program: 66224
Project: 66224
Buggy source:
/** 
 * @return
 */
public static BarSeries defBarSeries(){
  return defBarSeries;
}

Fixed version (ground truth):
/** 
 * @return default instance of bar series.
 */
public static BarSeries defBarSeries(){
  return defBarSeries;
}
Program: 66225
Project: 66225
Buggy source:
/** 
 * @return
 */
public static Series defSeries(){
  return defSeries;
}

Fixed version (ground truth):
/** 
 * @return default instance of series.
 */
public static Series defSeries(){
  return defSeries;
}
Program: 66226
Project: 66226
Buggy source:
/** 
 * @return
 */
public static LineSeries defLineSeries(){
  return defLineSeries;
}

Fixed version (ground truth):
/** 
 * @return default instance of line series.
 */
public static LineSeries defLineSeries(){
  return defLineSeries;
}
Program: 66227
Project: 66227
Buggy source:
/** 
 * @return
 */
public static AreaSeries defAreaSeries(){
  return defAreaSeries;
}

Fixed version (ground truth):
/** 
 * @return default instance of area series.
 */
public static AreaSeries defAreaSeries(){
  return defAreaSeries;
}
Program: 66228
Project: 66228
Buggy source:
/** 
 * @return
 */
public static ChartWithAxes defChartWithAxes(){
  return defChartWithAxes;
}

Fixed version (ground truth):
/** 
 * @return default instance of chart with axes. 
 */
public static ChartWithAxes defChartWithAxes(){
  return defChartWithAxes;
}
Program: 66229
Project: 66229
Buggy source:
/** 
 * @return
 */
public static ChartWithoutAxes defChartWithoutAxes(){
  return defChartWithoutAxes;
}

Fixed version (ground truth):
/** 
 * @return default instance of chart without axes.
 */
public static ChartWithoutAxes defChartWithoutAxes(){
  return defChartWithoutAxes;
}
Program: 66230
Project: 66230
Buggy source:
/** 
 * @return
 */
public static DialSeries defDialSeries(){
  return defDialSeries;
}

Fixed version (ground truth):
/** 
 * @return default instance of dial series.
 */
public static DialSeries defDialSeries(){
  return defDialSeries;
}
Program: 66231
Project: 66231
Buggy source:
/** 
 * @return
 */
public static Axis defBaseAxis(){
  return defBaseAxis;
}

Fixed version (ground truth):
/** 
 * @return default instance of x/category axis.
 */
public static Axis defBaseAxis(){
  return defBaseAxis;
}
Program: 66232
Project: 66232
Buggy source:
/** 
 * Resets all member variables within this object recursively Note: Manually written
 */
protected final void initDefault(){
  font=FontDefinitionImpl.createEmpty();
}

Fixed version (ground truth):
/** 
 * Resets all member variables within this object recursively Note: Manually written
 */
protected final void initDefault(){
  font=FontDefinitionImpl.createEmptyDefault();
}
Program: 66234
Project: 66234
Buggy source:
/** 
 */
protected final void initDefault(){
  LineAttributes lia=LineAttributesImpl.createDefault(ColorDefinitionImpl.BLACK(),LineStyle.SOLID_LITERAL,1);
  setLineAttributes(lia);
  Label lb=LabelImpl.createDefault();
  setLabel(lb);
  Grid gr=ComponentFactory.eINSTANCE.createGrid();
  lia=LineAttributesImpl.createDefault(ColorDefinitionImpl.create(196,196,196),LineStyle.SOLID_LITERAL,1);
  gr.setLineAttributes(lia);
  lia=LineAttributesImpl.createDefault(ColorDefinitionImpl.create(196,196,196),LineStyle.SOLID_LITERAL,1);
  gr.setTickAttributes(lia);
  ((GridImpl)gr).tickStyle=TickStyle.BELOW_LITERAL;
  setMajorGrid(gr);
  gr=ComponentFactory.eINSTANCE.createGrid();
  lia=LineAttributesImpl.createDefault(ColorDefinitionImpl.create(225,225,225),LineStyle.SOLID_LITERAL,1,false);
  gr.setLineAttributes(lia);
  lia=LineAttributesImpl.createDefault(ColorDefinitionImpl.create(225,225,225),LineStyle.SOLID_LITERAL,1,false);
  gr.setTickAttributes(lia);
  ((GridImpl)gr).tickStyle=TickStyle.BELOW_LITERAL;
  setMinorGrid(gr);
  Scale sc=ComponentFactory.eINSTANCE.createScale();
  ((ScaleImpl)sc).minorGridsPerUnit=5;
  setScale(sc);
}

Fixed version (ground truth):
/** 
 */
protected final void initDefault(){
  LineAttributes lia=LineAttributesImpl.createDefault(null,LineStyle.SOLID_LITERAL,1);
  setLineAttributes(lia);
  Label lb=LabelImpl.createDefault();
  setLabel(lb);
  Grid gr=ComponentFactory.eINSTANCE.createGrid();
  lia=LineAttributesImpl.createDefault(null,LineStyle.SOLID_LITERAL,1);
  gr.setLineAttributes(lia);
  lia=LineAttributesImpl.createDefault(null,LineStyle.SOLID_LITERAL,1);
  gr.setTickAttributes(lia);
  ((GridImpl)gr).tickStyle=TickStyle.BELOW_LITERAL;
  setMajorGrid(gr);
  gr=ComponentFactory.eINSTANCE.createGrid();
  lia=LineAttributesImpl.createDefault(null,LineStyle.SOLID_LITERAL,1,false);
  gr.setLineAttributes(lia);
  lia=LineAttributesImpl.createDefault(null,LineStyle.SOLID_LITERAL,1,false);
  gr.setTickAttributes(lia);
  ((GridImpl)gr).tickStyle=TickStyle.BELOW_LITERAL;
  setMinorGrid(gr);
  Scale sc=ComponentFactory.eINSTANCE.createScale();
  ((ScaleImpl)sc).minorGridsPerUnit=5;
  setScale(sc);
}
Program: 66235
Project: 66235
Buggy source:
/** 
 * Resets all member variables within this object recursively Note: Manually written
 */
protected final void initDefault(boolean visible){
  setCaption(TextImpl.createDefault((String)null));
  setBackground(ColorDefinitionImpl.TRANSPARENT());
  final Insets ins=InsetsImpl.createDefault(0,2,0,3);
  setInsets(ins);
  final LineAttributes lia=LineAttributesImpl.createDefault(ColorDefinitionImpl.BLACK(),LineStyle.SOLID_LITERAL,1);
  setOutline(lia);
  this.visible=visible;
}

Fixed version (ground truth):
/** 
 * Resets all member variables within this object recursively Note: Manually written
 */
protected final void initDefault(boolean visible){
  setCaption(TextImpl.createDefault((String)null));
  final Insets ins=InsetsImpl.createDefault(0,2,0,3);
  setInsets(ins);
  final LineAttributes lia=LineAttributesImpl.createDefault(null,LineStyle.SOLID_LITERAL,1);
  setOutline(lia);
  this.visible=visible;
}
Program: 66236
Project: 66236
Buggy source:
private void initDefault(Axis ax,DataElement de,ColorDefinition lineColor){
  lineAttributes=LineAttributesImpl.create(lineColor,LineStyle.DASHED_LITERAL,1);
  value=de;
  label=LabelImpl.create();
  labelAnchor=ax.getOrientation().getValue() == Orientation.HORIZONTAL ? Anchor.NORTH_WEST_LITERAL : Anchor.NORTH_EAST_LITERAL;
  if (ax.getOrientation().getValue() == Orientation.HORIZONTAL) {
    try {
      ChartElementUtil.setDefaultValue(getLabel().getCaption().getFont(),"String_Node_Str",90);
    }
 catch (    ChartException e) {
    }
  }
  if (ax.getFormatSpecifier() != null && !ax.isCategoryAxis()) {
    formatSpecifier=ax.getFormatSpecifier().copyInstance();
  }
}

Fixed version (ground truth):
private void initDefault(Axis ax,DataElement de,ColorDefinition lineColor){
  lineAttributes=LineAttributesImpl.createDefault(lineColor,LineStyle.DASHED_LITERAL,1);
  value=de;
  label=LabelImpl.createDefault();
  labelAnchor=(ax.isSetOrientation() && ax.getOrientation().getValue() == Orientation.HORIZONTAL) ? Anchor.NORTH_WEST_LITERAL : Anchor.NORTH_EAST_LITERAL;
  if (ax.isSetOrientation() && ax.getOrientation().getValue() == Orientation.HORIZONTAL) {
    try {
      ChartElementUtil.setDefaultValue(getLabel().getCaption().getFont(),"String_Node_Str",90);
    }
 catch (    ChartException e) {
    }
  }
  if (ax.getFormatSpecifier() != null && ax.isSetCategoryAxis() && !ax.isCategoryAxis()) {
    formatSpecifier=ax.getFormatSpecifier().copyInstance();
  }
}
Program: 66237
Project: 66237
Buggy source:
private void initDefault(Axis ax,DataElement deStart,DataElement deEnd,Fill fillColor,ColorDefinition outlineColor){
  outline=LineAttributesImpl.create(outlineColor,LineStyle.SOLID_LITERAL,1);
  fill=fillColor;
  startValue=deStart;
  endValue=deEnd;
  label=LabelImpl.create();
  labelAnchor=ax.getOrientation().getValue() == Orientation.HORIZONTAL ? Anchor.NORTH_EAST_LITERAL : Anchor.NORTH_WEST_LITERAL;
  if (ax.getOrientation().getValue() == Orientation.VERTICAL) {
    try {
      ChartElementUtil.setDefaultValue(getLabel().getCaption().getFont(),"String_Node_Str",90);
    }
 catch (    ChartException e) {
    }
  }
  if (ax.getFormatSpecifier() != null && !ax.isCategoryAxis()) {
    formatSpecifier=ax.getFormatSpecifier().copyInstance();
  }
}

Fixed version (ground truth):
private void initDefault(Axis ax,DataElement deStart,DataElement deEnd,Fill fillColor,ColorDefinition outlineColor){
  outline=LineAttributesImpl.createDefault(outlineColor,LineStyle.SOLID_LITERAL,1);
  fill=fillColor;
  startValue=deStart;
  endValue=deEnd;
  label=LabelImpl.createDefault();
  labelAnchor=(ax.isSetOrientation() && ax.getOrientation().getValue() == Orientation.HORIZONTAL) ? Anchor.NORTH_EAST_LITERAL : Anchor.NORTH_WEST_LITERAL;
  if (ax.isSetOrientation() && ax.getOrientation().getValue() == Orientation.VERTICAL) {
    try {
      ChartElementUtil.setDefaultValue(getLabel().getCaption().getFont(),"String_Node_Str",90);
    }
 catch (    ChartException e) {
    }
  }
  if (ax.getFormatSpecifier() != null && ax.isSetCategoryAxis() && !ax.isCategoryAxis()) {
    formatSpecifier=ax.getFormatSpecifier().copyInstance();
  }
}
Program: 66238
Project: 66238
Buggy source:
/** 
 */
public final void initDefault(){
  LineAttributes lia=LineAttributesImpl.createDefault(ColorDefinitionImpl.BLACK(),LineStyle.SOLID_LITERAL,1);
  setLineAttributes(lia);
}

Fixed version (ground truth):
/** 
 */
public final void initDefault(){
  LineAttributes lia=LineAttributesImpl.createDefault(null,LineStyle.SOLID_LITERAL,1,true);
  setLineAttributes(lia);
}
Program: 66239
Project: 66239
Buggy source:
/** 
 * Note: Manually written
 */
protected void initDefault(){
  version=VERSION;
  block=BlockImpl.createDefault();
  TitleBlock tb=(TitleBlock)TitleBlockImpl.createDefault();
  Plot pl=(Plot)PlotImpl.createDefault();
  Legend lg=(Legend)LegendImpl.createDefault();
  block.add(tb);
  block.add(pl);
  block.add(lg);
  Text txtChartTitle=tb.getLabel().getCaption();
  txtChartTitle.setValue(Messages.getString("String_Node_Str"));
  try {
    ChartElementUtil.setDefaultValue(txtChartTitle.getFont(),"String_Node_Str",16);
    ChartElementUtil.setDefaultValue(txtChartTitle.getFont(),"String_Node_Str",true);
  }
 catch (  ChartException e) {
  }
  TextAlignment taTitle=TextAlignmentImpl.createDefault(HorizontalAlignment.CENTER_LITERAL,VerticalAlignment.CENTER_LITERAL);
  txtChartTitle.getFont().setAlignment(taTitle);
  dimension=ChartDimension.TWO_DIMENSIONAL_LITERAL;
  seriesThickness=10;
  interactivity=InteractivityImpl.create();
  setEmptyMessage(newEmptyMessageDefault());
  ChartModelHelper.instance().updateExtendedProperties(getExtendedProperties());
}

Fixed version (ground truth):
/** 
 * Note: Manually written
 */
protected void initDefault(){
  version=VERSION;
  block=BlockImpl.createDefault();
  TitleBlock tb=(TitleBlock)TitleBlockImpl.createDefault();
  Plot pl=(Plot)PlotImpl.createDefault();
  Legend lg=(Legend)LegendImpl.createDefault();
  block.add(tb);
  block.add(pl);
  block.add(lg);
  Text txtChartTitle=tb.getLabel().getCaption();
  txtChartTitle.setValue(Messages.getString("String_Node_Str"));
  try {
    ChartElementUtil.setDefaultValue(txtChartTitle.getFont(),"String_Node_Str",16);
    ChartElementUtil.setDefaultValue(txtChartTitle.getFont(),"String_Node_Str",true);
  }
 catch (  ChartException e) {
  }
  TextAlignment taTitle=TextAlignmentImpl.createDefault(HorizontalAlignment.CENTER_LITERAL,VerticalAlignment.CENTER_LITERAL);
  try {
    ChartElementUtil.setDefaultValue(txtChartTitle.getFont(),"String_Node_Str",taTitle);
  }
 catch (  ChartException e) {
  }
  dimension=ChartDimension.TWO_DIMENSIONAL_LITERAL;
  seriesThickness=10;
  interactivity=InteractivityImpl.create();
  setEmptyMessage(newEmptyMessageDefault());
  ChartModelHelper.instance().updateExtendedProperties(getExtendedProperties());
}
Program: 66240
Project: 66240
Buggy source:
/** 
 * Before new aggregation extension point is introduced, The binding expression is serve as first argument of aggregation. This function is used to construct a old version binding. 
 * @param binding
 * @return
 */
private static IBinding constructNewBinding(IBinding binding){
  IBinding newBinding=null;
  try {
    newBinding=new Binding(binding.getBindingName());
    List aggregationOn=binding.getAggregatOns();
    if (aggregationOn != null) {
      for (int i=0; i < aggregationOn.size(); i++) {
        newBinding.addAggregateOn((String)aggregationOn.get(i));
      }
    }
    if (binding.getArguments() != null) {
      for (int i=1; i < binding.getArguments().size(); i++) {
        newBinding.addArgument((IBaseExpression)binding.getArguments().get(i));
      }
    }
    if (binding.getArguments().size() > 0) {
      newBinding.setExpression((IBaseExpression)binding.getArguments().get(0));
    }
    newBinding.setAggrFunction(binding.getAggrFunction());
    newBinding.setDataType(binding.getDataType());
    newBinding.setDisplayName(binding.getDisplayName());
    newBinding.setFilter(binding.getFilter());
  }
 catch (  DataException e) {
  }
  return newBinding;
}

Fixed version (ground truth):
/** 
 * Before new aggregation extension point is introduced, The binding expression is serve as first argument of aggregation. This function is used to construct a old version binding. 
 * @param binding
 * @return
 */
private static IBinding constructNewBinding(IBinding binding){
  IBinding newBinding=null;
  try {
    newBinding=new Binding(binding.getBindingName());
    List aggregationOn=binding.getAggregatOns();
    if (aggregationOn != null) {
      for (int i=0; i < aggregationOn.size(); i++) {
        newBinding.addAggregateOn((String)aggregationOn.get(i));
      }
    }
    if (binding.getArguments() != null) {
      for (int i=1; i < binding.getArguments().size(); i++) {
        newBinding.addArgument((IBaseExpression)binding.getArguments().get(i));
      }
    }
    if (binding.getArguments().size() > 0) {
      newBinding.setExpression((IBaseExpression)binding.getArguments().get(0));
    }
    newBinding.setAggrFunction(binding.getAggrFunction());
    newBinding.setDataType(binding.getDataType());
    newBinding.setDisplayName(binding.getDisplayName());
    newBinding.setFilter(binding.getFilter());
    newBinding.setTimeFunction(binding.getTimeFunction());
  }
 catch (  DataException e) {
  }
  return newBinding;
}
Program: 66241
Project: 66241
Buggy source:
public static IBinding loadBinding(DataInputStream dis) throws IOException, DataException {
  int type=IOUtil.readInt(dis);
  String name=IOUtil.readString(dis);
  String function=IOUtil.readString(dis);
  IBaseExpression expr=ExprUtil.loadBaseExpr(dis);
  IBaseExpression filter=ExprUtil.loadBaseExpr(dis);
  Binding binding=new Binding(name);
  binding.setAggrFunction(function);
  binding.setDataType(type);
  binding.setExpression(expr);
  binding.setFilter(filter);
  int argSize=IOUtil.readInt(dis);
  for (int i=0; i < argSize; i++) {
    binding.addArgument(ExprUtil.loadBaseExpr(dis));
  }
  int aggrSize=IOUtil.readInt(dis);
  for (int i=0; i < aggrSize; i++) {
    binding.addAggregateOn(IOUtil.readString(dis));
  }
  return binding;
}

Fixed version (ground truth):
public static IBinding loadBinding(DataInputStream dis) throws IOException, DataException {
  int type=IOUtil.readInt(dis);
  String name=IOUtil.readString(dis);
  String function=IOUtil.readString(dis);
  IBaseExpression expr=ExprUtil.loadBaseExpr(dis);
  IBaseExpression filter=ExprUtil.loadBaseExpr(dis);
  Binding binding=new Binding(name);
  binding.setAggrFunction(function);
  binding.setDataType(type);
  binding.setExpression(expr);
  binding.setFilter(filter);
  int argSize=IOUtil.readInt(dis);
  for (int i=0; i < argSize; i++) {
    binding.addArgument(ExprUtil.loadBaseExpr(dis));
  }
  int aggrSize=IOUtil.readInt(dis);
  for (int i=0; i < aggrSize; i++) {
    binding.addAggregateOn(IOUtil.readString(dis));
  }
  if (VersionManager.getLatestVersion() >= VersionManager.VERSION_2_6_3_1) {
    boolean hasTimeFunction=IOUtil.readBool(dis);
    if (hasTimeFunction) {
      String timeDimensionName=IOUtil.readString(dis);
      TimeFunction time=new TimeFunction();
      if (timeDimensionName != null) {
        time.setTimeDimension(timeDimensionName);
        Date referenceDate=(Date)IOUtil.readObject(dis);
        time.setReferenceDate(new ReferenceDate(referenceDate));
        boolean containsBasePeriod=IOUtil.readBool(dis);
        if (containsBasePeriod) {
          TimePeriodType periodType=getPeriodType(IOUtil.readString(dis));
          int unit=IOUtil.readInt(dis);
          TimePeriod basedTimePeriod=new TimePeriod(unit,periodType);
          time.setBaseTimePeriod(basedTimePeriod);
        }
        boolean containsRelativePeriod=IOUtil.readBool(dis);
        if (containsRelativePeriod) {
          TimePeriodType periodType=getPeriodType(IOUtil.readString(dis));
          int unit=IOUtil.readInt(dis);
          TimePeriod relativeTimePeriod=new TimePeriod(unit,periodType);
          time.setRelativeTimePeriod(relativeTimePeriod);
        }
      }
      binding.setTimeFunction(time);
    }
  }
  return binding;
}
Program: 66243
Project: 66243
Buggy source:
/** 
 * @return
 */
public static int getLatestVersion(){
  return VERSION_2_6_2_2;
}

Fixed version (ground truth):
/** 
 * @return
 */
public static int getLatestVersion(){
  return VERSION_2_6_3_1;
}
Program: 66249
Project: 66249
Buggy source:
/** 
 * Compare two bounds regularly.
 * @param bo1
 * @param bo2
 * @return
 */
public static final int compareRegular(Bounds bo1,Bounds bo2){
  final double dMinY1=bo1.getTop() + bo1.getHeight();
  final double dMinY2=bo2.getTop() + bo2.getHeight();
  double dDiff=dMinY1 - dMinY2;
  if (dDiff != 0) {
    return (dDiff < 0) ? IConstants.MORE : IConstants.LESS;
  }
 else {
    final double dMaxY1=bo1.getTop();
    final double dMaxY2=bo2.getTop();
    dDiff=dMaxY1 - dMaxY2;
    if (dDiff != 0) {
      return (dDiff < 0) ? IConstants.MORE : IConstants.LESS;
    }
 else {
      final double dMinX1=bo1.getLeft();
      final double dMinX2=bo2.getLeft();
      dDiff=dMinX1 - dMinX2;
      if (dDiff != 0) {
        return (dDiff < 0) ? IConstants.LESS : IConstants.MORE;
      }
 else {
        final double dMaxX1=bo1.getLeft() + bo1.getWidth();
        final double dMaxX2=bo2.getLeft() + bo2.getWidth();
        dDiff=dMaxX1 - dMaxX2;
        if (dDiff != 0) {
          return (dDiff < 0) ? IConstants.LESS : IConstants.MORE;
        }
 else {
          return IConstants.EQUAL;
        }
      }
    }
  }
}

Fixed version (ground truth):
/** 
 * Compare two bounds regularly.
 * @param bo1
 * @param bo2
 * @return
 */
public static final int compareRegular(Bounds bo1,Bounds bo2){
  final double dMinX1=bo1.getLeft();
  final double dMinX2=bo2.getLeft();
  double dDiff=dMinX1 - dMinX2;
  if (dDiff != 0) {
    return (dDiff < 0) ? IConstants.LESS : IConstants.MORE;
  }
 else {
    final double dMaxX1=bo1.getLeft() + bo1.getWidth();
    final double dMaxX2=bo2.getLeft() + bo2.getWidth();
    dDiff=dMaxX1 - dMaxX2;
    if (dDiff != 0) {
      return (dDiff < 0) ? IConstants.LESS : IConstants.MORE;
    }
 else {
      final double dMinY1=bo1.getTop();
      final double dMinY2=bo2.getTop();
      dDiff=dMinY1 - dMinY2;
      if (dDiff != 0) {
        return (dDiff < 0) ? IConstants.MORE : IConstants.LESS;
      }
 else {
        final double dMaxY1=bo1.getTop() + bo1.getHeight();
        final double dMaxY2=bo2.getTop() + bo2.getHeight();
        dDiff=dMaxY1 - dMaxY2;
        if (dDiff != 0) {
          return (dDiff < 0) ? IConstants.MORE : IConstants.LESS;
        }
 else {
          return IConstants.EQUAL;
        }
      }
    }
  }
}
Program: 66250
Project: 66250
Buggy source:
/** 
 * Compare two bounds in transposed way.
 * @param bo1
 * @param bo2
 * @return
 */
public static final int compareTransposed(Bounds bo1,Bounds bo2){
  final double dMinX1=bo1.getLeft();
  final double dMinX2=bo2.getLeft();
  double dDiff=dMinX1 - dMinX2;
  if (dDiff != 0) {
    return (dDiff < 0) ? IConstants.LESS : IConstants.MORE;
  }
 else {
    final double dMaxX1=bo1.getLeft() + bo1.getWidth();
    final double dMaxX2=bo2.getLeft() + bo2.getWidth();
    dDiff=dMaxX1 - dMaxX2;
    if (dDiff != 0) {
      return (dDiff < 0) ? IConstants.LESS : IConstants.MORE;
    }
 else {
      final double dMinY1=bo1.getTop() + bo1.getHeight();
      final double dMinY2=bo2.getTop() + bo2.getHeight();
      dDiff=dMinY1 - dMinY2;
      if (dDiff != 0) {
        return (dDiff < 0) ? IConstants.MORE : IConstants.LESS;
      }
 else {
        final double dMaxY1=bo1.getTop();
        final double dMaxY2=bo2.getTop();
        dDiff=dMaxY1 - dMaxY2;
        if (dDiff != 0) {
          return (dDiff < 0) ? IConstants.MORE : IConstants.LESS;
        }
 else {
          return IConstants.EQUAL;
        }
      }
    }
  }
}

Fixed version (ground truth):
/** 
 * Compare two bounds in transposed way.
 * @param bo1
 * @param bo2
 * @return
 */
public static final int compareTransposed(Bounds bo1,Bounds bo2){
  final double dMinY1=bo1.getTop() + bo1.getHeight();
  final double dMinY2=bo2.getTop() + bo2.getHeight();
  double dDiff=dMinY1 - dMinY2;
  if (dDiff != 0) {
    return (dDiff < 0) ? IConstants.MORE : IConstants.LESS;
  }
 else {
    final double dMaxY1=bo1.getTop();
    final double dMaxY2=bo2.getTop();
    dDiff=dMaxY1 - dMaxY2;
    if (dDiff != 0) {
      return (dDiff < 0) ? IConstants.MORE : IConstants.LESS;
    }
 else {
      final double dMinX1=bo1.getLeft();
      final double dMinX2=bo2.getLeft();
      dDiff=dMinX1 - dMinX2;
      if (dDiff != 0) {
        return (dDiff < 0) ? IConstants.LESS : IConstants.MORE;
      }
 else {
        final double dMaxX1=bo1.getLeft() + bo1.getWidth();
        final double dMaxX2=bo2.getLeft() + bo2.getWidth();
        dDiff=dMaxX1 - dMaxX2;
        if (dDiff != 0) {
          return (dDiff < 0) ? IConstants.LESS : IConstants.MORE;
        }
 else {
          return IConstants.EQUAL;
        }
      }
    }
  }
}
Program: 66254
Project: 66254
Buggy source:
public boolean next(){
  try {
    if (!bSubCursor) {
      return mainEdgeCursor.next();
    }
    return subEdgeCursor.next();
  }
 catch (  OLAPException e) {
    logger.log(e);
  }
  return false;
}

Fixed version (ground truth):
public boolean next(){
  try {
    if (!bSubCursor) {
      return hasNext(mainEdgeCursor);
    }
    return hasNext(subEdgeCursor);
  }
 catch (  OLAPException e) {
    logger.log(e);
  }
  return false;
}
Program: 66255
Project: 66255
Buggy source:
@Override public boolean next(){
  iIndex++;
  try {
    if (subEdgeCursor != null) {
      if (subEdgeCursor.next()) {
        return true;
      }
      lstBreaks.add(Integer.valueOf(iIndex));
      subEdgeCursor.first();
      return mainEdgeCursor.next();
    }
    return mainEdgeCursor.next();
  }
 catch (  OLAPException e) {
    logger.log(e);
  }
  return false;
}

Fixed version (ground truth):
@Override public boolean next(){
  iIndex++;
  try {
    if (subEdgeCursor != null) {
      if (hasNext(subEdgeCursor)) {
        return true;
      }
      lstBreaks.add(Integer.valueOf(iIndex));
      subEdgeCursor.first();
      return hasNext(mainEdgeCursor);
    }
    return hasNext(mainEdgeCursor);
  }
 catch (  OLAPException e) {
    logger.log(e);
  }
  return false;
}
Program: 66256
Project: 66256
Buggy source:
public boolean next(){
  iIndex++;
  try {
    if (subEdgeCursor != null) {
      boolean hasNext=false;
      while (hasNext=subEdgeCursor.next()) {
        if (fSubPositionNodes.positionIsChanged()) {
          break;
        }
      }
      fSubPositionNodes.updatePosition();
      if (hasNext) {
        return true;
      }
      lstBreaks.add(Integer.valueOf(iIndex));
      subEdgeCursor.first();
      fSubPositionNodes.updatePosition();
      hasNext=false;
      while (hasNext=mainEdgeCursor.next()) {
        if (fMainPositionNodes.positionIsChanged()) {
          break;
        }
      }
      fMainPositionNodes.updatePosition();
      if (hasNext) {
        return true;
      }
    }
 else {
      boolean hasNext=false;
      while (hasNext=mainEdgeCursor.next()) {
        if (fMainPositionNodes.positionIsChanged()) {
          break;
        }
      }
      fMainPositionNodes.updatePosition();
      if (hasNext) {
        return true;
      }
    }
  }
 catch (  OLAPException e) {
    logger.log(e);
  }
  return false;
}

Fixed version (ground truth):
public boolean next(){
  iIndex++;
  try {
    if (subEdgeCursor != null) {
      boolean hasNext=false;
      while (hasNext=hasNext(subEdgeCursor)) {
        if (fSubPositionNodes.positionIsChanged()) {
          break;
        }
      }
      fSubPositionNodes.updatePosition();
      if (hasNext) {
        return true;
      }
      lstBreaks.add(Integer.valueOf(iIndex));
      subEdgeCursor.first();
      fSubPositionNodes.updatePosition();
      hasNext=false;
      while (hasNext=hasNext(mainEdgeCursor)) {
        if (fMainPositionNodes.positionIsChanged()) {
          break;
        }
      }
      fMainPositionNodes.updatePosition();
      if (hasNext) {
        return true;
      }
    }
 else {
      boolean hasNext=false;
      while (hasNext=hasNext(mainEdgeCursor)) {
        if (fMainPositionNodes.positionIsChanged()) {
          break;
        }
      }
      fMainPositionNodes.updatePosition();
      if (hasNext) {
        return true;
      }
    }
  }
 catch (  OLAPException e) {
    logger.log(e);
  }
  return false;
}