nus-yam/ex-repair huggingface dataset:
Program: 69940
Project: 69940
Buggy source:
private void gendoc(IAction action){
  System.clearProperty(IPreviewConstants.MAX_DATASET_ROWS);
  System.clearProperty(IPreviewConstants.MAX_CUBE_ROW_LEVELS);
  System.clearProperty(IPreviewConstants.MAX_CUBE_COLUMN_LEVELS);
  FormEditor editor=UIUtil.getActiveReportEditor(false);
  ModuleHandle model=SessionHandleAdapter.getInstance().getReportDesignHandle();
  if (editor != null) {
    if (model.needsSave()) {
      editor.doSave(null);
    }
  }
  Map options=new HashMap();
  options.put(WebViewer.RESOURCE_FOLDER_KEY,ReportPlugin.getDefault().getResourceFolder());
  options.put(WebViewer.SERVLET_NAME_KEY,WebViewer.VIEWER_DOCUMENT);
  Object adapter=ElementAdapterManager.getAdapter(action,IPreviewAction.class);
  if (adapter instanceof IPreviewAction) {
    IPreviewAction delegate=(IPreviewAction)adapter;
    delegate.setProperty(IPreviewConstants.REPORT_PREVIEW_OPTIONS,options);
    delegate.setProperty(IPreviewConstants.REPORT_FILE_PATH,model.getFileName());
    delegate.run();
    return;
  }
  WebViewer.display(model.getFileName(),options);
}

Fixed version (ground truth):
private void gendoc(IAction action){
  System.clearProperty(IPreviewConstants.MAX_DATASET_ROWS);
  System.clearProperty(IPreviewConstants.MAX_CUBE_ROW_LEVELS);
  System.clearProperty(IPreviewConstants.MAX_CUBE_COLUMN_LEVELS);
  FormEditor editor=UIUtil.getActiveReportEditor(false);
  ModuleHandle model=SessionHandleAdapter.getInstance().getReportDesignHandle();
  if (model == null) {
    return;
  }
  if (editor != null) {
    if (model.needsSave()) {
      editor.doSave(null);
    }
  }
  Map options=new HashMap();
  options.put(WebViewer.RESOURCE_FOLDER_KEY,ReportPlugin.getDefault().getResourceFolder());
  options.put(WebViewer.SERVLET_NAME_KEY,WebViewer.VIEWER_DOCUMENT);
  Object adapter=ElementAdapterManager.getAdapter(action,IPreviewAction.class);
  if (adapter instanceof IPreviewAction) {
    IPreviewAction delegate=(IPreviewAction)adapter;
    delegate.setProperty(IPreviewConstants.REPORT_PREVIEW_OPTIONS,options);
    delegate.setProperty(IPreviewConstants.REPORT_FILE_PATH,model.getFileName());
    delegate.run();
    return;
  }
  WebViewer.display(model.getFileName(),options);
}
Program: 69941
Project: 69941
Buggy source:
protected void preview(String format,boolean allowPage){
  if (!prePreview()) {
    return;
  }
  FormEditor editor=UIUtil.getActiveReportEditor(false);
  ModuleHandle model=SessionHandleAdapter.getInstance().getReportDesignHandle();
  if (editor != null) {
    if (model.needsSave()) {
      editor.doSave(null);
    }
  }
  Map options=new HashMap();
  options.put(WebViewer.FORMAT_KEY,format);
  options.put(WebViewer.ALLOW_PAGE_KEY,Boolean.valueOf(allowPage));
  options.put(WebViewer.RESOURCE_FOLDER_KEY,ReportPlugin.getDefault().getResourceFolder());
  WebViewer.display(model.getFileName(),options);
}

Fixed version (ground truth):
protected void preview(String format,boolean allowPage){
  if (!prePreview()) {
    return;
  }
  FormEditor editor=UIUtil.getActiveReportEditor(false);
  ModuleHandle model=SessionHandleAdapter.getInstance().getReportDesignHandle();
  if (model == null) {
    return;
  }
  if (editor != null) {
    if (model.needsSave()) {
      editor.doSave(null);
    }
  }
  Map options=new HashMap();
  options.put(WebViewer.FORMAT_KEY,format);
  options.put(WebViewer.ALLOW_PAGE_KEY,Boolean.valueOf(allowPage));
  options.put(WebViewer.RESOURCE_FOLDER_KEY,ReportPlugin.getDefault().getResourceFolder());
  WebViewer.display(model.getFileName(),options);
}
Program: 69942
Project: 69942
Buggy source:
/** 
 * Runs this action. The detail implementation must define in the method <code>doAction</code>
 */
public void run(){
  if (!isEnabled()) {
    return;
  }
  CommandStack stack=getCommandStack();
  stack.startTrans(getTransactionLabel());
  try {
    if (Policy.TRACING_ACTIONS) {
      String[] result=this.getClass().getName().split("String_Node_Str");
      System.out.println("String_Node_Str" + result[result.length - 1] + "String_Node_Str"+ getSelection()+ "String_Node_Str");
    }
    if (doAction()) {
      if (Policy.TRACING_ACTIONS) {
        System.out.println("String_Node_Str" + this.getClass().getName() + "String_Node_Str");
      }
      stack.commit();
    }
 else {
      if (Policy.TRACING_ACTIONS) {
        System.out.println("String_Node_Str" + this.getClass().getName() + "String_Node_Str");
      }
      stack.rollbackAll();
    }
  }
 catch (  Exception e) {
    if (Policy.TRACING_ACTIONS) {
      System.out.println("String_Node_Str" + this.getClass().getName() + "String_Node_Str");
    }
    stack.rollbackAll();
    handleException(e);
  }
}

Fixed version (ground truth):
/** 
 * Runs this action. The detail implementation must define in the method <code>doAction</code>
 */
public void run(){
  if (!isEnabled()) {
    return;
  }
  if (SessionHandleAdapter.getInstance().getReportDesignHandle() == null) {
    return;
  }
  CommandStack stack=getCommandStack();
  stack.startTrans(getTransactionLabel());
  try {
    if (Policy.TRACING_ACTIONS) {
      String[] result=this.getClass().getName().split("String_Node_Str");
      System.out.println("String_Node_Str" + result[result.length - 1] + "String_Node_Str"+ getSelection()+ "String_Node_Str");
    }
    if (doAction()) {
      if (Policy.TRACING_ACTIONS) {
        System.out.println("String_Node_Str" + this.getClass().getName() + "String_Node_Str");
      }
      stack.commit();
    }
 else {
      if (Policy.TRACING_ACTIONS) {
        System.out.println("String_Node_Str" + this.getClass().getName() + "String_Node_Str");
      }
      stack.rollbackAll();
    }
  }
 catch (  Exception e) {
    if (Policy.TRACING_ACTIONS) {
      System.out.println("String_Node_Str" + this.getClass().getName() + "String_Node_Str");
    }
    stack.rollbackAll();
    handleException(e);
  }
}
Program: 69943
Project: 69943
Buggy source:
public void run(){
  CommandStack stack=SessionHandleAdapter.getInstance().getReportDesignHandle().getCommandStack();
  IElementProcessor processor=ElementProcessorFactory.createProcessor(dataType);
  stack.startTrans(processor.getCreateTransactionLabel());
  DesignElementHandle handle=processor.createElement(null);
  if (handle == null) {
    stack.rollback();
  }
 else {
    try {
      getContainer().add(handle);
    }
 catch (    Exception e) {
      stack.rollback();
      ExceptionHandler.handle(e);
    }
    stack.commit();
    synWithMediator(handle);
  }
  super.run();
}

