nus-yam/ex-repair huggingface dataset:
Program: 66137
Project: 66137
Buggy source:
public void paintControl(PaintEvent pev){
  final Display d=Display.getCurrent();
  final GC gcCanvas=pev.gc;
  final Rectangle rCA=getClientArea();
  final int iWidth=rCA.height / 2 - 8;
  final int iHeight=rCA.height - 16;
  if (imgBuffer == null) {
    imgBuffer=new Image(d,rCA.width,rCA.height);
    gcBuffer=new GC(imgBuffer);
  }
  gcBuffer.setBackground(clrBG);
  gcBuffer.setForeground(d.getSystemColor(SWT.COLOR_GRAY));
  gcBuffer.fillRectangle(rCA);
  p.x=10;
  p.y=iHeight / 2 + 8;
  double dRadians;
  int x, y;
  gcBuffer.setForeground(d.getSystemColor(SWT.COLOR_BLACK));
  gcBuffer.setBackground(d.getSystemColor(SWT.COLOR_RED));
  for (int i=-90; i <= 90; i+=15) {
    dRadians=Math.toRadians(i);
    x=(int)(p.x + iWidth * Math.cos(dRadians));
    y=(int)(p.y - iWidth * Math.sin(dRadians));
    if ((i % 45) == 0) {
      bigPoint(d,gcBuffer,x,y,i == iLastAngle);
    }
 else {
      smallPoint(d,gcBuffer,x,y,i == iLastAngle);
    }
  }
  iRadius=iWidth;
  drawHand(d,gcBuffer,p.x,p.y,iRadius - 10,iLastAngle,false);
  gcCanvas.drawImage(imgBuffer,0,0);
}

Fixed version (ground truth):
public void paintControl(PaintEvent pev){
  final Display d=Display.getCurrent();
  final GC gcCanvas=pev.gc;
  final Rectangle rCA=getClientArea();
  final int iWidth=rCA.height / 2 - 8;
  final int iHeight=rCA.height - 16;
  if (imgBuffer == null) {
    imgBuffer=new Image(d,rCA.width,rCA.height);
    gcBuffer=new GC(imgBuffer);
  }
  if (!this.isEnabled()) {
    gcBuffer.setBackground(d.getSystemColor(SWT.COLOR_WIDGET_BACKGROUND));
  }
 else {
    gcBuffer.setBackground(clrBG);
  }
  gcBuffer.setForeground(d.getSystemColor(SWT.COLOR_GRAY));
  gcBuffer.fillRectangle(rCA);
  p.x=10;
  p.y=iHeight / 2 + 8;
  double dRadians;
  int x, y;
  gcBuffer.setForeground(d.getSystemColor(SWT.COLOR_BLACK));
  gcBuffer.setBackground(d.getSystemColor(SWT.COLOR_RED));
  for (int i=-90; i <= 90; i+=15) {
    dRadians=Math.toRadians(i);
    x=(int)(p.x + iWidth * Math.cos(dRadians));
    y=(int)(p.y - iWidth * Math.sin(dRadians));
    if ((i % 45) == 0) {
      bigPoint(d,gcBuffer,x,y,i == iLastAngle);
    }
 else {
      smallPoint(d,gcBuffer,x,y,i == iLastAngle);
    }
  }
  iRadius=iWidth;
  drawHand(d,gcBuffer,p.x,p.y,iRadius - 10,iLastAngle,false);
  gcCanvas.drawImage(imgBuffer,0,0);
}
Program: 66138
Project: 66138
Buggy source:
private void selectAllToggleButtons(boolean selection){
  for (int i=0; i < listAlignmentButtons.size(); i++) {
    ((Button)listAlignmentButtons.get(i)).setSelection(selection);
  }
}

Fixed version (ground truth):
private void selectAllToggleButtons(boolean selection){
  for (int i=0; i < listAlignmentButtons.size(); i++) {
    listAlignmentButtons.get(i).setSelection(selection);
  }
}
Program: 66139
Project: 66139
Buggy source:
protected void disableAlignmentBtns(){
  for (int i=0; i < listAlignmentButtons.size(); i++) {
    ((Button)listAlignmentButtons.get(i)).setSelection(false);
    ((Button)listAlignmentButtons.get(i)).setEnabled(false);
  }
}

Fixed version (ground truth):
protected void disableAlignmentBtns(){
  for (int i=0; i < listAlignmentButtons.size(); i++) {
    listAlignmentButtons.get(i).setSelection(false);
    listAlignmentButtons.get(i).setEnabled(false);
  }
}
Program: 66141
Project: 66141
Buggy source:
public void widgetSelected(SelectionEvent event){
  if (event.widget == btnAuto) {
    if (btnAuto.getSelection()) {
      updateInsetsButtons(false);
      if (defaultInsets != null) {
        insets.unsetTop();
        insets.unsetBottom();
        insets.unsetLeft();
        insets.unsetRight();
        try {
          ChartElementUtil.setDefaultValue(insets,"String_Node_Str",defaultInsets.getTop());
          ChartElementUtil.setDefaultValue(insets,"String_Node_Str",defaultInsets.getBottom());
          ChartElementUtil.setDefaultValue(insets,"String_Node_Str",defaultInsets.getLeft());
          ChartElementUtil.setDefaultValue(insets,"String_Node_Str",defaultInsets.getRight());
        }
 catch (        ChartException e) {
          ChartWizard.displayException(e);
        }
      }
    }
 else {
      updateInsetsButtons(true);
      insets.setTop(txtTop.getValue());
      insets.setLeft(txtLeft.getValue());
      insets.setRight(txtRight.getValue());
      insets.setBottom(txtBottom.getValue());
    }
  }
}

