nus-yam/ex-repair huggingface dataset:
Program: 67912
Project: 67912
Buggy source:
double roundValue(double value){
  if (roundPrecision >= 0) {
    BigDecimal bd=BigDecimal.valueOf(value);
    int scale=bd.scale();
    if (scale > roundPrecision) {
      bd=bd.setScale(roundPrecision,BigDecimal.ROUND_HALF_DOWN);
      return bd.doubleValue();
    }
  }
  return value;
}

Fixed version (ground truth):
double roundValue(double value){
  if (roundPrecision >= 0) {
    BigDecimal bd=BigDecimal.valueOf(value);
    int scale=bd.scale();
    if (scale > roundPrecision) {
      bd=bd.setScale(roundPrecision,roundingMode);
      return bd.doubleValue();
    }
  }
  return value;
}
Program: 67913
Project: 67913
Buggy source:
private void applyPatternAttributes(){
  if (digitSubstitution) {
    DecimalFormatSymbols symbols=getICUDecimalSymbols(locale.toLocale());
    if (decimalFormat instanceof DecimalFormat) {
      ((DecimalFormat)decimalFormat).setDecimalFormatSymbols(symbols);
    }
    if (numberFormat instanceof DecimalFormat) {
      ((DecimalFormat)numberFormat).setDecimalFormatSymbols(symbols);
    }
  }
}

Fixed version (ground truth):
private void applyPatternAttributes(){
  if (digitSubstitution) {
    DecimalFormatSymbols symbols=getICUDecimalSymbols(locale.toLocale());
    if (decimalFormat instanceof DecimalFormat) {
      ((DecimalFormat)decimalFormat).setDecimalFormatSymbols(symbols);
    }
    if (numberFormat instanceof DecimalFormat) {
      ((DecimalFormat)numberFormat).setDecimalFormatSymbols(symbols);
    }
  }
  if (decimalFormat instanceof DecimalFormat) {
    ((DecimalFormat)decimalFormat).setRoundingMode(roundingMode);
  }
  if (numberFormat instanceof DecimalFormat) {
    ((DecimalFormat)numberFormat).setRoundingMode(roundingMode);
  }
}
Program: 67915
Project: 67915
Buggy source:
public static FittingCurveHelper instance(double[] xArray,double[] yArray,boolean isTransposed){
  double[][] sa=sort(xArray,yArray,isTransposed);
  int iSize=mergeBase(sa,isTransposed);
  return new FittingCurveHelper(sa,iSize);
}

Fixed version (ground truth):
public static FittingCurveHelper instance(double[] xArray,double[] yArray,boolean isTransposed){
  double[][] sa=sort(xArray,yArray,isTransposed);
  int iSize=mergeBase(sa);
  return new FittingCurveHelper(sa,iSize);
}
Program: 67916
Project: 67916
Buggy source:
/** 
 * Returns the decorator renderer associated with current series, default is none.
 */
public IAxesDecorator getAxesDecorator(OneAxis ax){
  return null;
}

Fixed version (ground truth):
/** 
 * Returns the decorator renderer associated with current series, default is none.
 */
@Override public IAxesDecorator getAxesDecorator(OneAxis ax){
  return null;
}
Program: 67917
Project: 67917
Buggy source:
/** 
 * Returns if current chart is transposed.
 */
public boolean isTransposed(){
  return ((ChartWithAxes)getModel()).isTransposed();
}

Fixed version (ground truth):
/** 
 * Returns if current chart is transposed.
 */
@Override public boolean isTransposed(){
  return ((ChartWithAxes)getModel()).isTransposed();
}
Program: 67918
Project: 67918
Buggy source:
protected boolean isFirstVisibleSeries(){
  if (ChartUtil.hasMultipleYAxes(getModel()) && ((ChartWithAxes)getModel()).isStudyLayout()) {
    List<SeriesDefinition> sdList=new ArrayList<SeriesDefinition>(ax.getSeriesDefinitions());
    Collections.sort(sdList,zOrderComparatorImpl);
    List<Series> seList=new ArrayList<Series>();
    for (    SeriesDefinition sd : sdList) {
      seList.addAll(sd.getRunTimeSeries());
    }
    BaseRenderer renderer=getRenderer(iSeriesIndex);
    Series s=renderer.getSeries();
    for (    Series series : seList) {
      if (!series.isVisible()) {
        continue;
      }
      return (s == series);
    }
  }
 else {
    if (iSeriesIndex == 0) {
      return false;
    }
    for (int i=1; i < iSeriesCount; i++) {
      BaseRenderer renderer=getRenderer(i);
      if (renderer.getSeries().isVisible()) {
        return (i == iSeriesIndex);
      }
    }
  }
  return false;
}

Fixed version (ground truth):
@Override protected boolean isFirstVisibleSeries(){
  if (ChartUtil.hasMultipleYAxes(getModel()) && ((ChartWithAxes)getModel()).isStudyLayout()) {
    List<SeriesDefinition> sdList=new ArrayList<SeriesDefinition>(ax.getSeriesDefinitions());
    Collections.sort(sdList,zOrderComparatorImpl);
    List<Series> seList=new ArrayList<Series>();
    for (    SeriesDefinition sd : sdList) {
      seList.addAll(sd.getRunTimeSeries());
    }
    BaseRenderer renderer=getRenderer(iSeriesIndex);
    Series s=renderer.getSeries();
    for (    Series series : seList) {
      if (!series.isVisible()) {
        continue;
      }
      return (s == series);
    }
  }
 else {
    if (iSeriesIndex == 0) {
      return false;
    }
    for (int i=1; i < iSeriesCount; i++) {
      BaseRenderer renderer=getRenderer(i);
      if (renderer.getSeries().isVisible()) {
        return (i == iSeriesIndex);
      }
    }
  }
  return false;
}
Program: 67922
Project: 67922
Buggy source:
protected boolean isLastSeries(){
  if (ChartUtil.hasMultipleYAxes(getModel()) && ((ChartWithAxes)getModel()).isStudyLayout()) {
    List<SeriesDefinition> sdList=new ArrayList<SeriesDefinition>(ax.getSeriesDefinitions());
    Collections.sort(sdList,zOrderComparatorImpl);
    List<Series> seList=new ArrayList<Series>();
    for (    SeriesDefinition sd : sdList) {
      seList.addAll(sd.getRunTimeSeries());
    }
    BaseRenderer renderer=getRenderer(iSeriesIndex);
    Series s=renderer.getSeries();
    return (s == seList.get(seList.size() - 1));
  }
 else {
    if (iSeriesIndex == 0) {
      return false;
    }
    return iSeriesIndex == (iSeriesCount - 1);
  }
}