Fixed version (ground truth):
public void run(){
  if (SessionHandleAdapter.getInstance().getReportDesignHandle() == null) {
    return;
  }
  CommandStack stack=SessionHandleAdapter.getInstance().getReportDesignHandle().getCommandStack();
  IElementProcessor processor=ElementProcessorFactory.createProcessor(dataType);
  stack.startTrans(processor.getCreateTransactionLabel());
  DesignElementHandle handle=processor.createElement(null);
  if (handle == null) {
    stack.rollback();
  }
 else {
    try {
      getContainer().add(handle);
    }
 catch (    Exception e) {
      stack.rollback();
      ExceptionHandler.handle(e);
    }
    stack.commit();
    synWithMediator(handle);
  }
  super.run();
}
Program: 69944
Project: 69944
Buggy source:
/** 
 * Perform renaming
 * @param handle the handle of the element to rename
 * @param newName the newName to set
 * @return Returns true if perform successfully,or false if failed
 */
private boolean rename(Object handle,String newName){
  if (newName.length() == 0) {
    newName=null;
  }
  CommandStack stack=SessionHandleAdapter.getInstance().getCommandStack();
  stack.startTrans(TRANS_LABEL + "String_Node_Str" + DEUtil.getDisplayLabel(handle));
  try {
    if (handle instanceof DesignElementHandle) {
      ((DesignElementHandle)handle).setName(newName);
    }
    if (handle instanceof EmbeddedImageHandle) {
      ((EmbeddedImageHandle)handle).setName(newName);
    }
    stack.commit();
  }
 catch (  NameException e) {
    ExceptionHandler.handle(e,ERROR_TITLE,e.getLocalizedMessage());
    stack.rollback();
    return false;
  }
catch (  SemanticException e) {
    ExceptionHandler.handle(e,ERROR_TITLE,e.getLocalizedMessage());
    stack.rollback();
    return true;
  }
  return true;
}

Fixed version (ground truth):
/** 
 * Perform renaming
 * @param handle the handle of the element to rename
 * @param newName the newName to set
 * @return Returns true if perform successfully,or false if failed
 */
private boolean rename(Object handle,String newName){
  if (newName.length() == 0) {
    newName=null;
  }
  if (SessionHandleAdapter.getInstance().getReportDesignHandle() == null) {
    return false;
  }
  CommandStack stack=SessionHandleAdapter.getInstance().getCommandStack();
  stack.startTrans(TRANS_LABEL + "String_Node_Str" + DEUtil.getDisplayLabel(handle));
  try {
    if (handle instanceof DesignElementHandle) {
      ((DesignElementHandle)handle).setName(newName);
    }
    if (handle instanceof EmbeddedImageHandle) {
      ((EmbeddedImageHandle)handle).setName(newName);
    }
    stack.commit();
  }
 catch (  NameException e) {
    ExceptionHandler.handle(e,ERROR_TITLE,e.getLocalizedMessage());
    stack.rollback();
    return false;
  }
catch (  SemanticException e) {
    ExceptionHandler.handle(e,ERROR_TITLE,e.getLocalizedMessage());
    stack.rollback();
    return true;
  }
  return true;
}
Program: 69945
Project: 69945
Buggy source:
public void run(){
  if (Policy.TRACING_ACTIONS) {
    System.out.println("String_Node_Str");
  }
  PaletteEntryExtension[] entries=EditpartExtensionManager.getPaletteEntries();
  for (int i=0; i < entries.length; i++) {
    if (entries[i].getItemName().equals(this.insertType)) {
      try {
        selectElement(entries[i].executeCreate(),false);
      }
 catch (      Exception e) {
        ExceptionHandler.handle(e);
      }
      return;
    }
  }
  CommandStack stack=SessionHandleAdapter.getInstance().getCommandStack();
  stack.startTrans(STACK_MSG_INSERT_ELEMENT);
  try {
    final Request req=insertElement();
    if (req != null) {
      stack.commit();
      selectElement(req.getExtendedData().get(IRequestConstants.REQUEST_KEY_RESULT),true);
      return;
    }
  }
 catch (  Exception e) {
    ExceptionHandler.handle(e);
  }
  stack.rollback();
}

Fixed version (ground truth):
public void run(){
  if (Policy.TRACING_ACTIONS) {
    System.out.println("String_Node_Str");
  }
  PaletteEntryExtension[] entries=EditpartExtensionManager.getPaletteEntries();
  for (int i=0; i < entries.length; i++) {
    if (entries[i].getItemName().equals(this.insertType)) {
      try {
        selectElement(entries[i].executeCreate(),false);
      }
 catch (      Exception e) {
        ExceptionHandler.handle(e);
      }
      return;
    }
  }
  if (SessionHandleAdapter.getInstance().getReportDesignHandle() == null) {
    return;
  }
  CommandStack stack=SessionHandleAdapter.getInstance().getCommandStack();
  stack.startTrans(STACK_MSG_INSERT_ELEMENT);
  try {
    final Request req=insertElement();
    if (req != null) {
      stack.commit();
      selectElement(req.getExtendedData().get(IRequestConstants.REQUEST_KEY_RESULT),true);
      return;
    }
  }
 catch (  Exception e) {
    ExceptionHandler.handle(e);
  }
  stack.rollback();
}
Program: 69946
Project: 69946
Buggy source:
public void run(){
  if (Policy.TRACING_ACTIONS) {
    System.out.println("String_Node_Str" + getClass() + "String_Node_Str");
  }
  if (menu != null) {
    actionItems=getItems();
    menu.removeAll();
    for (Iterator i=actionItems.iterator(); i.hasNext(); ) {
      DynamicItemAction action=(DynamicItemAction)i.next();
      if (action != null) {
        action.setSelection(getSelection());
        menu.add(action);
      }
 else {
        menu.add(new Separator());
      }
    }
    if (menu.getItems().length == 0) {
      menu.add(NoneAction.getInstance());
    }
    menu.update(true);
  }
}