Fixed version (ground truth):
public void widgetSelected(SelectionEvent event){
  if (event.widget == btnAuto) {
    if (btnAuto.getSelection()) {
      updateInsetsButtons(false);
      if (defaultInsets != null) {
        insets.unsetTop();
        insets.unsetBottom();
        insets.unsetLeft();
        insets.unsetRight();
        try {
          ChartElementUtil.setDefaultValue(insets,"String_Node_Str",defaultInsets.getTop());
          ChartElementUtil.setDefaultValue(insets,"String_Node_Str",defaultInsets.getBottom());
          ChartElementUtil.setDefaultValue(insets,"String_Node_Str",defaultInsets.getLeft());
          ChartElementUtil.setDefaultValue(insets,"String_Node_Str",defaultInsets.getRight());
        }
 catch (        ChartException e) {
          ChartWizard.displayException(e);
        }
      }
    }
 else {
      updateInsetsButtons(true);
      insets.setTop(txtTop.getValue());
      insets.setLeft(txtLeft.getValue());
      insets.setRight(txtRight.getValue());
      insets.setBottom(txtBottom.getValue());
    }
    updateInsetsData(insets);
  }
}
Program: 66142
Project: 66142
Buggy source:
public void setLabel(org.eclipse.birt.chart.model.component.Label lbl,String sUnits){
  this.lblCurrent=lbl;
  this.sUnits=sUnits;
  this.fBackground=lblCurrent.getBackground();
  this.laCurrent=lblCurrent.getOutline();
  if (attributesContext.isVisibilityEnabled) {
    btnVisible.setSelectionState(lblCurrent.isSetVisible() ? (lblCurrent.isVisible() ? TristateCheckbox.STATE_SELECTED : TristateCheckbox.STATE_UNSELECTED) : TristateCheckbox.STATE_GRAYED);
    setVisibleState(ChartUIExtensionUtil.canEnableUI(btnVisible) && btnVisible.isEnabled());
  }
  if (attributesContext.isLabelEnabled) {
    this.txtLabel.setText(lbl.getCaption().getValue());
  }
  if (attributesContext.isInsetsEnabled) {
    this.insets=lblCurrent.getInsets();
    this.icInsets.setInsets(insets,this.sUnits);
  }
  if (attributesContext.isShadowEnabled) {
    this.cdShadow=lblCurrent.getShadowColor();
    this.fccShadow.setFill(cdShadow);
  }
  if (attributesContext.isFontEnabled) {
    this.fdCurrent=lblCurrent.getCaption().getFont();
    this.cdFont=lblCurrent.getCaption().getColor();
    this.fdcFont.setFontDefinition(fdCurrent);
    this.fdcFont.setFontColor(cdFont);
  }
  this.fccBackground.setFill(fBackground);
  this.liacOutline.setLineAttributes(laCurrent);
  redraw();
}

Fixed version (ground truth):
public void setLabel(org.eclipse.birt.chart.model.component.Label lbl,String sUnits){
  this.lblCurrent=lbl;
  this.sUnits=sUnits;
  this.fBackground=lblCurrent.getBackground();
  this.laCurrent=lblCurrent.getOutline();
  if (attributesContext.isVisibilityEnabled) {
    btnVisible.setSelectionState(lblCurrent.isSetVisible() ? (lblCurrent.isVisible() ? TristateCheckbox.STATE_SELECTED : TristateCheckbox.STATE_UNSELECTED) : TristateCheckbox.STATE_GRAYED);
    setVisibleState(ChartUIExtensionUtil.canEnableUI(btnVisible) && btnVisible.isEnabled());
  }
  if (attributesContext.isLabelEnabled) {
    this.txtLabel.setText(getLabelText(lbl));
  }
  if (attributesContext.isInsetsEnabled) {
    this.insets=lblCurrent.getInsets();
    this.icInsets.setInsets(insets,this.sUnits);
  }
  if (attributesContext.isShadowEnabled) {
    this.cdShadow=lblCurrent.getShadowColor();
    this.fccShadow.setFill(cdShadow);
  }
  if (attributesContext.isFontEnabled) {
    this.fdCurrent=lblCurrent.getCaption().getFont();
    this.cdFont=lblCurrent.getCaption().getColor();
    this.fdcFont.setFontDefinition(fdCurrent);
    this.fdcFont.setFontColor(cdFont);
  }
  this.fccBackground.setFill(fBackground);
  this.liacOutline.setLineAttributes(laCurrent);
  redraw();
}
Program: 66143
Project: 66143
Buggy source:
public void handleEvent(Event event){
  if (event.widget.equals(iscStartAngle)) {
    series.getDial().setStartAngle(((Integer)event.data).intValue());
  }
 else   if (event.widget.equals(iscStopAngle)) {
    series.getDial().setStopAngle(((Integer)event.data).intValue());
  }
 else   if (event.widget.equals(fcc)) {
    series.getDial().setFill((Fill)event.data);
  }
 else   if (event.widget == btnRadiusAuto) {
    ChartElementUtil.setEObjectAttribute(series.getDial(),"String_Node_Str",txtRadius.getValue(),btnRadiusAuto.getSelection());
    txtRadius.setEnabled(!btnRadiusAuto.getSelection());
  }
 else   if (event.widget == btnStartAngleAuto) {
    ChartElementUtil.setEObjectAttribute(series.getDial(),"String_Node_Str",(double)iscStartAngle.getValue(),btnStartAngleAuto.getSelection());
    iscStartAngle.setEnabled(!btnStartAngleAuto.getSelection());
  }
 else   if (event.widget == btnStopAngleAuto) {
    ChartElementUtil.setEObjectAttribute(series.getDial(),"String_Node_Str",(double)iscStopAngle.getValue(),btnStopAngleAuto.getSelection());
    iscStopAngle.setEnabled(!btnStopAngleAuto.getSelection());
  }
}

Fixed version (ground truth):
public void handleEvent(Event event){
  if (event.widget.equals(iscStartAngle)) {
    series.getDial().setStartAngle(((Integer)event.data).intValue());
  }
 else   if (event.widget.equals(iscStopAngle)) {
    series.getDial().setStopAngle(((Integer)event.data).intValue());
  }
 else   if (event.widget.equals(fcc)) {
    series.getDial().setFill((Fill)event.data);
  }
 else   if (event.widget == btnRadiusAuto) {
    ChartElementUtil.setEObjectAttribute(series.getDial(),"String_Node_Str",txtRadius.getValue(),btnRadiusAuto.getSelection());
    txtRadius.setEnabled(!btnRadiusAuto.getSelection());
    if (!series.getDial().isSetRadius()) {
      txtRadius.unsetValue();
    }
  }
 else   if (event.widget == btnStartAngleAuto) {
    ChartElementUtil.setEObjectAttribute(series.getDial(),"String_Node_Str",(double)iscStartAngle.getValue(),btnStartAngleAuto.getSelection());
    iscStartAngle.setEnabled(!btnStartAngleAuto.getSelection());
    iscStartAngle.setValue((int)(series.getDial().getStartAngle()));
  }
 else   if (event.widget == btnStopAngleAuto) {
    ChartElementUtil.setEObjectAttribute(series.getDial(),"String_Node_Str",(double)iscStopAngle.getValue(),btnStopAngleAuto.getSelection());
    iscStopAngle.setEnabled(!btnStopAngleAuto.getSelection());
    iscStopAngle.setValue((int)(series.getDial().getStopAngle()));
  }
}
Program: 66146
Project: 66146
Buggy source:
private void updateEmptyMessageUIStates(){
  boolean bEnabled=getChart().getEmptyMessage().isSetVisible() && getChart().getEmptyMessage().isVisible();
  txtEmptyMsg.setEnabled(bEnabled);
  fdcEmptyMsg.setEnabled(bEnabled);
  lbTxtEmptyMsg.setEnabled(bEnabled);
  lbFdcEmptyMsg.setEnabled(bEnabled);
}