Fixed version (ground truth):
@Override protected boolean isLastSeries(){
  if (ChartUtil.hasMultipleYAxes(getModel()) && ((ChartWithAxes)getModel()).isStudyLayout()) {
    List<SeriesDefinition> sdList=new ArrayList<SeriesDefinition>(ax.getSeriesDefinitions());
    Collections.sort(sdList,zOrderComparatorImpl);
    List<Series> seList=new ArrayList<Series>();
    for (    SeriesDefinition sd : sdList) {
      seList.addAll(sd.getRunTimeSeries());
    }
    BaseRenderer renderer=getRenderer(iSeriesIndex);
    Series s=renderer.getSeries();
    return (s == seList.get(seList.size() - 1));
  }
  if (iSeriesIndex == 0) {
    return false;
  }
  return iSeriesIndex == (iSeriesCount - 1);
}
Program: 67923
Project: 67923
Buggy source:
private static int mergeBase(double[][] sa,boolean isTransposed){
  int iLen=sa.length;
  int iDst=0;
  for (int iSrc=0; iSrc < iLen; ) {
    int iEq=1;
    double dOrthTotal=sa[iSrc][1];
    double dBase=sa[iSrc][0];
    while (iSrc + iEq < iLen && sa[iSrc + iEq][0] == dBase) {
      dOrthTotal+=sa[iSrc + iEq][1];
      iEq++;
    }
    sa[iDst][1]=dOrthTotal / iEq;
    sa[iDst][0]=dBase;
    iDst++;
    iSrc+=iEq;
  }
  return iDst;
}

Fixed version (ground truth):
private static int mergeBase(double[][] sa){
  int iLen=sa.length;
  int iDst=0;
  for (int iSrc=0; iSrc < iLen; ) {
    int iEq=1;
    double dOrthTotal=sa[iSrc][1];
    double dBase=sa[iSrc][0];
    while (iSrc + iEq < iLen && sa[iSrc + iEq][0] == dBase) {
      dOrthTotal+=sa[iSrc + iEq][1];
      iEq++;
    }
    sa[iDst][1]=dOrthTotal / iEq;
    sa[iDst][0]=dBase;
    iDst++;
    iSrc+=iEq;
  }
  return iDst;
}
Program: 67925
Project: 67925
Buggy source:
protected Control createContents(Composite parent){
  ChartUIUtil.bindHelp(parent,ChartHelpContextIds.DIALOG_MARKER_ICON);
  getShell().setText(Messages.getString("String_Node_Str"));
  Control c=super.createContents(parent);
  if (icon instanceof EmbeddedImage) {
    btnEmbeddedImage.setSelection(true);
    switchTo(EMBEDDED_TYPE);
  }
  c.pack();
  preview();
  Point size=getShell().computeSize(SWT.DEFAULT,SWT.DEFAULT);
  getShell().setSize(size.x,size.y);
  UIHelper.centerOnScreen(getShell());
  return c;
}

Fixed version (ground truth):
protected Control createContents(Composite parent){
  ChartUIUtil.bindHelp(parent,ChartHelpContextIds.DIALOG_MARKER_ICON);
  getShell().setText(Messages.getString("String_Node_Str"));
  Control c=super.createContents(parent);
  if (icon instanceof EmbeddedImage) {
    btnEmbeddedImage.setSelection(true);
    switchTo(EMBEDDED_TYPE);
  }
 else   if (icon instanceof Image) {
    try {
      if ("String_Node_Str".equals(new URL(((Image)icon).getURL()).getProtocol())) {
        btnLocal.setSelection(true);
        switchTo(LOCAL_TYPE);
      }
    }
 catch (    MalformedURLException e) {
    }
  }
  c.pack();
  preview();
  Point size=getShell().computeSize(SWT.DEFAULT,SWT.DEFAULT);
  getShell().setSize(size.x,size.y);
  UIHelper.centerOnScreen(getShell());
  return c;
}
Program: 67926
Project: 67926
Buggy source:
public void run(){
  if (previewPainter != null) {
    Chart cm=(Chart)getParameter(ChartLivePreviewThread.PARAM_CHART_MODEL);
    if (cm instanceof ChartWithAxes) {
      checkDataTypeForChartWithAxes();
    }
 else {
      ChartWizard.removeAllExceptions(ChartWizard.CheckSeriesBindingType_ID);
    }
    previewPainter.renderModel(cm);
  }
}

Fixed version (ground truth):
public void run(){
  if (previewPainter != null) {
    Chart cm=(Chart)getParameter(ChartLivePreviewThread.PARAM_CHART_MODEL);
    previewPainter.renderModel(cm);
  }
}
Program: 67927
Project: 67927
Buggy source:
public void doPreview(){
  LivePreviewTask lpt=new LivePreviewTask(Messages.getString("String_Node_Str"),null);
  lpt.addTask(new LivePreviewTask(){
    public void run(){
      if (previewPainter != null) {
        setParameter(ChartLivePreviewThread.PARAM_CHART_MODEL,ChartUIUtil.prepareLivePreview(getChartModel(),getDataServiceProvider(),((ChartWizardContext)context).getActionEvaluator()));
      }
    }
  }
);
  lpt.addTask(new LivePreviewTask(){
    public void run(){
      if (previewCanvas != null && previewCanvas.getDisplay() != null && !previewCanvas.getDisplay().isDisposed()) {
        previewCanvas.getDisplay().syncExec(new Runnable(){
          public void run(){
            if (previewPainter != null) {
              Chart cm=(Chart)getParameter(ChartLivePreviewThread.PARAM_CHART_MODEL);
              if (cm instanceof ChartWithAxes) {
                checkDataTypeForChartWithAxes();
              }
 else {
                ChartWizard.removeAllExceptions(ChartWizard.CheckSeriesBindingType_ID);
              }
              previewPainter.renderModel(cm);
            }
          }
        }
);
      }
    }
  }
);
  ((ChartLivePreviewThread)((ChartWizardContext)context).getLivePreviewThread()).setParentShell(getPreviewCanvas().getShell());
  ((ChartLivePreviewThread)((ChartWizardContext)context).getLivePreviewThread()).add(lpt);
}