Fixed version (ground truth):
public void run(){
  if (Policy.TRACING_ACTIONS) {
    System.out.println("String_Node_Str" + getClass() + "String_Node_Str");
  }
  if (SessionHandleAdapter.getInstance().getReportDesignHandle() == null) {
    return;
  }
  if (menu != null) {
    actionItems=getItems();
    menu.removeAll();
    for (Iterator i=actionItems.iterator(); i.hasNext(); ) {
      DynamicItemAction action=(DynamicItemAction)i.next();
      if (action != null) {
        action.setSelection(getSelection());
        menu.add(action);
      }
 else {
        menu.add(new Separator());
      }
    }
    if (menu.getItems().length == 0) {
      menu.add(NoneAction.getInstance());
    }
    menu.update(true);
  }
}
Program: 69950
Project: 69950
Buggy source:
/** 
 * Resets all member variables within this object recursively Note: Manually written
 */
public final void initialize(){
  setCaption(TextImpl.create((String)null));
  setBackground(ColorDefinitionImpl.create(this,ComponentPackage.eINSTANCE.getLabel_Background()));
  final Insets ins=InsetsImpl.create(this,ComponentPackage.eINSTANCE.getLabel_Insets());
  setInsets(ins);
  final LineAttributes lia=LineAttributesImpl.create(this,ComponentPackage.eINSTANCE.getLabel_Outline());
  lia.setColor(ColorDefinitionImpl.create(lia,AttributePackage.eINSTANCE.getLineAttributes_Color()));
  setOutline(lia);
}

Fixed version (ground truth):
/** 
 * Resets all member variables within this object recursively Note: Manually written
 */
protected final void initialize(){
  setCaption(TextImpl.create((String)null));
  setBackground(ColorDefinitionImpl.TRANSPARENT());
  final Insets ins=AttributeFactory.eINSTANCE.createInsets();
  ((InsetsImpl)ins).set(0,2,0,3);
  setInsets(ins);
  final LineAttributes lia=AttributeFactory.eINSTANCE.createLineAttributes();
  ((LineAttributesImpl)lia).set(ColorDefinitionImpl.BLACK(),LineStyle.SOLID_LITERAL,1);
  setOutline(lia);
  setVisible(true);
}
Program: 69951
Project: 69951
Buggy source:
protected void initialize(){
  LabelImpl la=(LabelImpl)LabelImpl.create(this,ComponentPackage.eINSTANCE.getSeries_Label());
  la.initialize();
  setLabel(la);
  setSeriesIdentifier(IConstants.UNDEFINED_STRING);
  setDataPoint(DataPointImpl.create(null,null,"String_Node_Str"));
}

Fixed version (ground truth):
protected void initialize(){
  setStacked(false);
  setVisible(true);
  final Label la=LabelImpl.create();
  LineAttributes lia=LineAttributesImpl.create(ColorDefinitionImpl.BLACK(),LineStyle.SOLID_LITERAL,1);
  la.setOutline(lia);
  lia.setVisible(false);
  setLabel(la);
  la.setVisible(false);
  setLabelPosition(Position.OUTSIDE_LITERAL);
  setSeriesIdentifier(IConstants.UNDEFINED_STRING);
  setDataPoint(DataPointImpl.create(null,null,"String_Node_Str"));
}
Program: 69952
Project: 69952
Buggy source:
/** 
 * Note: Manually written
 */
protected void initialize(){
  setVersion(VERSION);
  block=BlockImpl.create();
  block.setBackground(ColorDefinitionImpl.WHITE());
  TitleBlock tb=(TitleBlock)TitleBlockImpl.create();
  Plot pl=(Plot)PlotImpl.create();
  Legend lg=(Legend)LegendImpl.create();
  block.add(tb);
  block.add(pl);
  block.add(lg);
  Text txtChartTitle=tb.getLabel().getCaption();
  txtChartTitle.setValue("String_Node_Str");
  txtChartTitle.getFont().setSize(16);
  txtChartTitle.getFont().setBold(true);
  TextAlignment taTitle=TextAlignmentImpl.create();
  taTitle.setHorizontalAlignment(HorizontalAlignment.CENTER_LITERAL);
  taTitle.setVerticalAlignment(VerticalAlignment.CENTER_LITERAL);
  txtChartTitle.getFont().setAlignment(taTitle);
  setSeriesThickness(10);
  setInteractivity(InteractivityImpl.create());
  setEmptyMessage(newEmptyMessage());
}

Fixed version (ground truth):
/** 
 * Note: Manually written
 */
protected void initialize(){
  setVersion(VERSION);
  block=BlockImpl.create();
  block.setBackground(ColorDefinitionImpl.WHITE());
  TitleBlock tb=(TitleBlock)TitleBlockImpl.create();
  Plot pl=(Plot)PlotImpl.create();
  Legend lg=(Legend)LegendImpl.create();
  block.add(tb);
  block.add(pl);
  block.add(lg);
  Text txtChartTitle=tb.getLabel().getCaption();
  txtChartTitle.setValue("String_Node_Str");
  txtChartTitle.getFont().setSize(16);
  txtChartTitle.getFont().setBold(true);
  TextAlignment taTitle=TextAlignmentImpl.create();
  taTitle.setHorizontalAlignment(HorizontalAlignment.CENTER_LITERAL);
  taTitle.setVerticalAlignment(VerticalAlignment.CENTER_LITERAL);
  txtChartTitle.getFont().setAlignment(taTitle);
  setDimension(ChartDimension.TWO_DIMENSIONAL_LITERAL);
  setSeriesThickness(10);
  setInteractivity(InteractivityImpl.create());
  setEmptyMessage(newEmptyMessage());
}
Program: 69953
Project: 69953
Buggy source:
/** 
 * Resets all member variables within this object recursively Note: Manually written
 */
protected void initialize(){
  final LineAttributes lia=LineAttributesImpl.create(this,LayoutPackage.eINSTANCE.getBlock_Outline());
  lia.setColor(ColorDefinitionImpl.create(lia,AttributePackage.eINSTANCE.getLineAttributes_Color()));
  setOutline(lia);
  final Bounds bo=BoundsImpl.create(this,LayoutPackage.eINSTANCE.getBlock_Bounds());
  setBounds(bo);
  final Insets i=InsetsImpl.create(this,LayoutPackage.eINSTANCE.getBlock_Insets());
  setInsets(i);
}

Fixed version (ground truth):
/** 
 * Resets all member variables within this object recursively Note: Manually written
 */
protected void initialize(){
  final LineAttributes lia=LineAttributesImpl.create(ColorDefinitionImpl.BLACK(),LineStyle.SOLID_LITERAL,1);
  lia.setVisible(false);
  setOutline(lia);
  final Bounds bo=AttributeFactory.eINSTANCE.createBounds();
  ((BoundsImpl)bo).set(0,0,0,0);
  setBounds(bo);
  final Insets i=AttributeFactory.eINSTANCE.createInsets();
  ((InsetsImpl)i).set(3,3,3,3);
  setInsets(i);
  setRow(-1);
  setColumn(-1);
  setRowspan(-1);
  setColumnspan(-1);
  setVisible(true);
}
Program: 69954
Project: 69954
Buggy source:
/** 
 * Resets all member variables within this object recursively Note: Manually written
 */