Fixed version (ground truth):
private void updateEmptyMessageUIStates(){
  boolean bEnabled=!ChartUIExtensionUtil.isSetInvisible(getChart().getEmptyMessage());
  txtEmptyMsg.setEnabled(bEnabled);
  fdcEmptyMsg.setEnabled(bEnabled);
  lbTxtEmptyMsg.setEnabled(bEnabled);
  lbFdcEmptyMsg.setEnabled(bEnabled);
}
Program: 66150
Project: 66150
Buggy source:
private void populateLists(){
  buildList();
  NameSet ns=LiteralHelper.anchorSet;
  cmbLineAnchor.setItems(ChartUIExtensionUtil.getItemsWithAuto(ns.getDisplayNames()));
  cmbLineAnchor.select(0);
  cmbRangeAnchor.setItems(ChartUIExtensionUtil.getItemsWithAuto(ns.getDisplayNames()));
  cmbRangeAnchor.select(0);
  if (lstMarkers.getItemCount() > 0) {
    lstMarkers.select(0);
    updateUIForSelection();
  }
 else {
    setState(false);
  }
}

Fixed version (ground truth):
private void populateLists(){
  buildList();
  NameSet ns=LiteralHelper.anchorSet;
  cmbLineAnchor.setItems(ChartUIExtensionUtil.getItemsWithAuto(ns.getDisplayNames()));
  cmbLineAnchor.select(0);
  cmbRangeAnchor.setItems(ChartUIExtensionUtil.getItemsWithAuto(ns.getDisplayNames()));
  cmbRangeAnchor.select(0);
  if (lstMarkers.getItemCount() > 0) {
    lstMarkers.select(0);
    updateUIForSelection();
    setState(true);
  }
 else {
    setState(false);
  }
}
Program: 66151
Project: 66151
Buggy source:
public IStructure createInstance(Object[] fields){
  Object[][] objectArrays=ObjectArrayUtil.convert(fields);
  Row4Aggregation result=new Row4Aggregation();
  int memberSize=(Integer)objectArrays[0][0];
  result.setLevelMembers(new Member[memberSize]);
  for (int i=0; i < result.getLevelMembers().length; i++) {
    result.getLevelMembers()[i]=(Member)levelMemberCreator.createInstance(objectArrays[i + 1]);
  }
  result.setMeasures(objectArrays[memberSize + 1]);
  for (int i=0; i < (objectArrays.length - memberSize - 1- 3); i++) {
    result.addMeasure(objectArrays[memberSize + 1 + i+ 1]);
  }
  result.setParameterValues(objectArrays[objectArrays.length - 2]);
  if (objectArrays[objectArrays.length - 1][0].equals(Integer.valueOf(1))) {
    int[] dimPos=new int[objectArrays[objectArrays.length - 1].length - 1];
    for (int i=0; i < dimPos.length; i++) {
      dimPos[i]=((Integer)(objectArrays[objectArrays.length - 1][i + 1])).intValue();
    }
    result.setDimPos(dimPos);
  }
  return result;
}

Fixed version (ground truth):
public IStructure createInstance(Object[] fields){
  Object[][] objectArrays=ObjectArrayUtil.convert(fields);
  Row4Aggregation result=new Row4Aggregation();
  int memberSize=(Integer)objectArrays[0][0];
  result.setLevelMembers(new Member[memberSize]);
  for (int i=0; i < result.getLevelMembers().length; i++) {
    result.getLevelMembers()[i]=(Member)levelMemberCreator.createInstance(objectArrays[i + 1]);
  }
  result.setParameterValues(objectArrays[memberSize + 1]);
  if (objectArrays[memberSize + 2][0].equals(Integer.valueOf(1))) {
    int[] dimPos=new int[objectArrays[memberSize + 2].length - 1];
    for (int i=0; i < dimPos.length; i++) {
      dimPos[i]=((Integer)(objectArrays[memberSize + 2][i + 1])).intValue();
    }
    result.setDimPos(dimPos);
  }
  result.setMeasures(objectArrays[memberSize + 3]);
  for (int i=0; i < (objectArrays.length - memberSize - 1- 3); i++) {
    result.addMeasure(objectArrays[memberSize + 3 + i+ 1]);
  }
  return result;
}
Program: 66152
Project: 66152
Buggy source:
public Object[] getFieldValues(){
  Integer[] memberSize=new Integer[1];
  memberSize[0]=Integer.valueOf(getLevelMembers().length);
  Object[][] objectArrays=new Object[getLevelMembers().length + 1 + 3+ measureList.size()][];
  objectArrays[0]=memberSize;
  for (int i=0; i < getLevelMembers().length; i++) {
    objectArrays[i + 1]=getLevelMembers()[i].getFieldValues();
  }
  objectArrays[getLevelMembers().length + 1]=measures;
  for (int i=0; i < measureList.size(); i++) {
    objectArrays[getLevelMembers().length + i + 2]=measureList.get(i);
  }
  objectArrays[objectArrays.length - 2]=parameterValues;
  Integer[] dimPosObj=null;
  if (dimPos == null) {
    dimPosObj=new Integer[1];
    dimPosObj[0]=Integer.valueOf(0);
  }
 else {
    dimPosObj=new Integer[dimPos.length + 1];
    dimPosObj[0]=Integer.valueOf(1);
    for (int i=0; i < dimPos.length; i++) {
      dimPosObj[i + 1]=Integer.valueOf(dimPos[i]);
    }
  }
  objectArrays[objectArrays.length - 1]=dimPosObj;
  return ObjectArrayUtil.convert(objectArrays);
}

Fixed version (ground truth):
public Object[] getFieldValues(){
  Integer[] memberSize=new Integer[1];
  memberSize[0]=Integer.valueOf(getLevelMembers().length);
  Object[][] objectArrays=new Object[getLevelMembers().length + 1 + 3+ measureList.size()][];
  objectArrays[0]=memberSize;
  for (int i=0; i < getLevelMembers().length; i++) {
    objectArrays[i + 1]=getLevelMembers()[i].getFieldValues();
  }
  objectArrays[getLevelMembers().length + 1]=parameterValues;
  Integer[] dimPosObj=null;
  if (dimPos == null) {
    dimPosObj=new Integer[1];
    dimPosObj[0]=Integer.valueOf(0);
  }
 else {
    dimPosObj=new Integer[dimPos.length + 1];
    dimPosObj[0]=Integer.valueOf(1);
    for (int i=0; i < dimPos.length; i++) {
      dimPosObj[i + 1]=Integer.valueOf(dimPos[i]);
    }
  }
  objectArrays[getLevelMembers().length + 2]=dimPosObj;
  objectArrays[getLevelMembers().length + 3]=measures;
  for (int i=0; i < measureList.size(); i++) {
    objectArrays[getLevelMembers().length + i + 4]=measureList.get(i);
  }
  return ObjectArrayUtil.convert(objectArrays);
}
Program: 66153
Project: 66153
Buggy source:
protected void writeObject(Object object) throws IOException {
  if (object == null) {
    randomAccessFile.writeShort(NULL_VALUE);
    return;
  }
  IStructure cachedObject=(IStructure)object;
  Object[] objects=cachedObject.getFieldValues();
  randomAccessFile.writeShort((short)objects.length);
  if (fieldWriters == null) {
    createReadersAndWriters(objects.length);
  }
  for (int i=0; i < objects.length; i++) {
    if (i >= fieldWriters.length) {
      fieldWriters[fieldWriters.length - 1].write(randomAccessFile,objects[i]);
    }
 else {
      fieldWriters[i].write(randomAccessFile,objects[i]);
    }
  }
}