Fixed version (ground truth):
public void doPreview(){
  if (getChartModel() instanceof ChartWithAxes) {
    checkDataTypeForChartWithAxes();
  }
 else {
    ChartWizard.removeAllExceptions(ChartWizard.CheckSeriesBindingType_ID);
  }
  LivePreviewTask lpt=new LivePreviewTask(Messages.getString("String_Node_Str"),null);
  lpt.addTask(new LivePreviewTask(){
    public void run(){
      if (previewPainter != null) {
        setParameter(ChartLivePreviewThread.PARAM_CHART_MODEL,ChartUIUtil.prepareLivePreview(getChartModel(),getDataServiceProvider(),((ChartWizardContext)context).getActionEvaluator()));
      }
    }
  }
);
  lpt.addTask(new LivePreviewTask(){
    public void run(){
      if (previewCanvas != null && previewCanvas.getDisplay() != null && !previewCanvas.getDisplay().isDisposed()) {
        previewCanvas.getDisplay().syncExec(new Runnable(){
          public void run(){
            if (previewPainter != null) {
              Chart cm=(Chart)getParameter(ChartLivePreviewThread.PARAM_CHART_MODEL);
              previewPainter.renderModel(cm);
            }
          }
        }
);
      }
    }
  }
);
  ((ChartLivePreviewThread)((ChartWizardContext)context).getLivePreviewThread()).setParentShell(getPreviewCanvas().getShell());
  ((ChartLivePreviewThread)((ChartWizardContext)context).getLivePreviewThread()).add(lpt);
}
Program: 67928
Project: 67928
Buggy source:
public void run(){
  if (previewPainter != null) {
    Chart cm=(Chart)getParameter(ChartLivePreviewThread.PARAM_CHART_MODEL);
    if (cm instanceof ChartWithAxes) {
      ChartAdapter.beginIgnoreNotifications();
      checkDataTypeForChartWithAxes();
      ChartAdapter.endIgnoreNotifications();
    }
 else {
      ChartWizard.removeAllExceptions(ChartWizard.CheckSeriesBindingType_ID);
    }
    previewPainter.renderModel(cm);
  }
}

Fixed version (ground truth):
public void run(){
  if (previewPainter != null) {
    Chart cm=(Chart)getParameter(ChartLivePreviewThread.PARAM_CHART_MODEL);
    previewPainter.renderModel(cm);
  }
}
Program: 67929
Project: 67929
Buggy source:
public void doPreview(){
  LivePreviewTask lpt=new LivePreviewTask(Messages.getString("String_Node_Str"),null);
  lpt.addTask(new LivePreviewTask(){
    public void run(){
      if (previewPainter != null) {
        setParameter(ChartLivePreviewThread.PARAM_CHART_MODEL,ChartUIUtil.prepareLivePreview(chartModel,getDataServiceProvider(),((ChartWizardContext)context).getActionEvaluator()));
      }
    }
  }
);
  lpt.addTask(new LivePreviewTask(){
    public void run(){
      if (previewCanvas != null && previewCanvas.getDisplay() != null && !previewCanvas.getDisplay().isDisposed()) {
        previewCanvas.getDisplay().syncExec(new Runnable(){
          public void run(){
            if (previewPainter != null) {
              Chart cm=(Chart)getParameter(ChartLivePreviewThread.PARAM_CHART_MODEL);
              if (cm instanceof ChartWithAxes) {
                ChartAdapter.beginIgnoreNotifications();
                checkDataTypeForChartWithAxes();
                ChartAdapter.endIgnoreNotifications();
              }
 else {
                ChartWizard.removeAllExceptions(ChartWizard.CheckSeriesBindingType_ID);
              }
              previewPainter.renderModel(cm);
            }
          }
        }
);
      }
    }
  }
);
  ((ChartLivePreviewThread)((ChartWizardContext)context).getLivePreviewThread()).setParentShell(getPreviewCanvas().getShell());
  ((ChartLivePreviewThread)((ChartWizardContext)context).getLivePreviewThread()).add(lpt);
}

Fixed version (ground truth):
public void doPreview(){
  if (chartModel instanceof ChartWithAxes) {
    ChartAdapter.beginIgnoreNotifications();
    checkDataTypeForChartWithAxes();
    ChartAdapter.endIgnoreNotifications();
  }
 else {
    ChartWizard.removeAllExceptions(ChartWizard.CheckSeriesBindingType_ID);
  }
  LivePreviewTask lpt=new LivePreviewTask(Messages.getString("String_Node_Str"),null);
  lpt.addTask(new LivePreviewTask(){
    public void run(){
      if (previewPainter != null) {
        setParameter(ChartLivePreviewThread.PARAM_CHART_MODEL,ChartUIUtil.prepareLivePreview(chartModel,getDataServiceProvider(),((ChartWizardContext)context).getActionEvaluator()));
      }
    }
  }
);
  lpt.addTask(new LivePreviewTask(){
    public void run(){
      if (previewCanvas != null && previewCanvas.getDisplay() != null && !previewCanvas.getDisplay().isDisposed()) {
        previewCanvas.getDisplay().syncExec(new Runnable(){
          public void run(){
            if (previewPainter != null) {
              Chart cm=(Chart)getParameter(ChartLivePreviewThread.PARAM_CHART_MODEL);
              previewPainter.renderModel(cm);
            }
          }
        }
);
      }
    }
  }
);
  ((ChartLivePreviewThread)((ChartWizardContext)context).getLivePreviewThread()).setParentShell(getPreviewCanvas().getShell());
  ((ChartLivePreviewThread)((ChartWizardContext)context).getLivePreviewThread()).add(lpt);
}
Program: 67930
Project: 67930
Buggy source:
private String getQueryId(IBaseQueryDefinition query){
  String id=(String)tmpQuery2QueryIdMapping.get(query);
  if (id == null) {
    return (String)query2QueryIdMapping.get(query);
  }
  return id;
}

Fixed version (ground truth):
private String getQueryId(IDataQueryDefinition query){
  String id=(String)tmpQuery2QueryIdMapping.get(query);
  if (id == null) {
    return (String)query2QueryIdMapping.get(query);
  }
  return id;
}
Program: 67931
Project: 67931
Buggy source:
/** 
 * get the query defintion from the query id
 * @param queryId
 * @return
 */
private IQueryDefinition getQuery(String queryId){
  return (IQueryDefinition)queryId2QueryMapping.get(queryId);
}

Fixed version (ground truth):
/** 
 * get the query defintion from the query id
 * @param queryId
 * @return
 */