public final void initialize(){
  final LineAttributes lia=LineAttributesImpl.create(this,LayoutPackage.eINSTANCE.getClientArea_Outline());
  lia.setColor(ColorDefinitionImpl.create(lia,AttributePackage.eINSTANCE.getLineAttributes_Color()));
  setOutline(lia);
  setInsets(InsetsImpl.create(this,LayoutPackage.eINSTANCE.getClientArea_Insets()));
}

Fixed version (ground truth):
/** 
 * Resets all member variables within this object recursively Note: Manually written
 */
public final void initialize(){
  final LineAttributes lia=LineAttributesImpl.create(ColorDefinitionImpl.BLACK(),LineStyle.SOLID_LITERAL,0);
  lia.setVisible(false);
  setOutline(lia);
  setInsets(InsetsImpl.create(0,0,0,0));
}
Program: 69955
Project: 69955
Buggy source:
/** 
 * Resets all member variables within this object recursively Note: Manually written
 */
protected final void initialize(){
  super.initialize();
  Label la=LabelImpl.create();
  LineAttributes lia=LineAttributesImpl.create(this,ComponentPackage.eINSTANCE.getLabel_Outline());
  lia.setColor(ColorDefinitionImpl.create(lia,AttributePackage.eINSTANCE.getLineAttributes_Color()));
  la.setOutline(lia);
  la.setVisible(false);
  setTitle(la);
  LineAttributes separator=LineAttributesImpl.create(this,LayoutPackage.eINSTANCE.getLegend_Separator());
  separator.setColor(ColorDefinitionImpl.create(separator,AttributePackage.eINSTANCE.getLineAttributes_Color()));
  setSeparator(separator);
  final ClientArea ca=LayoutFactory.eINSTANCE.createClientArea();
  ((ClientAreaImpl)ca).initialize();
  ca.getInsets().set(2,2,2,2);
  setClientArea(ca);
  setText(TextImpl.create((String)null));
}

Fixed version (ground truth):
/** 
 * Resets all member variables within this object recursively Note: Manually written
 */
protected final void initialize(){
  super.initialize();
  setPosition(Position.RIGHT_LITERAL);
  setOrientation(Orientation.VERTICAL_LITERAL);
  setDirection(Direction.TOP_BOTTOM_LITERAL);
  setItemType(LegendItemType.SERIES_LITERAL);
  Label la=LabelImpl.create();
  LineAttributes lia=LineAttributesImpl.create(ColorDefinitionImpl.BLACK(),LineStyle.SOLID_LITERAL,1);
  lia.setVisible(false);
  la.setOutline(lia);
  la.setVisible(false);
  setTitle(la);
  setTitlePosition(Position.ABOVE_LITERAL);
  LineAttributes separator=LineAttributesImpl.create(ColorDefinitionImpl.BLACK(),LineStyle.SOLID_LITERAL,1);
  separator.setVisible(true);
  setSeparator(separator);
  final ClientArea ca=LayoutFactory.eINSTANCE.createClientArea();
  ((ClientAreaImpl)ca).initialize();
  ca.getInsets().set(2,2,2,2);
  setClientArea(ca);
  setText(TextImpl.create((String)null));
}
Program: 69956
Project: 69956
Buggy source:
/** 
 * Resets all member variables within this object recursively Note: Manually written
 */
protected final void initialize(){
  super.initialize();
  final ClientArea ca=LayoutFactory.eINSTANCE.createClientArea();
  ((ClientAreaImpl)ca).initialize();
  setClientArea(ca);
}

Fixed version (ground truth):
/** 
 * Resets all member variables within this object recursively Note: Manually written
 */
protected final void initialize(){
  super.initialize();
  final ClientArea ca=LayoutFactory.eINSTANCE.createClientArea();
  ((ClientAreaImpl)ca).initialize();
  setClientArea(ca);
  setHorizontalSpacing(5);
  setVerticalSpacing(5);
}
Program: 69957
Project: 69957
Buggy source:
/** 
 * Destroy action
 * @param rollback true: rollback to savedItemModel false: do nothing
 */
public void destory(boolean rollback){
  if (rollback) {
    if (ds instanceof OdaDataSetHandle) {
      try {
        ((OdaDataSetHandle)ds).setQueryText(this.savedQueryText);
        DataSetProvider.getCurrentInstance().getDataSetDesign(ds,true,true);
      }
 catch (      SemanticException e) {
      }
catch (      BirtException e) {
      }
    }
    DataSetProvider.getCurrentInstance().setModelOfDataSetHandle(this.ds,savedItemModel);
  }
  ds.removeListener(this);
}

Fixed version (ground truth):
/** 
 * Destroy action
 * @param rollback true: rollback to savedItemModel false: do nothing
 */
public void destory(boolean rollback){
  if (rollback) {
    if (ds instanceof OdaDataSetHandle) {
      try {
        ((OdaDataSetHandle)ds).setQueryText(this.savedQueryText);
        DataSetProvider.getCurrentInstance().getDataSetDesign(ds,true,true);
      }
 catch (      SemanticException e) {
      }
catch (      BirtException e) {
      }
    }
    DataSetProvider.getCurrentInstance().setModelOfDataSetHandle(this.ds,savedItemModel);
  }
  Thread.currentThread().setContextClassLoader(oldContextLoader);
  ds.removeListener(this);
}
Program: 69958
Project: 69958
Buggy source:
/** 
 * @param dataSet
 */
private void setContextLoader(DataSetHandle dataSet){
  ClassLoader oldContextLoader=Thread.currentThread().getContextClassLoader();
  ClassLoader parentLoader=oldContextLoader;
  if (parentLoader == null)   parentLoader=this.getClass().getClassLoader();
  ClassLoader newContextLoader=DataSetProvider.getCustomScriptClassLoader(parentLoader,dataSet.getModuleHandle());
  Thread.currentThread().setContextClassLoader(newContextLoader);
}

Fixed version (ground truth):
/** 
 * @param dataSet
 */
private void setContextLoader(DataSetHandle dataSet){
  oldContextLoader=Thread.currentThread().getContextClassLoader();
  ClassLoader parentLoader=oldContextLoader;
  if (parentLoader == null)   parentLoader=this.getClass().getClassLoader();
  ClassLoader newContextLoader=DataSetProvider.getCustomScriptClassLoader(parentLoader,dataSet.getModuleHandle());
  Thread.currentThread().setContextClassLoader(newContextLoader);
}
Program: 69959
Project: 69959
Buggy source:
public SeriesOptionChoser(SeriesDefinition seriesDefn,String seriesName,int iSeriesDefinitionIndex,int treeIndex,boolean canStack,int axisIndex){
  this.seriesDefn=seriesDefn;
  this.seriesName=seriesName;
  this.iSeriesDefinitionIndex=iSeriesDefinitionIndex;
  this.treeIndex=treeIndex;
  this.canStack=canStack;
  this.axisIndex=axisIndex;
}