Fixed version (ground truth):
protected void writeObject(Object object) throws IOException {
  if (object == null) {
    randomAccessFile.writeShort(NULL_VALUE);
    return;
  }
  IStructure cachedObject=(IStructure)object;
  Object[] objects=cachedObject.getFieldValues();
  randomAccessFile.writeShort((short)objects.length);
  if (fieldWriters == null || fieldWriters.length < objects.length) {
    createReadersAndWriters(objects.length);
  }
  for (int i=0; i < objects.length; i++) {
    if (i >= fieldWriters.length) {
      fieldWriters[fieldWriters.length - 1].write(randomAccessFile,objects[i]);
    }
 else {
      fieldWriters[i].write(randomAccessFile,objects[i]);
    }
  }
}
Program: 66154
Project: 66154
Buggy source:
/** 
 * Returns instance of <code>ChartStyleProcessorProxy</code>.
 * @return
 */
public ChartStyleProcessorProxy getStyleProcessorProxy(){
  return this.styleProcessorProxy;
}

Fixed version (ground truth):
/** 
 * Returns instance of <code>ChartStyleProcessorProxy</code>.
 * @return instance of ChartStyleProcessorProxy.
 */
public ChartStyleProcessorProxy getStyleProcessorProxy(){
  return this.styleProcessorProxy;
}
Program: 66155
Project: 66155
Buggy source:
/** 
 * Indicates if chart need to inherit basic styles from container.
 * @return
 */
public boolean needInheritingStyles(){
  return true;
}

Fixed version (ground truth):
/** 
 * Indicates if chart need to inherit basic styles from container.
 * @return true if it needs to inherit styles.
 */
public boolean needInheritingStyles(){
  return true;
}
Program: 66156
Project: 66156
Buggy source:
/** 
 * Returns format info of chart's category.
 * @return
 */
public FormatInfo getCategoryFormat(){
  return this.categoryFormat;
}

Fixed version (ground truth):
/** 
 * Returns format info of chart's category.
 * @return object of format info.
 */
public FormatInfo getCategoryFormat(){
  return this.categoryFormat;
}
Program: 66157
Project: 66157
Buggy source:
protected void refreshChart(String type,String subType){
  ChartAdapter.beginIgnoreNotifications();
  IChartType chartType=ChartUIUtil.getChartType(type);
  try {
    chartModel=chartType.getModel(subType,this.orientation,this.sDimension,this.chartModel);
    if (getDataServiceProvider().checkState(IDataServiceProvider.PART_CHART)) {
      ChartWithAxes cwa=(ChartWithAxes)chartModel;
      cwa.getAxes().get(0).setCategoryAxis(true);
      if (cwa.isTransposed()) {
        cwa.setReverseCategory(true);
      }
    }
    ((ChartWizardContext)context).setModel(chartModel);
    ((ChartWizardContext)context).setChartType(chartType);
    updateAdapters();
    ChartWizard.removeException(ChartWizard.TaskSelType_refreCh_ID);
  }
 catch (  Exception e) {
    ChartWizard.showException(ChartWizard.TaskSelType_refreCh_ID,e.getLocalizedMessage());
  }
  ChartAdapter.endIgnoreNotifications();
  updateSelection();
  ((ChartWizardContext)context).setModel(chartModel);
  ((ChartWizardContext)context).setChartType(chartType);
  setContext(context);
}

Fixed version (ground truth):
protected void refreshChart(String type,String subType){
  ChartAdapter.beginIgnoreNotifications();
  IChartType chartType=ChartUIUtil.getChartType(type);
  try {
    chartModel=chartType.getModel(subType,this.orientation,this.sDimension,this.chartModel);
    if (getDataServiceProvider().checkState(IDataServiceProvider.PART_CHART)) {
      ChartWithAxes cwa=(ChartWithAxes)chartModel;
      cwa.getAxes().get(0).setCategoryAxis(true);
      if (cwa.isTransposed()) {
        cwa.setReverseCategory(true);
      }
    }
    updateAdapters();
    ChartWizard.removeException(ChartWizard.TaskSelType_refreCh_ID);
  }
 catch (  Exception e) {
    ChartWizard.showException(ChartWizard.TaskSelType_refreCh_ID,e.getLocalizedMessage());
  }
  ChartAdapter.endIgnoreNotifications();
  updateSelection();
  ((ChartWizardContext)context).setModel(chartModel);
  ((ChartWizardContext)context).setChartType(chartType);
  setContext(context);
}
Program: 66158
Project: 66158
Buggy source:
/** 
 * Creates a UI to process format specifier.
 * @param shellParent
 * @param title
 * @param axisType
 * @param formatspecifier
 * @param target
 * @param attrName
 * @param context
 * @return
 */
FormatSpecifier handleFormatSpecifier(Shell shellParent,String title,AxisType[] axisTypes,FormatSpecifier formatspecifier,EObject target,String attrName,ChartWizardContext context);

Fixed version (ground truth):
/** 
 * Creates a UI to process format specifier.
 * @param shellParent
 * @param title
 * @param axisType
 * @param formatspecifier
 * @param target
 * @param attrName
 * @param context
 * @return instance of format specifier
 */
FormatSpecifier handleFormatSpecifier(Shell shellParent,String title,AxisType[] axisTypes,FormatSpecifier formatspecifier,EObject target,String attrName,ChartWizardContext context);
Program: 66160
Project: 66160
Buggy source:
/** 
 * In SWING, polygons are defined with 'int' co-ordinates. There is no concept of a Polygon2D. As a result, we downgrade high-res 'double' co-ordinates to 'int' co-ordinates.
 * @param la
 * @return
 */
public static final int[][] getCoordinatesAsInts(Location[] la){
  final int n=la.length;
  final int[] iaX=new int[n];
  final int[] iaY=new int[n];
  for (int i=0; i < n; i++) {
    iaX[i]=(int)la[i].getX();
    iaY[i]=(int)la[i].getY();
  }
  return new int[][]{iaX,iaY};
}

Fixed version (ground truth):
/** 
 * In SWING, polygons are defined with 'int' co-ordinates. There is no concept of a Polygon2D. As a result, we downgrade high-res 'double' co-ordinates to 'int' co-ordinates.
 * @param la
 * @return array of coordinates
 */