private IDataQueryDefinition getQuery(String queryId){
  return (IDataQueryDefinition)queryId2QueryMapping.get(queryId);
}
Program: 67932
Project: 67932
Buggy source:
private String getResultsetID(String prset,long rowId,String queryId){
  String parentRSet=(prset == null) ? "String_Node_Str" : prset;
  String rsmeta=parentRSet + "String_Node_Str" + rowId+ "String_Node_Str"+ queryId;
  return (String)rssetIdMapping.get(rsmeta);
}

Fixed version (ground truth):
private String getResultsetID(String prset,String rowId,String queryId){
  String parentRSet=(prset == null) ? "String_Node_Str" : prset;
  String rsmeta=parentRSet + "String_Node_Str" + rowId+ "String_Node_Str"+ queryId;
  return (String)rssetIdMapping.get(rsmeta);
}
Program: 67935
Project: 67935
Buggy source:
public void run(){
  if (!(getModel() instanceof DesignElementHandle)) {
    return;
  }
  if (((DeferredGraphicalViewer)getViewer()).getFigureCanvas() == null) {
    return;
  }
  DesignElementHandle handle=(DesignElementHandle)getModel();
  EditPart part=ReportElementEditPart.this;
  while (part != null && !(part instanceof RootEditPart)) {
    part=part.getParent();
  }
  if (getModelAdapter() == null || part == null) {
    return;
  }
  Object[] backGroundPosition=getBackgroundPosition(handle);
  Object xPosition=backGroundPosition[0];
  Object yPosition=backGroundPosition[1];
  boolean needRefresh=false;
  if (xPosition instanceof DimensionValue) {
    needRefresh=true;
  }
  if (yPosition instanceof DimensionValue) {
    needRefresh=true;
  }
  if (needRefresh) {
    refreshVisuals();
  }
}

Fixed version (ground truth):
public void run(){
  if (!(getModel() instanceof DesignElementHandle)) {
    return;
  }
  if (isDelete()) {
    return;
  }
  if (((DeferredGraphicalViewer)getViewer()).getFigureCanvas() == null) {
    return;
  }
  DesignElementHandle handle=(DesignElementHandle)getModel();
  EditPart part=ReportElementEditPart.this;
  while (part != null && !(part instanceof RootEditPart)) {
    part=part.getParent();
  }
  if (getModelAdapter() == null || part == null) {
    return;
  }
  Object[] backGroundPosition=getBackgroundPosition(handle);
  Object xPosition=backGroundPosition[0];
  Object yPosition=backGroundPosition[1];
  boolean needRefresh=false;
  if (xPosition instanceof DimensionValue) {
    needRefresh=true;
  }
  if (yPosition instanceof DimensionValue) {
    needRefresh=true;
  }
  if (needRefresh) {
    refreshVisuals();
  }
}
Program: 67938
Project: 67938
Buggy source:
protected void drawText(String text,float textX,float textY,float baseline,float width,float height,TextStyle textStyle){
  writer.drawText(text,textX,textY,width,height,textStyle.getFontInfo(),textStyle.getColor(),textStyle.isRtl(),link);
}

Fixed version (ground truth):
protected void drawText(String text,float textX,float textY,float baseline,float width,float height,TextStyle textStyle){
  FontInfo fontInfo=textStyle.getFontInfo();
  float descend=fontInfo.getBaseFont().getFontDescriptor(BaseFont.DESCENT,fontInfo.getFontSize());
  writer.drawText(text,textX,textY,width,height + descend * 0.6f,fontInfo,textStyle.getColor(),textStyle.isRtl(),link);
}
Program: 67939
Project: 67939
Buggy source:
private void parsePageSize(IReportContent report){
  reportDpi=PropertyUtil.getRenderDpi(report,0);
  SimpleMasterPageDesign masterPage=(SimpleMasterPageDesign)report.getDesign().getPageSetup().getMasterPage(0);
  this.pageWidth=ExcelUtil.convertDimensionType(masterPage.getPageWidth(),0,reportDpi);
  int leftmargin=ExcelUtil.convertDimensionType(masterPage.getLeftMargin(),pageWidth,reportDpi);
  int rightmargin=ExcelUtil.convertDimensionType(masterPage.getRightMargin(),pageWidth,reportDpi);
  this.contentwidth=pageWidth - leftmargin - rightmargin;
  this.pageHeight=ExcelUtil.convertDimensionType(masterPage.getPageHeight(),0,reportDpi);
}

Fixed version (ground truth):
private void parsePageSize(IReportContent report){
  Object dpi=report.getReportContext().getRenderOption().getOption(IRenderOption.RENDER_DPI);
  int renderDpi=0;
  if (dpi != null && dpi instanceof Integer) {
    renderDpi=((Integer)dpi).intValue();
  }
  reportDpi=PropertyUtil.getRenderDpi(report,renderDpi);
  SimpleMasterPageDesign masterPage=(SimpleMasterPageDesign)report.getDesign().getPageSetup().getMasterPage(0);
  this.pageWidth=ExcelUtil.convertDimensionType(masterPage.getPageWidth(),0,reportDpi);
  int leftmargin=ExcelUtil.convertDimensionType(masterPage.getLeftMargin(),pageWidth,reportDpi);
  int rightmargin=ExcelUtil.convertDimensionType(masterPage.getRightMargin(),pageWidth,reportDpi);
  this.contentwidth=pageWidth - leftmargin - rightmargin;
  this.pageHeight=ExcelUtil.convertDimensionType(masterPage.getPageHeight(),0,reportDpi);
}
Program: 67942
Project: 67942
Buggy source:
public void start(IReportContent report){
  reportDpi=PropertyUtil.getRenderDpi(report,0);
  this.reportContent=report;
  if (null == layoutPreference) {
    ReportDesignHandle designHandle=report.getDesign().getReportDesign();
    if (designHandle != null) {
      String reportLayoutPreference=designHandle.getLayoutPreference();
      if (DesignChoiceConstants.REPORT_LAYOUT_PREFERENCE_FIXED_LAYOUT.equals(reportLayoutPreference)) {
        layoutPreference=HTMLRenderOption.LAYOUT_PREFERENCE_FIXED;
      }
 else       if (DesignChoiceConstants.REPORT_LAYOUT_PREFERENCE_AUTO_LAYOUT.equals(reportLayoutPreference)) {
        layoutPreference=HTMLRenderOption.LAYOUT_PREFERENCE_AUTO;
      }
    }
    fixedLayout=HTMLRenderOption.LAYOUT_PREFERENCE_FIXED.equals(layoutPreference);
  }
}