Fixed version (ground truth):
public SeriesOptionChoser(SeriesDefinition seriesDefn,String seriesName,int iSeriesDefinitionIndex,int treeIndex,boolean canStack,int axisIndex){
  this.seriesDefn=seriesDefn;
  this.seriesName=seriesName;
  this.iSeriesDefinitionIndex=iSeriesDefinitionIndex;
  this.treeIndex=treeIndex;
  this.canStack=canStack;
  this.axisIndex=axisIndex;
  this.bStackedPercent=isStackedPercent(seriesDefn);
}
Program: 69960
Project: 69960
Buggy source:
/** 
 * Set state of stacked CheckBox by type of series.
 */
private void setStackedBoxState(){
  if (btnStack == null) {
    return;
  }
  ChartDimension cd=getChart().getDimension();
  if ((cd == ChartDimension.TWO_DIMENSIONAL_LITERAL || cd == ChartDimension.TWO_DIMENSIONAL_WITH_DEPTH_LITERAL)) {
    List<SeriesDefinition> seriesDefns=ChartUIUtil.getOrthogonalSeriesDefinitions(getChart(),axisIndex);
    Series s=seriesDefns.get(0).getDesignTimeSeries();
    if (s.getDisplayName().equals(seriesDefn.getDesignTimeSeries().getDisplayName())) {
      if (canStack && seriesDefn.getDesignTimeSeries().canBeStacked()) {
        btnStack.setEnabled(true);
      }
    }
 else {
      btnStack.setEnabled(false);
      cmbTypes.setEnabled(true);
    }
  }
}

Fixed version (ground truth):
/** 
 * Set state of stacked CheckBox by type of series.
 */
private void setStackedBoxState(){
  if (btnStack == null) {
    return;
  }
  ChartDimension cd=getChart().getDimension();
  if ((cd == ChartDimension.TWO_DIMENSIONAL_LITERAL || cd == ChartDimension.TWO_DIMENSIONAL_WITH_DEPTH_LITERAL)) {
    List<SeriesDefinition> seriesDefns=ChartUIUtil.getOrthogonalSeriesDefinitions(getChart(),axisIndex);
    Series s=seriesDefns.get(0).getDesignTimeSeries();
    if (s.getDisplayName().equals(seriesDefn.getDesignTimeSeries().getDisplayName())) {
      if (canStack && seriesDefn.getDesignTimeSeries().canBeStacked() && !bStackedPercent) {
        btnStack.setEnabled(true);
      }
    }
 else {
      btnStack.setEnabled(false);
      cmbTypes.setEnabled(true);
    }
  }
}
Program: 69962
Project: 69962
Buggy source:
public void mouseDown(MouseEvent e){
  if (e.button == 3) {
    TableItem item=((Table)e.widget).getItem(new Point(e.x,e.y));
    if (item == null) {
      tableViewerColumns.getTable().select(-1);
    }
    boolean isSharingChart=dataProvider.checkState(IDataServiceProvider.SHARE_CHART_QUERY);
    if (item != null && !isSharingChart) {
      if (table.getMenu() != null) {
        table.getMenu().dispose();
      }
      table.setMenu(createMenuManager(item.getData()).createContextMenu(table));
    }
 else {
      table.setMenu(null);
    }
    if (table.getMenu() != null && !isSharingChart) {
      table.getMenu().setVisible(true);
    }
  }
}

Fixed version (ground truth):
public void mouseDown(MouseEvent e){
  if (e.button == 3) {
    if (isCubeMode()) {
      table.setMenu(null);
    }
 else {
      TableItem item=((Table)e.widget).getItem(new Point(e.x,e.y));
      if (item == null) {
        tableViewerColumns.getTable().select(-1);
      }
      boolean isSharingChart=dataProvider.checkState(IDataServiceProvider.SHARE_CHART_QUERY);
      if (item != null && !isSharingChart) {
        if (table.getMenu() != null) {
          table.getMenu().dispose();
        }
        table.setMenu(createMenuManager(item.getData()).createContextMenu(table));
      }
 else {
        table.setMenu(null);
      }
      if (table.getMenu() != null && !isSharingChart) {
        table.getMenu().setVisible(true);
      }
    }
  }
}
Program: 69965
Project: 69965
Buggy source:
/** 
 */
private void refreshColumnsListView(){
  if (dataProvider.getDataSetFromHandle() == null) {
    return;
  }
  if (isCubeMode()) {
    return;
  }
  Runnable runnable=new Runnable(){
    public void run(){
      ColumnBindingInfo[] headers=null;
      List<?> dataList=null;
      try {
        headers=getDataServiceProvider().getPreviewHeadersInfo();
        if (dataProvider.isLivePreviewEnabled()) {
          dataList=getPreviewData();
        }
        final ColumnBindingInfo[] headerInfo=headers;
        final List<?> data=dataList;
        Display.getDefault().syncExec(new Runnable(){
          public void run(){
            updateColumnsTableViewer(headerInfo,data);
            ChartWizard.removeException(ChartWizard.StaChartDSh_dPreview_ID);
          }
        }
);
      }
 catch (      Exception e) {
        final ColumnBindingInfo[] headerInfo=headers;
        final List<?> data=dataList;
        final String message=e.getLocalizedMessage();
        Display.getDefault().syncExec(new Runnable(){
          public void run(){
            updateColumnsTableViewer(headerInfo,data);
            ChartWizard.showException(ChartWizard.StaChartDSh_dPreview_ID,message);
          }
        }
);
      }
    }
  }
;
  new Thread(runnable).start();
}

Fixed version (ground truth):
/** 
 */
private void refreshColumnsListView(){
  Runnable runnable=new Runnable(){
    public void run(){
      ColumnBindingInfo[] headers=null;
      List<?> dataList=null;
      try {
        headers=getDataServiceProvider().getPreviewHeadersInfo();
        if (dataProvider.isLivePreviewEnabled()) {
          dataList=getPreviewData();
        }
        final ColumnBindingInfo[] headerInfo=headers;
        final List<?> data=dataList;
        Display.getDefault().syncExec(new Runnable(){
          public void run(){
            updateColumnsTableViewer(headerInfo,data);
            ChartWizard.removeException(ChartWizard.StaChartDSh_dPreview_ID);
          }
        }
);
      }
 catch (      Exception e) {
        final ColumnBindingInfo[] headerInfo=headers;
        final List<?> data=dataList;
        final String message=e.getLocalizedMessage();
        Display.getDefault().syncExec(new Runnable(){
          public void run(){
            updateColumnsTableViewer(headerInfo,data);
            ChartWizard.showException(ChartWizard.StaChartDSh_dPreview_ID,message);
          }
        }
);
      }
    }
  }
;
  new Thread(runnable).start();
}
Program: 69966
Project: 69966
Buggy source:
public void validateSeriesBindingType(Series series,IDataServiceProvider idsp) throws ChartException {
  List entries=series.getDataDefinition();
  if (entries.size() >= 2) {
    Query query=(Query)entries.get(1);
    DataType dataType=idsp.getDataType(query.getDefinition());
    if (dataType == DataType.TEXT_LITERAL || dataType == DataType.DATE_TIME_LITERAL) {
      throw new ChartException(ChartUIExtensionPlugin.ID,ChartException.DATA_BINDING,query.getDefinition());
    }
  }
}