public static final int[][] getCoordinatesAsInts(Location[] la){
  final int n=la.length;
  final int[] iaX=new int[n];
  final int[] iaY=new int[n];
  for (int i=0; i < n; i++) {
    iaX[i]=(int)la[i].getX();
    iaY[i]=(int)la[i].getY();
  }
  return new int[][]{iaX,iaY};
}
Program: 66165
Project: 66165
Buggy source:
protected Composite getComponent(Composite parent){
  ChartUIUtil.bindHelp(parent,ChartHelpContextIds.POPUP_LEGEND_TITLE);
  cmpContent=new Composite(parent,SWT.NONE);
{
    GridLayout glMain=new GridLayout();
    glMain.horizontalSpacing=5;
    glMain.verticalSpacing=5;
    glMain.marginHeight=7;
    glMain.marginWidth=7;
    cmpContent.setLayout(glMain);
  }
  LabelAttributesContext attributesContext=new LabelAttributesContext();
  attributesContext.isVisibilityEnabled=!ChartUIExtensionUtil.isSetInvisible(getChart().getTitle());
  attributesContext.isFontAlignmentEnabled=false;
  lacTitle=new LabelAttributesComposite(cmpContent,SWT.NONE,getContext(),attributesContext,Messages.getString("String_Node_Str"),getLegend().isSetTitlePosition() ? getLegend().getTitlePosition() : null,getLegend().getTitle(),getChart().getUnits(),LabelAttributesComposite.ALLOW_VERTICAL_POSITION | LabelAttributesComposite.ALLOW_HORIZONTAL_POSITION);
{
    GridData gdLACTitle=new GridData(GridData.FILL_BOTH);
    gdLACTitle.verticalSpan=2;
    lacTitle.setLayoutData(gdLACTitle);
    lacTitle.addListener(this);
    lacTitle.setEnabled(!ChartUIExtensionUtil.isSetInvisible(getLegend().getTitle()));
    lacTitle.setDefaultLabelValue(DefaultValueProvider.defLegend().getTitle());
  }
  return cmpContent;
}

Fixed version (ground truth):
protected Composite getComponent(Composite parent){
  ChartUIUtil.bindHelp(parent,ChartHelpContextIds.POPUP_LEGEND_TITLE);
  cmpContent=new Composite(parent,SWT.NONE);
{
    GridLayout glMain=new GridLayout();
    glMain.horizontalSpacing=5;
    glMain.verticalSpacing=5;
    glMain.marginHeight=7;
    glMain.marginWidth=7;
    cmpContent.setLayout(glMain);
  }
  LabelAttributesContext attributesContext=new LabelAttributesContext();
  attributesContext.isVisibilityEnabled=false;
  attributesContext.isFontAlignmentEnabled=false;
  lacTitle=new LabelAttributesComposite(cmpContent,SWT.NONE,getContext(),attributesContext,Messages.getString("String_Node_Str"),getLegend().isSetTitlePosition() ? getLegend().getTitlePosition() : null,getLegend().getTitle(),getChart().getUnits(),LabelAttributesComposite.ALLOW_VERTICAL_POSITION | LabelAttributesComposite.ALLOW_HORIZONTAL_POSITION);
{
    GridData gdLACTitle=new GridData(GridData.FILL_BOTH);
    gdLACTitle.verticalSpan=2;
    lacTitle.setLayoutData(gdLACTitle);
    lacTitle.addListener(this);
    lacTitle.setEnabled(!ChartUIExtensionUtil.isSetInvisible(getLegend().getTitle()));
    lacTitle.setDefaultLabelValue(DefaultValueProvider.defLegend().getTitle());
  }
  return cmpContent;
}
Program: 66166
Project: 66166
Buggy source:
/** 
 * @throws IOException
 * @throws DataException 
 */
private void populateEdge() throws IOException, DataException {
  int count=0;
  if (cubeView.getColumnEdgeView() != null) {
    if (cubeView.getAppContext() != null) {
      int limitSize=populateFetchLimitSize(cubeView.getAppContext().get(DataEngine.CUBECURSOR_FETCH_LIMIT_ON_COLUMN_EDGE));
      if (limitSize > 0 && limitSize < rsArray[count].length()) {
        throw new DataException(ResourceConstants.RESULT_LENGTH_EXCEED_COLUMN_LIMIT,new Object[]{limitSize});
      }
    }
    this.columnEdgeAxis=new EdgeAxis(rsArray[count],cubeView.getColumnEdgeView(),cubeQueryExecutorHelper.getColumnSort(),false);
    cubeView.getColumnEdgeView().setEdgeAxis(this.columnEdgeAxis);
    count++;
  }
  if (cubeView.getRowEdgeView() != null) {
    if (cubeView.getAppContext() != null) {
      int limitSize=populateFetchLimitSize(cubeView.getAppContext().get(DataEngine.CUBECUSROR_FETCH_LIMIT_ON_ROW_EDGE));
      if (limitSize > 0 && limitSize < rsArray[count].length()) {
        throw new DataException(ResourceConstants.RESULT_LENGTH_EXCEED_ROW_LIMIT,new Object[]{limitSize});
      }
    }
    this.rowEdgeAxis=new EdgeAxis(rsArray[count],cubeView.getRowEdgeView(),cubeQueryExecutorHelper.getRowSort(),false);
    cubeView.getRowEdgeView().setEdgeAxis(this.rowEdgeAxis);
    count++;
  }
  if (cubeView.getPageEdgeView() != null) {
    this.pageEdgeAxis=new EdgeAxis(rsArray[count],cubeView.getPageEdgeView(),cubeQueryExecutorHelper.getPageSort(),false);
    cubeView.getPageEdgeView().setEdgeAxis(this.pageEdgeAxis);
    count++;
  }
  if (rsArray.length > count) {
    calculatedEdgeAxis=new EdgeAxis[rsArray.length - count];
    for (int i=count; i < rsArray.length; i++) {
      calculatedEdgeAxis[i - count]=new EdgeAxis(rsArray[i],cubeView.getMeasureEdgeView()[i - count],true);
    }
  }
}

Fixed version (ground truth):
/** 
 * @throws IOException
 * @throws DataException 
 */
private void populateEdge() throws IOException, DataException {
  int count=0;
  if (cubeView.getColumnEdgeView() != null) {
    this.columnEdgeAxis=new EdgeAxis(rsArray[count],cubeView.getColumnEdgeView(),cubeQueryExecutorHelper.getColumnSort(),false);
    cubeView.getColumnEdgeView().setEdgeAxis(this.columnEdgeAxis);
    count++;
  }
  if (cubeView.getRowEdgeView() != null) {
    this.rowEdgeAxis=new EdgeAxis(rsArray[count],cubeView.getRowEdgeView(),cubeQueryExecutorHelper.getRowSort(),false);
    cubeView.getRowEdgeView().setEdgeAxis(this.rowEdgeAxis);
    count++;
  }
  if (cubeView.getPageEdgeView() != null) {
    this.pageEdgeAxis=new EdgeAxis(rsArray[count],cubeView.getPageEdgeView(),cubeQueryExecutorHelper.getPageSort(),false);
    cubeView.getPageEdgeView().setEdgeAxis(this.pageEdgeAxis);
    count++;
  }
  if (rsArray.length > count) {
    calculatedEdgeAxis=new EdgeAxis[rsArray.length - count];
    for (int i=count; i < rsArray.length; i++) {
      calculatedEdgeAxis[i - count]=new EdgeAxis(rsArray[i],cubeView.getMeasureEdgeView()[i - count],true);
    }
  }
}
Program: 66168
Project: 66168
Buggy source:
private IAggregationResultSet[] executeQuery(BirtCubeView view,AggregationDefinition[] aggrDefns,boolean saveToRD,String queryResutID) throws IOException, BirtException {
  IAggregationResultSet[] rs;
  CubeQueryExecutor executor=view.getCubeQueryExecutor();
  rs=cubeQueryExecutorHelper.execute(aggrDefns,executor.getSession().getStopSign());
  MirrorOperationExecutor moe=new MirrorOperationExecutor();
  rs=moe.execute(rs,view,cubeQueryExecutorHelper);
  if (executor.getCubeQueryDefinition().cacheQueryResults()) {
    File tmpDir=new File(executor.getSession().getTempDir());
    if (!FileSecurity.fileExist(tmpDir) || !FileSecurity.fileIsDirectory(tmpDir)) {
      FileSecurity.fileMakeDirs(tmpDir);
    }
    ArchiveWriter writer=new ArchiveWriter(new ArchiveFile(executor.getSession().getTempDir() + "String_Node_Str","String_Node_Str"));
    AggregationResultSetSaveUtil.save(queryResutID,rs,writer);
    writer.finish();
  }
  if (saveToRD) {
    CubeQueryDefinitionIOUtil.save(queryResutID,executor.getContext().getDocWriter(),executor.getCubeQueryDefinition());
    AggregationResultSetSaveUtil.save(queryResutID,rs,executor.getContext().getDocWriter());
  }
  return rs;
}