Fixed version (ground truth):
public void start(IReportContent report){
  Object dpi=report.getReportContext().getRenderOption().getOption(IRenderOption.RENDER_DPI);
  int renderDpi=0;
  if (dpi != null && dpi instanceof Integer) {
    renderDpi=((Integer)dpi).intValue();
  }
  reportDpi=PropertyUtil.getRenderDpi(report,renderDpi);
  this.reportContent=report;
  if (null == layoutPreference) {
    ReportDesignHandle designHandle=report.getDesign().getReportDesign();
    if (designHandle != null) {
      String reportLayoutPreference=designHandle.getLayoutPreference();
      if (DesignChoiceConstants.REPORT_LAYOUT_PREFERENCE_FIXED_LAYOUT.equals(reportLayoutPreference)) {
        layoutPreference=HTMLRenderOption.LAYOUT_PREFERENCE_FIXED;
      }
 else       if (DesignChoiceConstants.REPORT_LAYOUT_PREFERENCE_AUTO_LAYOUT.equals(reportLayoutPreference)) {
        layoutPreference=HTMLRenderOption.LAYOUT_PREFERENCE_AUTO;
      }
    }
    fixedLayout=HTMLRenderOption.LAYOUT_PREFERENCE_FIXED.equals(layoutPreference);
  }
}
Program: 67944
Project: 67944
Buggy source:
public static int getImageDimensionValue(IContent content,DimensionType d,int dpi,int referenceLength){
  if (d == null) {
    return -1;
  }
  try {
    return _getDimensionValue(content,d,dpi,referenceLength);
  }
 catch (  Exception e) {
    logger.log(Level.WARNING,e.getLocalizedMessage());
    return -1;
  }
}

Fixed version (ground truth):
public static int getImageDimensionValue(IContent content,DimensionType d,int renderOptionDpi,int referenceLength){
  if (d == null) {
    return -1;
  }
  try {
    return _getDimensionValue(content,d,renderOptionDpi,referenceLength);
  }
 catch (  Exception e) {
    logger.log(Level.WARNING,e.getLocalizedMessage());
    return -1;
  }
}
Program: 67946
Project: 67946
Buggy source:
private void prepareMetaData(){
  if (isMetaDataPrepared == true)   return;
  IDataEngine dataEngine=executionContext.getDataEngine();
  dataEngine.prepare(report,executionContext.getAppContext());
  HashMap queryIds=report.getQueryIDs();
  HashMap query2itemMapping=report.getReportItemToQueryMap();
  Iterator iter=queryIds.entrySet().iterator();
  while (iter.hasNext()) {
    Map.Entry entry=(Map.Entry)iter.next();
    IBaseQueryDefinition baseQuery=(IBaseQueryDefinition)entry.getKey();
    if (baseQuery instanceof IQueryDefinition) {
      IQueryDefinition query=(IQueryDefinition)baseQuery;
      String queryId=(String)entry.getValue();
      ReportItemDesign item=(ReportItemDesign)query2itemMapping.get(query);
      String queryName=item.getName();
      if (queryName == null) {
        queryName="String_Node_Str" + item.getID();
      }
      queryId2NameMapping.put(queryId,queryName);
      queryId2QueryMapping.put(queryId,query);
      ;
    }
  }
  try {
    loadResultSetMetaData();
  }
 catch (  EngineException e) {
    logger.log(Level.WARNING,e.getMessage(),e);
    executionContext.addException(e);
  }
  isMetaDataPrepared=true;
}

Fixed version (ground truth):
private void prepareMetaData() throws EngineException {
  if (isMetaDataPrepared == true)   return;
  IDataEngine dataEngine=executionContext.getDataEngine();
  dataEngine.prepare(report,executionContext.getAppContext());
  HashMap queryIds=report.getQueryIDs();
  HashMap query2itemMapping=report.getReportItemToQueryMap();
  Iterator iter=queryIds.entrySet().iterator();
  while (iter.hasNext()) {
    Map.Entry entry=(Map.Entry)iter.next();
    IBaseQueryDefinition baseQuery=(IBaseQueryDefinition)entry.getKey();
    if (baseQuery instanceof IQueryDefinition) {
      IQueryDefinition query=(IQueryDefinition)baseQuery;
      String queryId=(String)entry.getValue();
      ReportItemDesign item=(ReportItemDesign)query2itemMapping.get(query);
      String queryName=item.getName();
      if (queryName == null) {
        queryName="String_Node_Str" + item.getID();
      }
      queryId2NameMapping.put(queryId,queryName);
      queryId2QueryMapping.put(queryId,query);
      ;
    }
  }
  try {
    loadResultSetMetaData();
  }
 catch (  EngineException e) {
    logger.log(Level.WARNING,e.getMessage(),e);
    executionContext.addException(e);
  }
  isMetaDataPrepared=true;
}
Program: 67948
Project: 67948
Buggy source:
public DataRequestSession getDataSession(){
  return executionContext.getDataEngine().getDTESession();
}

Fixed version (ground truth):
public DataRequestSession getDataSession() throws EngineException {
  return executionContext.getDataEngine().getDTESession();
}
Program: 67949
Project: 67949
Buggy source:
private DataRequestSession createDataSession(DataSetHandle dataSet){
  IDataEngine dataEngine=executionContext.getDataEngine();
  DataRequestSession dteSession=getDataSession();
  dataEngine.defineDataSet(dataSet);
  return dteSession;
}

Fixed version (ground truth):
private DataRequestSession createDataSession(DataSetHandle dataSet) throws EngineException {
  IDataEngine dataEngine=executionContext.getDataEngine();
  DataRequestSession dteSession=getDataSession();
  dataEngine.defineDataSet(dataSet);
  return dteSession;
}
Program: 67950
Project: 67950
Buggy source:
private static String getResultSetID(ExecutionContext context,String parent,String rowId,IDataQueryDefinition query){
  IDataEngine engine=context.getDataEngine();
  if (engine instanceof AbstractDataEngine) {
    AbstractDataEngine dataEngine=(AbstractDataEngine)engine;
    String queryId=dataEngine.getQueryID(query);
    String result=dataEngine.getResultID(parent,rowId,queryId);
    if (result == null) {
      result=dataEngine.getResultIDByRowID(parent,rowId,queryId);
    }
    return result;
  }
  return null;
}