Fixed version (ground truth):
public void validateSeriesBindingType(Series series,IDataServiceProvider idsp) throws ChartException {
  List<Query> entries=series.getDataDefinition();
  if (entries.size() >= 2) {
    Query query=entries.get(1);
    DataType dataType=idsp.getDataType(query.getDefinition());
    if (dataType == DataType.TEXT_LITERAL || dataType == DataType.DATE_TIME_LITERAL) {
      throw new ChartException(ChartUIExtensionPlugin.ID,ChartException.DATA_BINDING,query.getDefinition());
    }
  }
}
Program: 69970
Project: 69970
Buggy source:
/** 
 * @return
 * @throws UndefinedValueException
 */
private final int getJavaType() throws ChartException {
  if (!isSetType()) {
    throw new ChartException(ChartEnginePlugin.ID,ChartException.UNDEFINED_VALUE,Messages.getString("String_Node_Str"));
  }
switch (getType().getValue()) {
case DateFormatType.SHORT:
    return DateFormat.SHORT;
case DateFormatType.MEDIUM:
  return DateFormat.MEDIUM;
case DateFormatType.LONG:
return DateFormat.LONG;
case DateFormatType.FULL:
return DateFormat.FULL;
}
return 0;
}

Fixed version (ground truth):
/** 
 * @return
 * @throws UndefinedValueException
 */
private final int getJavaType() throws ChartException {
switch (getType().getValue()) {
case DateFormatType.SHORT:
    return DateFormat.SHORT;
case DateFormatType.MEDIUM:
  return DateFormat.MEDIUM;
case DateFormatType.LONG:
return DateFormat.LONG;
case DateFormatType.FULL:
return DateFormat.FULL;
}
return 0;
}
Program: 69971
Project: 69971
Buggy source:
public BigDecimal getBigDecimal(String columnName) throws OdaException {
  assertNotNull(rs);
  try {
    return rs.getBigDecimal(columnName);
  }
 catch (  SQLException e) {
    throw new JDBCException(ResourceConstants.RESULTSET_CANNOT_GET_BIGDECIMAL_VALUE,e);
  }
}

Fixed version (ground truth):
public BigDecimal getBigDecimal(String columnName) throws OdaException {
  assertNotNull(rs);
  try {
    return rs.getBigDecimal(columnName);
  }
 catch (  SQLException e) {
    try {
      Object value=rs.getObject(columnName);
      if (value instanceof BigDecimal)       return (BigDecimal)value;
    }
 catch (    SQLException e1) {
    }
    throw new JDBCException(ResourceConstants.RESULTSET_CANNOT_GET_BIGDECIMAL_VALUE,e);
  }
}
Program: 69972
Project: 69972
Buggy source:
public IClob getClob(int index) throws OdaException {
  assertNotNull(rs);
  try {
    java.sql.Clob clob=rs.getClob(index);
    return new Clob(clob);
  }
 catch (  SQLException e) {
    throw new JDBCException(ResourceConstants.RESULTSET_CANNOT_GET_BLOB_VALUE,e);
  }
}

Fixed version (ground truth):
public IClob getClob(int index) throws OdaException {
  assertNotNull(rs);
  try {
    java.sql.Clob clob=rs.getClob(index);
    return new Clob(clob);
  }
 catch (  SQLException e) {
    try {
      Object value=rs.getObject(index);
      if (value instanceof IBlob)       return (IClob)value;
    }
 catch (    SQLException ex) {
    }
    throw new JDBCException(ResourceConstants.RESULTSET_CANNOT_GET_BLOB_VALUE,e);
  }
}
Program: 69973
Project: 69973
Buggy source:
public IBlob getBlob(int index) throws OdaException {
  assertNotNull(rs);
  try {
    java.sql.Blob blob=rs.getBlob(index);
    return new Blob(blob);
  }
 catch (  UnsupportedOperationException e1) {
    try {
      InputStream inputStream=rs.getBinaryStream(index);
      return new Blob(SqlBlobUtil.newBlob(inputStream));
    }
 catch (    SQLException e2) {
      throw new JDBCException(ResourceConstants.RESULTSET_CANNOT_GET_BLOB_VALUE,e2);
    }
  }
catch (  SQLException e) {
    try {
      byte[] bytes=rs.getBytes(index);
      if (bytes == null)       return null;
      return new Blob(SqlBlobUtil.newBlob(new ByteArrayInputStream(bytes)));
    }
 catch (    SQLException e2) {
      throw new JDBCException(ResourceConstants.RESULTSET_CANNOT_GET_BLOB_VALUE,e2);
    }
  }
}

Fixed version (ground truth):
public IBlob getBlob(int index) throws OdaException {
  assertNotNull(rs);
  try {
    java.sql.Blob blob=rs.getBlob(index);
    return new Blob(blob);
  }
 catch (  UnsupportedOperationException e1) {
    try {
      InputStream inputStream=rs.getBinaryStream(index);
      return new Blob(SqlBlobUtil.newBlob(inputStream));
    }
 catch (    SQLException e2) {
      throw new JDBCException(ResourceConstants.RESULTSET_CANNOT_GET_BLOB_VALUE,e2);
    }
  }
catch (  SQLException e) {
    try {
      byte[] bytes=rs.getBytes(index);
      if (bytes == null)       return null;
      return new Blob(SqlBlobUtil.newBlob(new ByteArrayInputStream(bytes)));
    }
 catch (    SQLException e2) {
      try {
        Object value=rs.getObject(index);
        if (value instanceof IBlob)         return (IBlob)value;
      }
 catch (      SQLException ex) {
      }
      throw new JDBCException(ResourceConstants.RESULTSET_CANNOT_GET_BLOB_VALUE,e2);
    }
  }
}
Program: 69974
Project: 69974
Buggy source:
public void testNoRepeatOfSmallImage2(){
  Position imagePosition=new Position(2,2);
  BackgroundImageLayout layout=getLayoutOfSmallImage2();
  List positions=layout.getImagePositions(BackgroundImageLayout.REPEAT_NONE);
  assertEquals(1,positions.size());
  assertEquals(imagePosition,positions.iterator().next());
}