Fixed version (ground truth):
private IAggregationResultSet[] executeQuery(BirtCubeView view,AggregationDefinition[] aggrDefns,boolean saveToRD,String queryResutID) throws IOException, BirtException {
  IAggregationResultSet[] rs;
  CubeQueryExecutor executor=view.getCubeQueryExecutor();
  rs=cubeQueryExecutorHelper.execute(aggrDefns,executor.getSession().getStopSign());
  MirrorOperationExecutor moe=new MirrorOperationExecutor();
  rs=moe.execute(rs,view,cubeQueryExecutorHelper);
  validateLimitSetting(view,rs);
  if (executor.getCubeQueryDefinition().cacheQueryResults()) {
    File tmpDir=new File(executor.getSession().getTempDir());
    if (!FileSecurity.fileExist(tmpDir) || !FileSecurity.fileIsDirectory(tmpDir)) {
      FileSecurity.fileMakeDirs(tmpDir);
    }
    ArchiveWriter writer=new ArchiveWriter(new ArchiveFile(executor.getSession().getTempDir() + "String_Node_Str","String_Node_Str"));
    AggregationResultSetSaveUtil.save(queryResutID,rs,writer);
    writer.finish();
  }
  if (saveToRD) {
    CubeQueryDefinitionIOUtil.save(queryResutID,executor.getContext().getDocWriter(),executor.getCubeQueryDefinition());
    AggregationResultSetSaveUtil.save(queryResutID,rs,executor.getContext().getDocWriter());
  }
  return rs;
}
Program: 66170
Project: 66170
Buggy source:
/** 
 * NOTE: Manually written
 * @param iRed
 * @param iGreen
 * @param iBlue
 * @return
 */
public static final ColorDefinition create(int iRed,int iGreen,int iBlue){
  final ColorDefinition cd=AttributeFactory.eINSTANCE.createColorDefinition();
  cd.set(iRed,iGreen,iBlue);
  return cd;
}

Fixed version (ground truth):
/** 
 * NOTE: Manually written
 * @param iRed
 * @param iGreen
 * @param iBlue
 * @return color definition instance with setting 'isSet' flag.
 */
public static final ColorDefinition create(int iRed,int iGreen,int iBlue){
  final ColorDefinition cd=AttributeFactory.eINSTANCE.createColorDefinition();
  cd.set(iRed,iGreen,iBlue);
  return cd;
}
Program: 66171
Project: 66171
Buggy source:
/** 
 * @param loc
 * @return
 */
public static double[] getYArray(Location3D[] loc){
  double[] ya=new double[loc.length];
  for (int i=0; i < loc.length; i++) {
    ya[i]=loc[i].getY();
  }
  return ya;
}

Fixed version (ground truth):
/** 
 * @param loc
 * @return y locations.
 */
public static double[] getYArray(Location3D[] loc){
  double[] ya=new double[loc.length];
  for (int i=0; i < loc.length; i++) {
    ya[i]=loc[i].getY();
  }
  return ya;
}
Program: 66172
Project: 66172
Buggy source:
/** 
 * @param loc
 * @return
 */
public static double[] getXArray(Location3D[] loc){
  double[] xa=new double[loc.length];
  for (int i=0; i < loc.length; i++) {
    xa[i]=loc[i].getX();
  }
  return xa;
}

Fixed version (ground truth):
/** 
 * @param loc
 * @return x locations.
 */
public static double[] getXArray(Location3D[] loc){
  double[] xa=new double[loc.length];
  for (int i=0; i < loc.length; i++) {
    xa[i]=loc[i].getX();
  }
  return xa;
}
Program: 66173
Project: 66173
Buggy source:
/** 
 * @param xa
 * @param ya
 * @param za
 * @return
 */
public static final Location3D[] create(double[] xa,double[] ya,double[] za){
  Location3D[] loa=new Location3D[xa.length];
  for (int i=0; i < loa.length; i++) {
    loa[i]=create(xa[i],ya[i],za[i]);
  }
  return loa;
}

Fixed version (ground truth):
/** 
 * @param xa
 * @param ya
 * @param za
 * @return location 3d instance with setting 'isSet' flag.
 */
public static final Location3D[] create(double[] xa,double[] ya,double[] za){
  Location3D[] loa=new Location3D[xa.length];
  for (int i=0; i < loa.length; i++) {
    loa[i]=create(xa[i],ya[i],za[i]);
  }
  return loa;
}
Program: 66174
Project: 66174
Buggy source:
/** 
 * @param loc
 * @return
 */
public static double[] getZArray(Location3D[] loc){
  double[] za=new double[loc.length];
  for (int i=0; i < loc.length; i++) {
    za[i]=loc[i].getZ();
  }
  return za;
}

Fixed version (ground truth):
/** 
 * @param loc
 * @return z locations.
 */
public static double[] getZArray(Location3D[] loc){
  double[] za=new double[loc.length];
  for (int i=0; i < loc.length; i++) {
    za[i]=loc[i].getZ();
  }
  return za;
}
Program: 66175
Project: 66175
Buggy source:
/** 
 * For accelerating graphic purpose make a fast copy of a Marker without iconPalette, which is obsolete, and the fill, which will be changed in many cases. Using the setFillSimple to set the fill faster.
 * @param src
 * @return
 */
public static final Marker copyInstanceNoFill(Marker src){
  if (src == null) {
    return null;
  }
  MarkerImpl mk=new MarkerImpl();
  mk.type=src.getType();
  mk.size=src.getSize();
  mk.sizeESet=src.isSetSize();
  mk.visible=src.isVisible();
  mk.visibleESet=src.isSetVisible();
  LineAttributes tOutline=src.getOutline();
  if (tOutline != null) {
    mk.outline=tOutline.copyInstance();
  }
  return mk;
}