Fixed version (ground truth):
private static String getResultSetID(ExecutionContext context,String parent,String rowId,IDataQueryDefinition query){
  IDataEngine engine=null;
  try {
    engine=context.getDataEngine();
  }
 catch (  EngineException e) {
    context.addException(e);
  }
  if (engine != null && engine instanceof AbstractDataEngine) {
    AbstractDataEngine dataEngine=(AbstractDataEngine)engine;
    String queryId=dataEngine.getQueryID(query);
    String result=dataEngine.getResultID(parent,rowId,queryId);
    if (result == null) {
      result=dataEngine.getResultIDByRowID(parent,rowId,queryId);
    }
    return result;
  }
  return null;
}
Program: 67951
Project: 67951
Buggy source:
/** 
 * @return Returns the dataEngine.
 */
public IDataEngine getDataEngine(){
  if (dataEngine == null) {
    openDataEngine();
  }
  return dataEngine;
}

Fixed version (ground truth):
/** 
 * @return Returns the dataEngine.
 */
public IDataEngine getDataEngine() throws EngineException {
  if (dataEngine == null) {
    openDataEngine();
  }
  return dataEngine;
}
Program: 67952
Project: 67952
Buggy source:
public void openDataEngine(){
  if (dataEngine == null) {
    try {
      dataEngine=engine.getDataEngineFactory().createDataEngine(this,needOutputResultSet);
    }
 catch (    BirtException bex) {
      addException(bex);
    }
catch (    Exception ex) {
      addException(new EngineException(ex.getLocalizedMessage(),ex));
    }
  }
}

Fixed version (ground truth):
public void openDataEngine() throws EngineException {
  if (dataEngine == null) {
    try {
      dataEngine=engine.getDataEngineFactory().createDataEngine(this,needOutputResultSet);
    }
 catch (    Exception e) {
      throw new EngineException("String_Node_Str",e);
    }
  }
}
Program: 67953
Project: 67953
Buggy source:
public IBaseResultSet executeQuery(IBaseResultSet parent,IDataQueryDefinition query,Object handle){
  IDataEngine dataEngine=context.getDataEngine();
  if (query != null) {
    boolean useCache=false;
    if (handle instanceof ReportItemHandle) {
      ReportItemHandle referenceHandle=((ReportItemHandle)handle).getDataBindingReference();
      if (referenceHandle != null) {
        useCache=true;
      }
    }
    try {
      IBaseResultSet rset=dataEngine.execute(parent,query,handle,useCache);
      context.setResultSet(rset);
      return rset;
    }
 catch (    BirtException ex) {
      getLogger().log(Level.SEVERE,ex.getMessage(),ex);
      context.addException(this.getDesignHandle(),new EngineException(ex));
      return null;
    }
  }
  return null;
}

Fixed version (ground truth):
public IBaseResultSet executeQuery(IBaseResultSet parent,IDataQueryDefinition query,Object handle){
  if (query != null) {
    boolean useCache=false;
    if (handle instanceof ReportItemHandle) {
      ReportItemHandle referenceHandle=((ReportItemHandle)handle).getDataBindingReference();
      if (referenceHandle != null) {
        useCache=true;
      }
    }
    try {
      IDataEngine dataEngine=context.getDataEngine();
      IBaseResultSet rset=dataEngine.execute(parent,query,handle,useCache);
      context.setResultSet(rset);
      return rset;
    }
 catch (    BirtException ex) {
      getLogger().log(Level.SEVERE,ex.getMessage(),ex);
      context.addException(this.getDesignHandle(),new EngineException(ex));
      return null;
    }
  }
  return null;
}
Program: 67954
Project: 67954
Buggy source:
public IReportContent execute(){
  reportContent=new ReportContent(report);
  reportContent.setExecutionContext(context);
  context.setReportContent(reportContent);
  try {
    TOCBuilder tocBuilder=new TOCBuilder(context);
    reportContent.setTOCTree(tocBuilder.getTOCTree());
    context.setTOCBuilder(tocBuilder);
  }
 catch (  IOException ex) {
    context.addException(new EngineException("String_Node_Str",ex));
  }
  DocumentDataSource dataSource=context.getDataSource();
  if (dataSource != null) {
    long reportletId=dataSource.getElementID();
    if (reportletId != -1) {
      reportletExecutor=new ReportletItemExecutor(manager);
    }
  }
  Map appContext=context.getAppContext();
  context.getDataEngine().prepare(report,appContext);
  Collection<PageVariableDesign> varDesigns=report.getPageVariables();
  for (  PageVariableDesign varDesign : varDesigns) {
    String name=varDesign.getName();
    String scope=varDesign.getScope();
    PageVariable var=new PageVariable(name,scope);
    context.addPageVariable(var);
    Expression expr=varDesign.getDefaultValue();
    if (expr != null) {
      try {
        Object value=context.evaluate(expr);
        var.setDefaultValue(value);
        var.setValue(value);
      }
 catch (      BirtException ex) {
        context.addException(ex);
      }
    }
  }
  if (reportletExecutor == null) {
    context.optimizeExecution();
  }
  currentItem=0;
  if (reportletExecutor != null) {
    reportletExecutor.execute();
  }
  return reportContent;
}

Fixed version (ground truth):
public IReportContent execute() throws BirtException {
  reportContent=new ReportContent(report);
  reportContent.setExecutionContext(context);
  context.setReportContent(reportContent);
  try {
    TOCBuilder tocBuilder=new TOCBuilder(context);
    reportContent.setTOCTree(tocBuilder.getTOCTree());
    context.setTOCBuilder(tocBuilder);
  }
 catch (  IOException ex) {
    context.addException(new EngineException("String_Node_Str",ex));
  }
  DocumentDataSource dataSource=context.getDataSource();
  if (dataSource != null) {
    long reportletId=dataSource.getElementID();
    if (reportletId != -1) {
      reportletExecutor=new ReportletItemExecutor(manager);
    }
  }
  Map appContext=context.getAppContext();
  context.getDataEngine().prepare(report,appContext);
  Collection<PageVariableDesign> varDesigns=report.getPageVariables();
  for (  PageVariableDesign varDesign : varDesigns) {
    String name=varDesign.getName();
    String scope=varDesign.getScope();
    PageVariable var=new PageVariable(name,scope);
    context.addPageVariable(var);
    Expression expr=varDesign.getDefaultValue();
    if (expr != null) {
      try {
        Object value=context.evaluate(expr);
        var.setDefaultValue(value);
        var.setValue(value);
      }
 catch (      BirtException ex) {
        context.addException(ex);
      }
    }
  }
  if (reportletExecutor == null) {
    context.optimizeExecution();
  }
  currentItem=0;
  if (reportletExecutor != null) {
    reportletExecutor.execute();
  }
  return reportContent;
}
Program: 67955
Project: 67955
Buggy source:
public DataRequestSession getDataRequestSession(){
  if (context != null) {
    IDataEngine dataEngine=context.getDataEngine();
    return dataEngine.getDTESession();
  }
  return null;
}