Fixed version (ground truth):
public void testNoRepeatOfSmallImage2(){
  Position imagePosition=new Position(2,2);
  BackgroundImageLayout layout=getLayoutOfSmallImage2();
  List positions=layout.getImagePositions(AreaConstants.NO_REPEAT);
  assertEquals(1,positions.size());
  assertEquals(imagePosition,positions.iterator().next());
}
Program: 69975
Project: 69975
Buggy source:
/** 
 * Test only the initial image position will be returned when the image is smaller than the area and repeat mode is no repeat.
 */
public void testNoRepeatOfSmallImage(){
  Position imagePosition=new Position(2,2);
  BackgroundImageLayout layout=getLayoutOfSmallImage();
  List positions=layout.getImagePositions(BackgroundImageLayout.REPEAT_NONE);
  assertEquals(1,positions.size());
  assertEquals(imagePosition,positions.iterator().next());
}

Fixed version (ground truth):
/** 
 * Test only the initial image position will be returned when the image is smaller than the area and repeat mode is no repeat.
 */
public void testNoRepeatOfSmallImage(){
  Position imagePosition=new Position(2,2);
  BackgroundImageLayout layout=getLayoutOfSmallImage();
  List positions=layout.getImagePositions(AreaConstants.NO_REPEAT);
  assertEquals(1,positions.size());
  assertEquals(imagePosition,positions.iterator().next());
}
Program: 69976
Project: 69976
Buggy source:
public void testRepeatOfSmallImage(){
  List expected=new ArrayList();
  for (float y=-1.0f; y <= 8.0f; y+=3.0) {
    for (float x=-1.0f; x <= 8.0f; x+=3.0) {
      expected.add(new Position(x,y));
    }
  }
  Collections.sort(expected);
  BackgroundImageLayout layout=getLayoutOfSmallImage();
  List actual=layout.getImagePositions(BackgroundImageLayout.REPEAT_BOTH);
  assertEquals(expected,actual);
}

Fixed version (ground truth):
public void testRepeatOfSmallImage(){
  List expected=new ArrayList();
  for (float y=-1.0f; y <= 8.0f; y+=3.0) {
    for (float x=-1.0f; x <= 8.0f; x+=3.0) {
      expected.add(new Position(x,y));
    }
  }
  Collections.sort(expected);
  BackgroundImageLayout layout=getLayoutOfSmallImage();
  List actual=layout.getImagePositions(AreaConstants.REPEAT);
  assertEquals(expected,actual);
}
Program: 69977
Project: 69977
Buggy source:
public void testRepeatYOfSmallImage(){
  List expected=new ArrayList();
  for (float y=-1.0f; y <= 8.0f; y+=3.0) {
    expected.add(new Position(2.0f,y));
  }
  BackgroundImageLayout layout=getLayoutOfSmallImage();
  List actual=layout.getImagePositions(BackgroundImageLayout.REPEAT_Y);
  assertEquals(expected,actual);
}

Fixed version (ground truth):
public void testRepeatYOfSmallImage(){
  List expected=new ArrayList();
  for (float y=-1.0f; y <= 8.0f; y+=3.0) {
    expected.add(new Position(2.0f,y));
  }
  BackgroundImageLayout layout=getLayoutOfSmallImage();
  List actual=layout.getImagePositions(AreaConstants.REPEAT_Y);
  assertEquals(expected,actual);
}
Program: 69978
Project: 69978
Buggy source:
public void testRepeatXOfSmallImage(){
  List expected=new ArrayList();
  for (float x=-1.0f; x <= 8.0f; x+=3.0) {
    expected.add(new Position(x,2.0f));
  }
  BackgroundImageLayout layout=getLayoutOfSmallImage();
  List actual=layout.getImagePositions(BackgroundImageLayout.REPEAT_X);
  assertEquals(expected,actual);
}

Fixed version (ground truth):
public void testRepeatXOfSmallImage(){
  List expected=new ArrayList();
  for (float x=-1.0f; x <= 8.0f; x+=3.0) {
    expected.add(new Position(x,2.0f));
  }
  BackgroundImageLayout layout=getLayoutOfSmallImage();
  List actual=layout.getImagePositions(AreaConstants.REPEAT_X);
  assertEquals(expected,actual);
}
Program: 69979
Project: 69979
Buggy source:
/** 
 * Test when image is larger than area, only the initial image position will be returned.
 */
public void testNoRepeatOfBigImage(){
  Position areaPosition=new Position(0,0);
  Position areaSize=new Position(10,10);
  Position imagePosition=new Position(-1,-1);
  Position imageSize=new Position(11,11);
  BackgroundImageLayout layout=new BackgroundImageLayout(areaPosition,areaSize,imagePosition,imageSize);
  List positions=layout.getImagePositions(BackgroundImageLayout.REPEAT_NONE);
  assertEquals(1,positions.size());
  assertEquals(imagePosition,positions.iterator().next());
  positions=layout.getImagePositions(BackgroundImageLayout.REPEAT_X);
  assertEquals(1,positions.size());
  assertEquals(imagePosition,positions.iterator().next());
  positions=layout.getImagePositions(BackgroundImageLayout.REPEAT_Y);
  assertEquals(1,positions.size());
  assertEquals(imagePosition,positions.iterator().next());
  positions=layout.getImagePositions(BackgroundImageLayout.REPEAT_BOTH);
  assertEquals(1,positions.size());
  assertEquals(imagePosition,positions.iterator().next());
}

Fixed version (ground truth):
/** 
 * Test when image is larger than area, only the initial image position will be returned.
 */
public void testNoRepeatOfBigImage(){
  Position areaPosition=new Position(0,0);
  Position areaSize=new Position(10,10);
  Position imagePosition=new Position(-1,-1);
  Position imageSize=new Position(11,11);
  BackgroundImageLayout layout=new BackgroundImageLayout(areaPosition,areaSize,imagePosition,imageSize);
  List positions=layout.getImagePositions(AreaConstants.NO_REPEAT);
  assertEquals(1,positions.size());
  assertEquals(imagePosition,positions.iterator().next());
  positions=layout.getImagePositions(AreaConstants.REPEAT_X);
  assertEquals(1,positions.size());
  assertEquals(imagePosition,positions.iterator().next());
  positions=layout.getImagePositions(AreaConstants.REPEAT_Y);
  assertEquals(1,positions.size());
  assertEquals(imagePosition,positions.iterator().next());
  positions=layout.getImagePositions(AreaConstants.REPEAT);
  assertEquals(1,positions.size());
  assertEquals(imagePosition,positions.iterator().next());
}
Program: 69980
Project: 69980
Buggy source:
private static boolean isRepeatX(int repeat){
  return (repeat & REPEAT_X) != 0;
}