Fixed version (ground truth):
/** 
 * For accelerating graphic purpose make a fast copy of a Marker without iconPalette, which is obsolete, and the fill, which will be changed in many cases. Using the setFillSimple to set the fill faster.
 * @param src
 * @return marker instance
 */
public static final Marker copyInstanceNoFill(Marker src){
  if (src == null) {
    return null;
  }
  MarkerImpl mk=new MarkerImpl();
  mk.type=src.getType();
  mk.size=src.getSize();
  mk.sizeESet=src.isSetSize();
  mk.visible=src.isVisible();
  mk.visibleESet=src.isSetVisible();
  LineAttributes tOutline=src.getOutline();
  if (tOutline != null) {
    mk.outline=tOutline.copyInstance();
  }
  return mk;
}
Program: 66176
Project: 66176
Buggy source:
protected void initDefault(){
  super.initDefault();
  for (Iterator itr=getMarkers().iterator(); itr.hasNext(); ) {
    Marker mk=(Marker)itr.next();
    try {
      ChartElementUtil.setDefaultValue(mk,"String_Node_Str",false);
    }
 catch (    ChartException e) {
    }
  }
}

Fixed version (ground truth):
protected void initDefault(){
  super.initDefault();
  for (Iterator<Marker> itr=getMarkers().iterator(); itr.hasNext(); ) {
    Marker mk=itr.next();
    try {
      ChartElementUtil.setDefaultValue(mk,"String_Node_Str",false);
    }
 catch (    ChartException e) {
    }
  }
}
Program: 66177
Project: 66177
Buggy source:
public void translateFrom(Series series,int iSeriesDefinitionIndex,Chart chart){
  super.translateFrom(series,iSeriesDefinitionIndex,chart);
  for (Iterator itr=getMarkers().iterator(); itr.hasNext(); ) {
    Marker mk=(Marker)itr.next();
    mk.setVisible(false);
  }
}

Fixed version (ground truth):
public void translateFrom(Series series,int iSeriesDefinitionIndex,Chart chart){
  super.translateFrom(series,iSeriesDefinitionIndex,chart);
  for (Iterator<Marker> itr=getMarkers().iterator(); itr.hasNext(); ) {
    Marker mk=itr.next();
    mk.setVisible(false);
  }
}
Program: 66178
Project: 66178
Buggy source:
/** 
 * A convenience method to create an initialized 'Series' instance
 * @return
 */
public static Series create(){
  final AreaSeries as=TypeFactory.eINSTANCE.createAreaSeries();
  ((AreaSeriesImpl)as).initialize();
  return as;
}

Fixed version (ground truth):
/** 
 * A convenience method to create an initialized 'Series' instance
 * @return series instance with setting 'isSet' flag.
 */
public static Series create(){
  final AreaSeries as=TypeFactory.eINSTANCE.createAreaSeries();
  ((AreaSeriesImpl)as).initialize();
  return as;
}
Program: 66179
Project: 66179
Buggy source:
protected void initialize(){
  super.initialize();
  for (Iterator itr=getMarkers().iterator(); itr.hasNext(); ) {
    Marker mk=(Marker)itr.next();
    mk.setVisible(false);
  }
}

Fixed version (ground truth):
protected void initialize(){
  super.initialize();
  for (Iterator<Marker> itr=getMarkers().iterator(); itr.hasNext(); ) {
    Marker mk=itr.next();
    mk.setVisible(false);
  }
}
Program: 66180
Project: 66180
Buggy source:
/** 
 * A convenience method to create an initialized 'Series' instance
 * @return
 */
public static Series createDefault(){
  final AreaSeries as=TypeFactory.eINSTANCE.createAreaSeries();
  ((AreaSeriesImpl)as).initDefault();
  return as;
}

Fixed version (ground truth):
/** 
 * A convenience method to create an initialized 'Series' instance
 * @return instance of ares series without setting 'isSet' flag.
 */
public static Series createDefault(){
  final AreaSeries as=TypeFactory.eINSTANCE.createAreaSeries();
  ((AreaSeriesImpl)as).initDefault();
  return as;
}
Program: 66181
Project: 66181
Buggy source:
/** 
 * A convenience method to create an initialized 'Series' instance
 * @return
 */
public static Series create(){
  final LineSeries ls=TypeFactory.eINSTANCE.createLineSeries();
  ((LineSeriesImpl)ls).initialize();
  return ls;
}

Fixed version (ground truth):
/** 
 * A convenience method to create an initialized 'Series' instance
 * @return line series instance with setting 'isSet' flag.
 */
public static Series create(){
  final LineSeries ls=TypeFactory.eINSTANCE.createLineSeries();
  ((LineSeriesImpl)ls).initialize();
  return ls;
}
Program: 66182
Project: 66182
Buggy source:
/** 
 * A convenience method to create an initialized 'Series' instance
 * @return
 */
public static Series createDefault(){
  final LineSeries ls=TypeFactory.eINSTANCE.createLineSeries();
  ((LineSeriesImpl)ls).initDefault();
  return ls;
}

Fixed version (ground truth):
/** 
 * A convenience method to create an initialized 'Series' instance
 * @return line series instance without setting 'isSet' flag.
 */
public static Series createDefault(){
  final LineSeries ls=TypeFactory.eINSTANCE.createLineSeries();
  ((LineSeriesImpl)ls).initDefault();
  return ls;
}
Program: 66183
Project: 66183
Buggy source:
private SampleData getConvertedSampleData(SampleData currentSampleData,int iSeriesDefinitionIndex){
  EList osdList=currentSampleData.getOrthogonalSampleData();
  for (int i=0; i < osdList.size(); i++) {
    if (i == iSeriesDefinitionIndex) {
      OrthogonalSampleData osd=(OrthogonalSampleData)osdList.get(i);
      osd.setDataSetRepresentation(getConvertedOrthogonalSampleDataRepresentation(osd.getDataSetRepresentation()));
      currentSampleData.getOrthogonalSampleData().set(i,osd);
    }
  }
  return currentSampleData;
}

Fixed version (ground truth):
private SampleData getConvertedSampleData(SampleData currentSampleData,int iSeriesDefinitionIndex){
  EList<OrthogonalSampleData> osdList=currentSampleData.getOrthogonalSampleData();
  for (int i=0; i < osdList.size(); i++) {
    if (i == iSeriesDefinitionIndex) {
      OrthogonalSampleData osd=osdList.get(i);
      osd.setDataSetRepresentation(getConvertedOrthogonalSampleDataRepresentation(osd.getDataSetRepresentation()));
      currentSampleData.getOrthogonalSampleData().set(i,osd);
    }
  }
  return currentSampleData;
}
Program: 66184
Project: 66184
Buggy source:
/** 
 * Check if series palette is set.
 * @param chart
 * @return
 */