Fixed version (ground truth):
public DataRequestSession getDataRequestSession(){
  if (context != null) {
    try {
      IDataEngine dataEngine=context.getDataEngine();
      return dataEngine.getDTESession();
    }
 catch (    EngineException e) {
      context.addException(e);
    }
  }
  return null;
}
Program: 67956
Project: 67956
Buggy source:
public ReportContentLoaderV1(ExecutionContext context){
  this.context=context;
  dataEngine=context.getDataEngine();
  report=context.getReport();
  reportContent=(ReportContent)ContentFactory.createReportContent(report);
  reportContent.setExecutionContext(context);
  context.setReportContent(reportContent);
  reportDoc=(ReportDocumentReader)context.getReportDocument();
  dataEngine.prepare(report,context.getAppContext());
}

Fixed version (ground truth):
public ReportContentLoaderV1(ExecutionContext context) throws EngineException {
  this.context=context;
  dataEngine=context.getDataEngine();
  report=context.getReport();
  reportContent=(ReportContent)ContentFactory.createReportContent(report);
  reportContent.setExecutionContext(context);
  context.setReportContent(reportContent);
  reportDoc=(ReportDocumentReader)context.getReportDocument();
  dataEngine.prepare(report,context.getAppContext());
}
Program: 67957
Project: 67957
Buggy source:
public ReportContentLoaderV2(ExecutionContext context){
  this.context=context;
  dataEngine=context.getDataEngine();
  report=context.getReport();
  reportContent=(ReportContent)ContentFactory.createReportContent(report);
  reportContent.setExecutionContext(context);
  context.setReportContent(reportContent);
  dummyReportContent=reportContent.createLabelContent();
  dummyReportContent.setStyleClass(report.getRootStyleName());
  reportDoc=context.getReportDocument();
  dataEngine.prepare(report,context.getAppContext());
  IEngineTask engineTask=context.getEngineTask();
  if (engineTask instanceof RenderTask) {
    RenderTask renderTask=(RenderTask)engineTask;
    ITreeNode tocTree=renderTask.getRawTOCTree();
    reportContent.setTOCTree(tocTree);
  }
}

Fixed version (ground truth):
public ReportContentLoaderV2(ExecutionContext context) throws EngineException {
  this.context=context;
  dataEngine=context.getDataEngine();
  report=context.getReport();
  reportContent=(ReportContent)ContentFactory.createReportContent(report);
  reportContent.setExecutionContext(context);
  context.setReportContent(reportContent);
  dummyReportContent=reportContent.createLabelContent();
  dummyReportContent.setStyleClass(report.getRootStyleName());
  reportDoc=context.getReportDocument();
  dataEngine.prepare(report,context.getAppContext());
  IEngineTask engineTask=context.getEngineTask();
  if (engineTask instanceof RenderTask) {
    RenderTask renderTask=(RenderTask)engineTask;
    ITreeNode tocTree=renderTask.getRawTOCTree();
    reportContent.setTOCTree(tocTree);
  }
}
Program: 67958
Project: 67958
Buggy source:
public ReportExecutorV3(ExecutionContext context) throws IOException {
  super(context);
}

Fixed version (ground truth):
public ReportExecutorV3(ExecutionContext context) throws IOException, BirtException {
  super(context);
}
Program: 67959
Project: 67959
Buggy source:
public ReportPageExecutorV3(ExecutionContext context,List pages,boolean paged) throws IOException {
  super(context,pages,paged);
}

Fixed version (ground truth):
public ReportPageExecutorV3(ExecutionContext context,List pages,boolean paged) throws IOException, BirtException {
  super(context,pages,paged);
}
Program: 67960
Project: 67960
Buggy source:
public ReportletExecutorV3(ExecutionContext context,long offset) throws IOException {
  super(context,offset);
}

Fixed version (ground truth):
public ReportletExecutorV3(ExecutionContext context,long offset) throws IOException, BirtException {
  super(context,offset);
}
Program: 67961
Project: 67961
Buggy source:
protected AbstractReportExecutor(ExecutionContext context) throws IOException {
}

Fixed version (ground truth):
protected AbstractReportExecutor(ExecutionContext context) throws IOException, BirtException {
}
Program: 67962
Project: 67962
Buggy source:
public ReportExecutorV4(ExecutionContext context) throws IOException {
  super(context);
  bodyExecutor=new ReportBodyExecutor(manager,null);
}

Fixed version (ground truth):
public ReportExecutorV4(ExecutionContext context) throws IOException, BirtException {
  super(context);
  bodyExecutor=new ReportBodyExecutor(manager,null);
}
Program: 67963
Project: 67963
Buggy source:
public ReportPageExecutorV4(ExecutionContext context,List pages,boolean paged) throws IOException {
  super(context);
  this.outputPages.addAll(pages);
  this.paged=paged;
  pageIter=new PageRangeIterator(outputPages);
  if (!paged) {
    Fragment fragment=loadPageHints(outputPages);
    bodyExecutor=new ReportBodyExecutor(manager,fragment);
  }
}

Fixed version (ground truth):
public ReportPageExecutorV4(ExecutionContext context,List pages,boolean paged) throws IOException, BirtException {
  super(context);
  this.outputPages.addAll(pages);
  this.paged=paged;
  pageIter=new PageRangeIterator(outputPages);
  if (!paged) {
    Fragment fragment=loadPageHints(outputPages);
    bodyExecutor=new ReportBodyExecutor(manager,fragment);
  }
}
Program: 67964
Project: 67964
Buggy source:
public AbstractReportReader(ExecutionContext context) throws IOException {
}

Fixed version (ground truth):
public AbstractReportReader(ExecutionContext context) throws IOException, BirtException {
}
Program: 67965
Project: 67965
Buggy source:
/** 
 * does the output should keep the pagination. For some emitter, it will has its own pagination, so the report page reader only read out the page content and merge the contente together. The emitter will re-paginate the content again. Such as output PDF using HTML paginhints. Some emitter in the otherside, will use the same pagination with the page hint. For those emitter, the output will include the master pages. such as output HTML with the HTML emitter.
 * @param context context used to read the report.
 * @param pages page list
 * @param keepPaginate should the output keep pagianted.
 */