Fixed version (ground truth):
private static boolean isRepeatX(int repeat){
  return repeat == AreaConstants.REPEAT || repeat == AreaConstants.REPEAT_X;
}
Program: 69981
Project: 69981
Buggy source:
public List<Position> getImagePositions(String repeat){
  int repeatMode=REPEAT_BOTH;
  if (!("String_Node_Str".equals(repeat))) {
    if ("String_Node_Str".equals(repeat)) {
      repeatMode=REPEAT_X;
    }
 else     if ("String_Node_Str".equals(repeat)) {
      repeatMode=REPEAT_Y;
    }
 else     if ("String_Node_Str".equals(repeat)) {
      repeatMode=REPEAT_NONE;
    }
  }
  return getImagePositions(repeatMode);
}

Fixed version (ground truth):
public List<Position> getImagePositions(String repeat){
  int repeatMode=AreaConstants.REPEAT;
  if (!("String_Node_Str".equals(repeat))) {
    if ("String_Node_Str".equals(repeat)) {
      repeatMode=AreaConstants.REPEAT_X;
    }
 else     if ("String_Node_Str".equals(repeat)) {
      repeatMode=AreaConstants.REPEAT_Y;
    }
 else     if ("String_Node_Str".equals(repeat)) {
      repeatMode=AreaConstants.NO_REPEAT;
    }
  }
  return getImagePositions(repeatMode);
}
Program: 69982
Project: 69982
Buggy source:
private static boolean isRepeatY(int repeat){
  return (repeat & REPEAT_Y) != 0;
}

Fixed version (ground truth):
private static boolean isRepeatY(int repeat){
  return repeat == AreaConstants.REPEAT || repeat == AreaConstants.REPEAT_Y;
}
Program: 69983
Project: 69983
Buggy source:
private String applyFont(String fontName,int fontStyle,float fontSize,String text){
  if (isIntrinsicFont(fontName)) {
    return applyIntrinsicFont(fontName,fontStyle,fontSize,text);
  }
 else {
    try {
      String fontPath=getFontPath(fontName);
      if (fontPath == null) {
        return applyIntrinsicFont(fontName,fontStyle,fontSize,text);
      }
      ITrueTypeWriter trueTypeWriter=getTrueTypeFontWriter(fontPath);
      String displayName=fontName.replace(' ','_');
      trueTypeWriter.useDisplayName(displayName);
      trueTypeWriter.ensureGlyphsAvailable(text);
      setFont(displayName,fontSize);
      return toHexString(text);
    }
 catch (    Exception e) {
      log.log(Level.WARNING,"String_Node_Str" + fontName);
    }
    return null;
  }
}

Fixed version (ground truth):
private String applyFont(String fontName,int fontStyle,float fontSize,String text){
  if (isIntrinsicFont(fontName)) {
    return applyIntrinsicFont(fontName,fontStyle,fontSize,text);
  }
 else {
    try {
      String fontPath=getFontPath(fontName);
      if (fontPath == null) {
        return applyIntrinsicFont(fontName,fontStyle,fontSize,text);
      }
      ITrueTypeWriter trueTypeWriter=getTrueTypeFontWriter(fontPath);
      String displayName=fontName.replace(' ','_');
      trueTypeWriter.useDisplayName(displayName);
      trueTypeWriter.ensureGlyphsAvailable(text);
      setFont(displayName,fontSize);
      return trueTypeWriter.toHexString(text);
    }
 catch (    Exception e) {
      log.log(Level.WARNING,"String_Node_Str" + fontName);
    }
    return null;
  }
}
Program: 69984
Project: 69984
Buggy source:
protected void drawBackgroundImage(float x,float y,float width,float height,float imageWidth,float imageHeight,int repeat,String imageUrl,float absPosX,float absPosY) throws IOException {
  writer.drawBackgroundImage(imageUrl,x,y,width,height,imageWidth,imageHeight,absPosX,absPosY,repeat);
}

Fixed version (ground truth):
protected void drawBackgroundImage(float x,float y,float width,float height,int repeat,String imageUrl,float absPosX,float absPosY) throws IOException {
}
Program: 69985
Project: 69985
Buggy source:
void setDataCube(String cubeName){
  try {
    if (itemHandle.getDataBindingType() == ReportItemHandle.DATABINDING_TYPE_REPORT_ITEM_REF) {
      itemHandle.setDataBindingReference(null);
    }
    itemHandle.setDataSet(null);
    if (cubeName == null) {
      itemHandle.setCube(null);
      clearBindings();
    }
 else {
      if (!cubeName.equals(getDataCube())) {
        CubeHandle cubeHandle=getReportDesignHandle().findCube(cubeName);
        itemHandle.setCube(cubeHandle);
        clearBindings();
        generateBindings(generateComputedColumns(cubeHandle));
      }
    }
  }
 catch (  SemanticException e) {
    WizardBase.showException(e.getLocalizedMessage());
  }
}

Fixed version (ground truth):
void setDataCube(String cubeName){
  try {
    if (itemHandle.getDataBindingType() == ReportItemHandle.DATABINDING_TYPE_REPORT_ITEM_REF) {
      itemHandle.setDataBindingReference(null);
    }
    itemHandle.setDataSet(null);
    if (cubeName == null) {
      itemHandle.setCube(null);
      clearBindings();
    }
 else {
      if (!cubeName.equals(getDataCube())) {
        CubeHandle cubeHandle=getReportDesignHandle().findCube(cubeName);
        itemHandle.setCube(cubeHandle);
        clearBindings();
        generateBindings(generateComputedColumns(cubeHandle));
      }
    }
    ChartWizard.removeException(ChartWizard.RepDSProvider_Cube_ID);
  }
 catch (  SemanticException e) {
    ChartWizard.showException(ChartWizard.RepDSProvider_Cube_ID,e.getLocalizedMessage());
  }
}
Program: 69986
Project: 69986
Buggy source:
void setReportItemReference(String referenceName){
  try {
    if (referenceName == null) {
      itemHandle.setDataBindingReference(null);
    }
 else {
      itemHandle.setDataSet(null);
      itemHandle.setCube(null);
      if (!referenceName.equals(getReportItemReference())) {
        itemHandle.setDataBindingReference((ReportItemHandle)getReportDesignHandle().findElement(referenceName));
      }
    }
  }
 catch (  SemanticException e) {
    WizardBase.showException(e.getLocalizedMessage());
  }
}

Fixed version (ground truth):
void setReportItemReference(String referenceName){
  try {
    if (referenceName == null) {
      itemHandle.setDataBindingReference(null);
    }
 else {
      itemHandle.setDataSet(null);
      itemHandle.setCube(null);
      if (!referenceName.equals(getReportItemReference())) {
        itemHandle.setDataBindingReference((ReportItemHandle)getReportDesignHandle().findElement(referenceName));
      }
    }
    ChartWizard.removeException(ChartWizard.RepDSProvider_Ref_ID);
  }
 catch (  SemanticException e) {
    ChartWizard.showException(ChartWizard.RepDSProvider_Ref_ID,e.getLocalizedMessage());
  }
}