public static boolean isSetSeriesPalette(Chart chart){
  Palette p=ChartUtil.getCategorySeriesDefinition(chart).getSeriesPalette();
  if (p != null && p.getEntries().size() > 0) {
    return true;
  }
  return false;
}

Fixed version (ground truth):
/** 
 * Check if series palette is set.
 * @param chart
 * @return true if chart specify series palette.
 */
public static boolean isSetSeriesPalette(Chart chart){
  Palette p=ChartUtil.getCategorySeriesDefinition(chart).getSeriesPalette();
  if (p != null && p.getEntries().size() > 0) {
    return true;
  }
  return false;
}
Program: 66185
Project: 66185
Buggy source:
/** 
 * Copy a map.
 * @param < T >
 * @param < J >
 * @param objs
 * @return
 */
public static <T,J>Map<T,J> copyInstance(Map<T,J> objs){
  Map<T,J> map=new HashMap<T,J>();
  for (  Entry<T,J> o : objs.entrySet()) {
    if (o.getValue() instanceof IChartObject) {
      map.put((T)o.getKey(),(J)((IChartObject)o.getValue()).copyInstance());
    }
 else {
      map.put((T)o.getKey(),(J)o.getValue());
    }
  }
  return map;
}

Fixed version (ground truth):
/** 
 * Copy a map.
 * @param < T >
 * @param < J >
 * @param objs
 * @return map of type <T, J>
 */
public static <T,J>Map<T,J> copyInstance(Map<T,J> objs){
  Map<T,J> map=new HashMap<T,J>();
  for (  Entry<T,J> o : objs.entrySet()) {
    if (o.getValue() instanceof IChartObject) {
      map.put(o.getKey(),(J)((IChartObject)o.getValue()).copyInstance());
    }
 else {
      map.put(o.getKey(),o.getValue());
    }
  }
  return map;
}
Program: 66186
Project: 66186
Buggy source:
protected void initDefault(){
  super.initDefault();
  final LineAttributes lia=LineAttributesImpl.createDefault(null,LineStyle.SOLID_LITERAL,1,true);
  setLineAttributes(lia);
  final LineAttributes weblia=LineAttributesImpl.createDefault(null,LineStyle.SOLID_LITERAL,1,true);
  setWebLineAttributes(weblia);
  final Marker m=MarkerImpl.createDefault(MarkerType.BOX_LITERAL,4,true);
  LineAttributes la=LineAttributesImpl.createDefault(true);
  m.setOutline(la);
  setMarker(m);
  final Label lab=LabelImpl.createDefault();
  setWebLabel(lab);
  final Label clab=LabelImpl.createDefault();
  setCatLabel(clab);
}

Fixed version (ground truth):
protected void initDefault(){
  super.initDefault();
  final LineAttributes lia=LineAttributesImpl.createDefault(null,LineStyle.SOLID_LITERAL,1,true);
  setLineAttributes(lia);
  final LineAttributes weblia=LineAttributesImpl.createDefault(null,LineStyle.SOLID_LITERAL,1,true);
  setWebLineAttributes(weblia);
  final Marker m=MarkerImpl.createDefault(MarkerType.BOX_LITERAL,4,true);
  LineAttributes la=LineAttributesImpl.createDefault(true);
  m.setOutline(la);
  setMarker(m);
  final Label lab=LabelImpl.createDefault();
  setWebLabel(lab);
  final Label clab=LabelImpl.createDefault();
  setCatLabel(clab);
  paletteLineColor=true;
}
Program: 66187
Project: 66187
Buggy source:
/** 
 * Initializes all member variables within this object recursively Note: Manually written
 */
protected void initialize(){
  super.initialize();
  final LineAttributes lia=AttributeFactory.eINSTANCE.createLineAttributes();
  ((LineAttributesImpl)lia).set(null,LineStyle.SOLID_LITERAL,1);
  lia.setVisible(true);
  setLineAttributes(lia);
  final LineAttributes weblia=AttributeFactory.eINSTANCE.createLineAttributes();
  ((LineAttributesImpl)weblia).set(null,LineStyle.SOLID_LITERAL,1);
  weblia.setVisible(true);
  setWebLineAttributes(weblia);
  final Marker m=AttributeFactory.eINSTANCE.createMarker();
  m.setType(MarkerType.BOX_LITERAL);
  m.setSize(4);
  m.setVisible(true);
  LineAttributes la=AttributeFactory.eINSTANCE.createLineAttributes();
  la.setVisible(true);
  m.setOutline(la);
  setMarker(m);
  final Label lab=LabelImpl.create();
  setWebLabel(lab);
  final Label clab=LabelImpl.create();
  setCatLabel(clab);
}

Fixed version (ground truth):
/** 
 * Initializes all member variables within this object recursively Note: Manually written
 */
protected void initialize(){
  super.initialize();
  final LineAttributes lia=AttributeFactory.eINSTANCE.createLineAttributes();
  ((LineAttributesImpl)lia).set(null,LineStyle.SOLID_LITERAL,1);
  lia.setVisible(true);
  setLineAttributes(lia);
  final LineAttributes weblia=AttributeFactory.eINSTANCE.createLineAttributes();
  ((LineAttributesImpl)weblia).set(null,LineStyle.SOLID_LITERAL,1);
  weblia.setVisible(true);
  setWebLineAttributes(weblia);
  final Marker m=AttributeFactory.eINSTANCE.createMarker();
  m.setType(MarkerType.BOX_LITERAL);
  m.setSize(4);
  m.setVisible(true);
  LineAttributes la=AttributeFactory.eINSTANCE.createLineAttributes();
  la.setVisible(true);
  m.setOutline(la);
  setMarker(m);
  final Label lab=LabelImpl.create();
  setWebLabel(lab);
  final Label clab=LabelImpl.create();
  setCatLabel(clab);
  setPaletteLineColor(true);
}
Program: 66192
Project: 66192
Buggy source:
private void setStateOfMajorGrid(){
  boolean enabled;
  if (ChartUIUtil.is3DWallFloorSet(getChart())) {
    enabled=getAxisForProcessing().getMajorGrid().getLineAttributes().isSetVisible() && getAxisForProcessing().getMajorGrid().getLineAttributes().isVisible();
  }
 else {
    enabled=false;
  }
  lblGridStepNum.setEnabled(enabled);
  majGridStNum.setEnabled(enabled);
}

Fixed version (ground truth):
private void setStateOfMajorGrid(){
  boolean enabled;
  if (ChartUIUtil.is3DWallFloorSet(getChart())) {
    enabled=getAxisForProcessing().getMajorGrid().getLineAttributes().isSetVisible() && getAxisForProcessing().getMajorGrid().getLineAttributes().isVisible();
  }
 else {
    enabled=false;
  }
  if (enabled) {
    boolean isAuto=btnMajStpNum.getSelection();
    lblGridStepNum.setEnabled(true);
    majGridStNum.setEnabled(true && !isAuto);
    btnMajStpNum.setEnabled(true);
  }
 else {
    lblGridStepNum.setEnabled(false);
    majGridStNum.setEnabled(false);
    btnMajStpNum.setEnabled(false);
  }
}