public ReportPageReader(ExecutionContext context,List pages,boolean paged) throws IOException {
  super(context);
  outputPages.addAll(pages);
  this.paged=paged;
  pageIter=new PageRangeIterator(outputPages);
  if (!paged) {
    Fragment fragment=loadPageFragment(outputPages);
    bodyExecutor=new BodyReader(this,fragment);
  }
}

Fixed version (ground truth):
/** 
 * does the output should keep the pagination. For some emitter, it will has its own pagination, so the report page reader only read out the page content and merge the contente together. The emitter will re-paginate the content again. Such as output PDF using HTML paginhints. Some emitter in the otherside, will use the same pagination with the page hint. For those emitter, the output will include the master pages. such as output HTML with the HTML emitter.
 * @param context context used to read the report.
 * @param pages page list
 * @param keepPaginate should the output keep pagianted.
 */
public ReportPageReader(ExecutionContext context,List pages,boolean paged) throws IOException, BirtException {
  super(context);
  outputPages.addAll(pages);
  this.paged=paged;
  pageIter=new PageRangeIterator(outputPages);
  if (!paged) {
    Fragment fragment=loadPageFragment(outputPages);
    bodyExecutor=new BodyReader(this,fragment);
  }
}
Program: 67966
Project: 67966
Buggy source:
public ReportReader(ExecutionContext context) throws IOException {
  super(context);
  bodyReader=new BodyReader(this,null);
}

Fixed version (ground truth):
public ReportReader(ExecutionContext context) throws IOException, BirtException {
  super(context);
  bodyReader=new BodyReader(this,null);
}
Program: 67967
Project: 67967
Buggy source:
public void run(){
  if (!(getModel() instanceof DesignElementHandle)) {
    return;
  }
  DesignElementHandle handle=(DesignElementHandle)getModel();
  EditPart part=ReportElementEditPart.this;
  while (part != null && !(part instanceof RootEditPart)) {
    part=part.getParent();
  }
  if (getModelAdapter() == null || part == null) {
    return;
  }
  Object[] backGroundPosition=getBackgroundPosition(handle);
  Object xPosition=backGroundPosition[0];
  Object yPosition=backGroundPosition[1];
  boolean needRefresh=false;
  if (xPosition instanceof DimensionValue) {
    needRefresh=true;
  }
  if (yPosition instanceof DimensionValue) {
    needRefresh=true;
  }
  if (needRefresh) {
    refreshVisuals();
  }
}

Fixed version (ground truth):
public void run(){
  if (!(getModel() instanceof DesignElementHandle)) {
    return;
  }
  if (((DeferredGraphicalViewer)getViewer()).getFigureCanvas() == null) {
    return;
  }
  DesignElementHandle handle=(DesignElementHandle)getModel();
  EditPart part=ReportElementEditPart.this;
  while (part != null && !(part instanceof RootEditPart)) {
    part=part.getParent();
  }
  if (getModelAdapter() == null || part == null) {
    return;
  }
  Object[] backGroundPosition=getBackgroundPosition(handle);
  Object xPosition=backGroundPosition[0];
  Object yPosition=backGroundPosition[1];
  boolean needRefresh=false;
  if (xPosition instanceof DimensionValue) {
    needRefresh=true;
  }
  if (yPosition instanceof DimensionValue) {
    needRefresh=true;
  }
  if (needRefresh) {
    refreshVisuals();
  }
}
Program: 67968
Project: 67968
Buggy source:
public void activate(){
  if (isActive())   return;
  super.activate();
  refreshPageClip();
  getFigure().addMouseMotionListener(new MouseMotionListener.Stub(){
    public void mouseEntered(    MouseEvent me){
      addGuideFeedBack();
    }
    public void mouseExited(    MouseEvent me){
      delayRemoveGuideFeedBack();
    }
    public void mouseHover(    MouseEvent me){
      addGuideFeedBack();
    }
    public void mouseMoved(    MouseEvent me){
      addGuideFeedBack();
    }
  }
);
  getFigure().setFocusTraversable(true);
  updateLayoutPreference();
  Display.getCurrent().asyncExec(new Runnable(){
    public void run(){
      if (!(getModel() instanceof DesignElementHandle)) {
        return;
      }
      DesignElementHandle handle=(DesignElementHandle)getModel();
      EditPart part=ReportElementEditPart.this;
      while (part != null && !(part instanceof RootEditPart)) {
        part=part.getParent();
      }
      if (getModelAdapter() == null || part == null) {
        return;
      }
      Object[] backGroundPosition=getBackgroundPosition(handle);
      Object xPosition=backGroundPosition[0];
      Object yPosition=backGroundPosition[1];
      boolean needRefresh=false;
      if (xPosition instanceof DimensionValue) {
        needRefresh=true;
      }
      if (yPosition instanceof DimensionValue) {
        needRefresh=true;
      }
      if (needRefresh) {
        refreshVisuals();
      }
    }
  }
);
}

Fixed version (ground truth):
public void activate(){
  if (isActive())   return;
  super.activate();
  refreshPageClip();
  getFigure().addMouseMotionListener(new MouseMotionListener.Stub(){
    public void mouseEntered(    MouseEvent me){
      addGuideFeedBack();
    }
    public void mouseExited(    MouseEvent me){
      delayRemoveGuideFeedBack();
    }
    public void mouseHover(    MouseEvent me){
      addGuideFeedBack();
    }
    public void mouseMoved(    MouseEvent me){
      addGuideFeedBack();
    }
  }
);
  getFigure().setFocusTraversable(true);
  updateLayoutPreference();
  Display.getCurrent().asyncExec(new Runnable(){
    public void run(){
      if (!(getModel() instanceof DesignElementHandle)) {
        return;
      }
      if (((DeferredGraphicalViewer)getViewer()).getFigureCanvas() == null) {
        return;
      }
      DesignElementHandle handle=(DesignElementHandle)getModel();
      EditPart part=ReportElementEditPart.this;
      while (part != null && !(part instanceof RootEditPart)) {
        part=part.getParent();
      }
      if (getModelAdapter() == null || part == null) {
        return;
      }
      Object[] backGroundPosition=getBackgroundPosition(handle);
      Object xPosition=backGroundPosition[0];
      Object yPosition=backGroundPosition[1];
      boolean needRefresh=false;
      if (xPosition instanceof DimensionValue) {
        needRefresh=true;
      }
      if (yPosition instanceof DimensionValue) {
        needRefresh=true;
      }
      if (needRefresh) {
        refreshVisuals();
      }
    }
  }
);
}