nus-yam/ex-repair huggingface dataset:
Program: 67677
Project: 67677
Buggy source:
private static Logger createFileLogger(String dirName,String fileName){
  try {
    if (dirName != null) {
      File directory=new File(dirName);
      if (!directory.exists()) {
        if (!directory.mkdirs())         throw new IOException("String_Node_Str" + dirName + "String_Node_Str");
      }
 else {
        if (directory.isFile())         throw new IOException("String_Node_Str" + dirName + "String_Node_Str");
      }
    }
    Handler logFileHandler=new FileHandler(generateUniqueLogFileName(dirName,fileName),true);
    logFileHandler.setFormatter(new SimpleFormatter());
    logFileHandler.setLevel(Level.FINEST);
    Logger logger=Logger.getAnonymousLogger();
    logger.addHandler(logFileHandler);
    return logger;
  }
 catch (  SecurityException e) {
    logger.log(Level.WARNING,e.getMessage(),e);
  }
catch (  IOException e) {
    logger.log(Level.WARNING,e.getMessage(),e);
  }
  return null;
}

Fixed version (ground truth):
private static Logger createFileLogger(String dirName,String fileName,int rollingSize,int logMaxBackupIndex){
  try {
    if (dirName != null) {
      File directory=new File(dirName);
      if (!directory.exists()) {
        if (!directory.mkdirs())         throw new IOException("String_Node_Str" + dirName + "String_Node_Str");
      }
 else {
        if (directory.isFile())         throw new IOException("String_Node_Str" + dirName + "String_Node_Str");
      }
    }
    String logFileName=generateUniqueLogFileName(dirName,fileName);
    Handler logFileHandler=null;
    if (rollingSize <= 0) {
      logFileHandler=new FileHandler(logFileName,true);
    }
 else {
      logFileHandler=new FileHandler(logFileName,rollingSize,logMaxBackupIndex,true);
    }
    logFileHandler.setFormatter(new SimpleFormatter());
    logFileHandler.setLevel(Level.FINEST);
    Logger logger=Logger.getAnonymousLogger();
    logger.addHandler(logFileHandler);
    return logger;
  }
 catch (  SecurityException e) {
    logger.log(Level.WARNING,e.getMessage(),e);
  }
catch (  IOException e) {
    logger.log(Level.WARNING,e.getMessage(),e);
  }
  return null;
}
Program: 67678
Project: 67678
Buggy source:
/** 
 * Change the log level to the newLevel
 * @param newLevel -new log level
 */
public static void changeLogLevel(Level newLevel){
  if (newLevel != null) {
    if (userLogger != null) {
      if (newLevel != Level.OFF && fileLogger == null && (dirName != null || fileName != null)) {
        fileLogger=createFileLogger(dirName,fileName);
        if (fileLogger != null) {
          sharedHandler.setSharedLogger(fileLogger);
        }
      }
    }
    Logger rootLogger=Logger.getLogger(BIRT_NAME_SPACE);
    rootLogger.setLevel(newLevel);
  }
}

Fixed version (ground truth):
/** 
 * Change the log level to the newLevel
 * @param newLevel -new log level
 */
public static void changeLogLevel(Level newLevel){
  if (newLevel != null) {
    if (userLogger != null) {
      if (newLevel != Level.OFF && fileLogger == null && (dirName != null || fileName != null)) {
        fileLogger=createFileLogger(dirName,fileName,logRollingSize,logMaxBackupIndex);
        if (fileLogger != null) {
          sharedHandler.setSharedLogger(fileLogger);
        }
      }
    }
    Logger rootLogger=Logger.getLogger(BIRT_NAME_SPACE);
    rootLogger.setLevel(newLevel);
  }
}
Program: 67679
Project: 67679
Buggy source:
/** 
 * set up engine logging
 */
private void intializeLogger(){
  Logger logger=null;
  String dest=null;
  String file=null;
  Level level=Level.WARNING;
  if (config != null) {
    logger=config.getLogger();
    dest=config.getLogDirectory();
    file=config.getLogFile();
    level=config.getLogLevel();
    if (level == null) {
      level=Level.WARNING;
    }
  }
  EngineLogger.startEngineLogging(logger,dest,file,level);
}

Fixed version (ground truth):
/** 
 * set up engine logging
 */
private void intializeLogger(){
  Logger logger=null;
  String dest=null;
  String file=null;
  Level level=Level.WARNING;
  int rollingSize=0;
  int maxBackupIndex=1;
  if (config != null) {
    logger=config.getLogger();
    dest=config.getLogDirectory();
    file=config.getLogFile();
    level=config.getLogLevel();
    if (level == null) {
      level=Level.WARNING;
    }
    rollingSize=config.getLogRollingSize();
    maxBackupIndex=config.getLogMaxBackupIndex();
  }
  EngineLogger.startEngineLogging(logger,dest,file,level,rollingSize,maxBackupIndex);
}
Program: 67680
Project: 67680
Buggy source:
public void setLogger(Logger logger){
  if (logger != null) {
    EngineLogger.startEngineLogging(logger,null,null,null);
  }
}

Fixed version (ground truth):
public void setLogger(Logger logger){
  if (logger != null) {
    EngineLogger.startEngineLogging(logger,null,null,null,0,1);
  }
}
Program: 67685
Project: 67685
Buggy source:
public void run(IAction action){
  ModuleHandle handle=SessionHandleAdapter.getInstance().getReportDesignHandle();
  if (handle != null) {
    String fileName=handle.getFileName();
    ILaunchConfiguration config=ScriptLaunchShortcut.findLaunchConfiguration(fileName,ScriptLaunchShortcut.getConfigurationType());
    if (config != null) {
      DebugUITools.launch(config,"String_Node_Str");
    }
  }
}

Fixed version (ground truth):
public void run(IAction action){
  ModuleHandle handle=null;
  if (handle == null) {
    FormEditor editor=UIUtil.getActiveReportEditor(false);
    if (editor instanceof MultiPageReportEditor) {
      handle=((MultiPageReportEditor)editor).getModel();
    }
  }
  if (handle != null) {
    String fileName=handle.getFileName();
    ILaunchConfiguration config=ScriptLaunchShortcut.findLaunchConfiguration(fileName,ScriptLaunchShortcut.getConfigurationType());
    if (config != null) {
      DebugUITools.launch(config,"String_Node_Str");
    }
  }
}
Program: 67686
Project: 67686
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 (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);
}

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=null;
  if (model == null) {
    if (editor instanceof MultiPageReportEditor) {
      model=((MultiPageReportEditor)editor).getModel();
    }
  }
  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: 67687
Project: 67687
Buggy source:
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);
}

Fixed version (ground truth):
protected void preview(String format,boolean allowPage){
  if (!prePreview()) {
    return;
  }
  FormEditor editor=UIUtil.getActiveReportEditor(false);
  ModuleHandle model=null;
  if (model == null) {
    if (editor instanceof MultiPageReportEditor) {
      model=((MultiPageReportEditor)editor).getModel();
    }
  }
  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: 67688
Project: 67688
Buggy source:
protected void preview(String format,boolean allowPage){
  if (!prePreview()) {
    return;
  }
  FormEditor editor=UIUtil.getActiveReportEditor(false);
  ModuleHandle model=SessionHandleAdapter.getInstance().getReportDesignHandle();
  if (!UIUtil.canPreviewWithErrors(model))   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);
}

Fixed version (ground truth):
protected void preview(String format,boolean allowPage){
  if (!prePreview()) {
    return;
  }
  FormEditor editor=UIUtil.getActiveReportEditor(false);
  ModuleHandle model=null;
  if (model == null) {
    if (editor instanceof MultiPageReportEditor) {
      model=((MultiPageReportEditor)editor).getModel();
    }
  }
  if (!UIUtil.canPreviewWithErrors(model))   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: 67689
Project: 67689
Buggy source:
/** 
 * Constructs a new instance of the dialog
 */
public ImportValueDialog(String style,java.util.List choices){
}

Fixed version (ground truth):
/** 
 * Constructs a new instance of the dialog
 */
public ImportValueDialog(String style,java.util.List<String> choices){
}
Program: 67690
Project: 67690
Buggy source:
protected boolean initDialog(){
  try {
    engine=DataEngine.newDataEngine(DataEngineContext.newInstance(DataEngineContext.DIRECT_PRESENTATION,null,null,null));
  }
 catch (  BirtException e) {
    ExceptionHandler.handle(e);
    return false;
  }
  dataSetChooser.setItems(ChoiceSetFactory.getDataSets());
  dataSetChooser.select(0);
  currentDataSetName=dataSetChooser.getText();
  selectedList.removeAll();
  for (Iterator iter=choiceList.iterator(); iter.hasNext(); ) {
    String value=(String)iter.next();
    if (value != null) {
      selectedList.add(value);
    }
 else {
      hasNullValue=true;
      selectedList.add(nullValue);
    }
  }
  refreshColumns();
  return true;
}

Fixed version (ground truth):
protected boolean initDialog(){
  try {
    engine=DataEngine.newDataEngine(DataEngineContext.newInstance(DataEngineContext.DIRECT_PRESENTATION,null,null,null));
  }
 catch (  BirtException e) {
    ExceptionHandler.handle(e);
    return false;
  }
  dataSetChooser.setItems(ChoiceSetFactory.getDataSets());
  dataSetChooser.select(0);
  currentDataSetName=dataSetChooser.getText();
  selectedList.removeAll();
  for (Iterator<String> iter=choiceList.iterator(); iter.hasNext(); ) {
    String value=iter.next();
    if (value != null) {
      selectedList.add(value);
    }
 else {
      hasNullValue=true;
      selectedList.add(nullValue);
    }
  }
  refreshColumns();
  return true;
}
Program: 67692
Project: 67692
Buggy source:
public RowState(Element element,Map<Element,StyleProperties> cssStyles,IContent parent,ActionContent action){
  super(element,cssStyles,action);
  content=(RowContent)parent.getReportContent().createRowContent();
  setParent(parent);
  HTML2Content.handleStyle(element,cssStyles,content);
  content.setHeight(PropertyUtil.getDimensionAttribute(element,"String_Node_Str"));
}

Fixed version (ground truth):
public RowState(Element element,Map<Element,StyleProperties> cssStyles,IContent parent,ActionContent action){
  super(element,cssStyles,action);
  content=(RowContent)parent.getReportContent().createRowContent();
  setParent(parent);
  content.setHeight(PropertyUtil.getDimensionAttribute(element,"String_Node_Str"));
  HTML2Content.handleStyle(element,cssStyles,content);
}
Program: 67693
Project: 67693
Buggy source:
public Image getNodeIcon(Object model){
  if (model instanceof DesignElementHandle && ((DesignElementHandle)model).getSemanticErrors().size() > 0) {
    return ReportPlatformUIImages.getImage(ISharedImages.IMG_OBJS_ERROR_TSK);
  }
  if (OlapUtil.isFromLibrary(model))   return UIHelper.getImage(BuilderConstants.IMAGE_LINK_CUBE);
 else   return UIHelper.getImage(BuilderConstants.IMAGE_CUBE);
}

Fixed version (ground truth):
public Image getNodeIcon(Object model){
  if (model instanceof DesignElementHandle && ((DesignElementHandle)model).getSemanticErrors().size() > 0) {
    return ReportPlatformUIImages.getImage(ISharedImages.IMG_OBJS_ERROR_TSK);
  }
  return decorateImage(UIHelper.getImage(BuilderConstants.IMAGE_CUBE),model);
}
Program: 67694
Project: 67694
Buggy source:
public String getIconName(Object model){
  if (!DEUtil.isLinkedElement((DesignElementHandle)model)) {
    return IReportGraphicConstants.ICON_ELEMENT_PARAMETER_GROUP;
  }
 else {
    return IReportGraphicConstants.ICON_CASCADING_PARAMETER_GROUP_ELEMENT_LINK;
  }
}

Fixed version (ground truth):
public String getIconName(Object model){
  return IReportGraphicConstants.ICON_ELEMENT_PARAMETER_GROUP;
}
Program: 67695
Project: 67695
Buggy source:
public String getIconName(Object model){
  assert(model instanceof EmbeddedImageHandle);
  EmbeddedImageHandle image=(EmbeddedImageHandle)model;
  if (image.isLibReference()) {
    return IReportGraphicConstants.ICON_ELEMENT_IMAGE_LINK;
  }
 else {
    return IReportGraphicConstants.ICON_ELEMENT_IMAGE;
  }
}

Fixed version (ground truth):
public String getIconName(Object model){
  assert(model instanceof EmbeddedImageHandle);
  EmbeddedImageHandle image=(EmbeddedImageHandle)model;
  return IReportGraphicConstants.ICON_ELEMENT_IMAGE;
}
Program: 67696
Project: 67696
Buggy source:
public void paintControl(PaintEvent e){
  drawItem(e.gc,context.getPatternImage(),0,0);
}

Fixed version (ground truth):
public void paintControl(PaintEvent e){
  drawItem(e.gc,context.getPatternImage(),0,0);
  if (view.isFocusControl()) {
    GC gc=e.gc;
    Color cOld=gc.getForeground();
    int lineStyleOld=gc.getLineStyle();
    gc.setLineStyle(SWT.LINE_DOT);
    gc.setForeground(gc.getDevice().getSystemColor(SWT.COLOR_BLACK));
    gc.drawRectangle(1,1,VIEW_WIDTH - 2,VIEW_HEIGHT - 2);
    gc.setForeground(gc.getDevice().getSystemColor(SWT.COLOR_WHITE));
    gc.drawRectangle(2,2,VIEW_WIDTH - 4,VIEW_HEIGHT - 4);
    gc.setForeground(cOld);
    gc.setLineStyle(lineStyleOld);
  }
}
Program: 67697
Project: 67697
Buggy source:
public void handleEvent(Event event){
switch (event.type) {
case SWT.MouseDown:
case SWT.Selection:
    event.type=DropDownControl.ToggleDropDown;
  event.widget=this;
notifyListeners(DropDownControl.ToggleDropDown,event);
break;
}
}

Fixed version (ground truth):
public void handleEvent(Event event){
switch (event.type) {
case SWT.MouseDown:
case SWT.Selection:
    doToggleDropDown();
  break;
case SWT.KeyDown:
processKeyDown(event.keyCode);
break;
case SWT.Traverse:
if (event.detail == SWT.TRAVERSE_TAB_NEXT || event.detail == SWT.TRAVERSE_TAB_PREVIOUS) {
event.doit=true;
}
break;
case SWT.FocusIn:
view.redraw();
break;
case SWT.FocusOut:
view.redraw();
break;
}
}
Program: 67698
Project: 67698
Buggy source:
public ItemFrame(Composite parent,Context context){
  super(parent,SWT.BORDER);
  this.context=context;
  GridLayout gl=createGridLayout();
  gl.marginTop=MARGIN;
  gl.marginBottom=MARGIN;
  gl.marginLeft=MARGIN;
  gl.marginRight=MARGIN;
  setLayout(gl);
  view=new Composite(this,SWT.DOUBLE_BUFFERED);
  view.setLayoutData(new GridData(VIEW_WIDTH,VIEW_HEIGHT));
  view.addPaintListener(this);
  view.addListener(SWT.MouseDown,this);
  btnDropDown=new Button(this,SWT.ARROW | SWT.DOWN);
  btnDropDown.setLayoutData(new GridData(BUTTON_WIDTH,VIEW_HEIGHT));
  btnDropDown.addListener(SWT.Selection,this);
}

Fixed version (ground truth):
public ItemFrame(Composite parent,Context context){
  super(parent,SWT.BORDER);
  this.context=context;
  GridLayout gl=createGridLayout();
  gl.marginTop=MARGIN;
  gl.marginBottom=MARGIN;
  gl.marginLeft=MARGIN;
  gl.marginRight=MARGIN;
  setLayout(gl);
  view=new Composite(this,SWT.NO_BACKGROUND);
  view.setLayoutData(new GridData(VIEW_WIDTH,VIEW_HEIGHT));
  view.addPaintListener(this);
  view.addListener(SWT.MouseDown,this);
  view.addListener(SWT.KeyDown,this);
  view.addListener(SWT.Traverse,this);
  view.addListener(SWT.FocusIn,this);
  view.addListener(SWT.FocusOut,this);
  btnDropDown=new Button(this,SWT.ARROW | SWT.DOWN);
  btnDropDown.setLayoutData(new GridData(BUTTON_WIDTH,VIEW_HEIGHT));
  btnDropDown.addListener(SWT.Selection,this);
}
Program: 67699
Project: 67699
Buggy source:
@Override protected Control createContents(Composite parent){
  ChartUIUtil.bindHelp(parent,ChartHelpContextIds.DIALOG_COLOR_PATTERN_FILL);
  getShell().setText(Messages.getString("String_Node_Str"));
  return super.createContents(parent);
}

Fixed version (ground truth):
@Override protected Control createContents(Composite parent){
  ChartUIUtil.bindHelp(parent,ChartHelpContextIds.DIALOG_COLOR_PATTERN_FILL);
  getShell().setText(Messages.getString("String_Node_Str"));
  Control control=super.createContents(parent);
  getShell().setDefaultButton(null);
  return control;
}
Program: 67700
Project: 67700
Buggy source:
@Override protected Composite createDropDown(Composite parent){
  Composite composite=new Composite(parent,SWT.BORDER | SWT.DOUBLE_BUFFERED);
  GridData gd=new GridData();
  gd.widthHint=CELL_WIDTH * 8 + MARGIN;
  gd.heightHint=CELL_HEIGHT * 8 + MARGIN;
  composite.setLayoutData(gd);
  composite.addListener(SWT.MouseDown,this);
  composite.addListener(SWT.FocusOut,this);
  composite.addListener(SWT.KeyDown,this);
  composite.addPaintListener(this);
  return composite;
}

Fixed version (ground truth):
@Override protected Composite createDropDown(Composite parent){
  Composite composite=new Composite(parent,SWT.BORDER | SWT.DOUBLE_BUFFERED);
  GridData gd=new GridData();
  gd.widthHint=CELL_WIDTH * 8 + MARGIN;
  gd.heightHint=CELL_HEIGHT * 8 + MARGIN;
  composite.setLayoutData(gd);
  composite.addListener(SWT.MouseDown,this);
  composite.addListener(SWT.FocusOut,this);
  composite.addListener(SWT.FocusIn,this);
  composite.addListener(SWT.KeyDown,this);
  composite.addListener(SWT.Traverse,this);
  composite.addPaintListener(this);
  return composite;
}
Program: 67701
Project: 67701
Buggy source:
private void onDropDonwFocusOut(){
  Control currentControl=Display.getCurrent().getCursorControl();
  while (currentControl != null) {
    if (currentControl == host) {
      return;
    }
    currentControl=currentControl.getParent();
  }
  dropDown.getShell().close();
}

Fixed version (ground truth):
public void onDropDonwFocusOut(){
  Control currentControl=Display.getCurrent().getCursorControl();
  while (currentControl != null) {
    if (currentControl == host) {
      return;
    }
    currentControl=currentControl.getParent();
  }
  dropDown.getShell().close();
}
Program: 67702
Project: 67702
Buggy source:
public boolean getMoreResults() throws OdaException {
  try {
    if (!this.isExecuted)     this.execute();
    if (this.outputParameterResultSetsMap.size() > 0) {
      this.resultIndex++;
      if (this.resultIndex >= this.outputParameterResultSetsMap.size())       return false;
      return true;
    }
    return callStat.getMoreResults();
  }
 catch (  SQLException e) {
    throw new JDBCException(ResourceConstants.RESULTSET_CANNOT_GET,e);
  }
}

Fixed version (ground truth):
public boolean getMoreResults() throws OdaException {
  try {
    if (!this.isExecuted)     this.execute();
    if (this.outputParameterResultSetsMap.size() > 0) {
      this.resultIndex++;
      if (this.resultIndex >= this.outputParameterResultSetsMap.size())       return false;
      return true;
    }
    boolean flag=callStat.getMoreResults();
    if (flag)     this.rs=this.callStat.getResultSet();
    return flag;
  }
 catch (  SQLException e) {
    throw new JDBCException(ResourceConstants.RESULTSET_CANNOT_GET,e);
  }
}
Program: 67703
Project: 67703
Buggy source:
public int getInt(int parameterId) throws OdaException {
  assertNotNull(callStat);
  try {
    return callStat.getInt(parameterId);
  }
 catch (  SQLException e) {
    throw new JDBCException(ResourceConstants.RESULTSET_CANNOT_GET_INT_VALUE,e);
  }
}

Fixed version (ground truth):
public int getInt(int parameterId) throws OdaException {
  assertNotNull(callStat);
  try {
    return callStat.getInt(parameterId);
  }
 catch (  SQLException e) {
    try {
      return retryToGetParameterValue(parameterId);
    }
 catch (    OdaException e1) {
      throw new JDBCException(ResourceConstants.RESULTSET_CANNOT_GET_INT_VALUE,e);
    }
catch (    SQLException e2) {
      throw new JDBCException(ResourceConstants.RESULTSET_CANNOT_GET_INT_VALUE,e);
    }
  }
}
Program: 67705
Project: 67705
Buggy source:
public DataType getDataType(String expression){
  return DataType.NUMERIC_LITERAL;
}

Fixed version (ground truth):
public DataType getDataType(String expression){
  return null;
}
Program: 67706
Project: 67706
Buggy source:
public Object invoke(Command command,Object... inData) throws ChartException {
  Object outData=null;
switch (command) {
case EXPRESS_BUTTON_CREATE:
    final Control control=(Control)inData[1];
  new Label((Composite)inData[0],SWT.NONE);
IExpressionButton ceb=new IExpressionButton(){
  public void setExpression(  String expr){
    ChartUIUtil.setText(control,expr);
  }
  public void setEnabled(  boolean bEnabled){
    control.setEnabled(bEnabled);
  }
  public boolean isEnabled(){
    return control.isEnabled();
  }
  public String getExpression(){
    return ChartUIUtil.getText(control);
  }
  public String getDisplayExpression(){
    return getExpression();
  }
  public void addListener(  Listener listener){
  }
  public void setAccessor(  EAttributeAccessor<String> accessor){
  }
  public String getExpressionType(){
    return null;
  }
  public boolean isCube(){
    return false;
  }
  public void setBindingName(  String bindingName,  boolean bNotifyEvents){
  }
  public void setExpression(  String expr,  boolean bNotifyEvents){
  }
  public void setAssitField(  IAssistField assistField){
  }
  public void setPredefinedQuery(  Object[] predefinedQuery){
  }
}
;
outData=ceb;
break;
}
return outData;
}

Fixed version (ground truth):
public Object invoke(Command command,Object... inData) throws ChartException {
  Object outData=null;
switch (command) {
case EXPRESS_BUTTON_CREATE:
    final Control control=(Control)inData[1];
  new Label((Composite)inData[0],SWT.NONE);
IExpressionButton ceb=new IExpressionButton(){
  public void setExpression(  String expr){
    if (expr != null) {
      ChartUIUtil.setText(control,expr);
    }
  }
  public void setEnabled(  boolean bEnabled){
    control.setEnabled(bEnabled);
  }
  public boolean isEnabled(){
    return control.isEnabled();
  }
  public String getExpression(){
    return ChartUIUtil.getText(control);
  }
  public String getDisplayExpression(){
    return getExpression();
  }
  public void addListener(  Listener listener){
  }
  public void setAccessor(  EAttributeAccessor<String> accessor){
  }
  public String getExpressionType(){
    return null;
  }
  public boolean isCube(){
    return false;
  }
  public void setBindingName(  String bindingName,  boolean bNotifyEvents){
  }
  public void setExpression(  String expr,  boolean bNotifyEvents){
  }
  public void setAssitField(  IAssistField assistField){
  }
  public void setPredefinedQuery(  Object[] predefinedQuery){
  }
}
;
outData=ceb;
break;
}
return outData;
}
Program: 67708
Project: 67708
Buggy source:
/** 
 * @param pageContainer
 * @param left
 * @param right
 */
private void setWidthHints(SashForm pageContainer,Control left,Control right){
  int leftWidth=left.computeSize(SWT.DEFAULT,SWT.DEFAULT).x;
  int totalWidth=pageContainer.computeSize(SWT.DEFAULT,SWT.DEFAULT).x;
  if ((double)leftWidth / (double)totalWidth > 0.4) {
    totalWidth=leftWidth / 40 * 100;
    pageContainer.setWeights(new int[]{leftWidth - 3,totalWidth * 6 / 10});
  }
 else {
    pageContainer.setWeights(new int[]{leftWidth,totalWidth - leftWidth});
  }
}

Fixed version (ground truth):
/** 
 * @param pageContainer
 * @param left
 * @param right
 */
private void setWidthHints(SashForm pageContainer,Control left,Control right){
  int leftWidth=left.computeSize(SWT.DEFAULT,SWT.DEFAULT).x;
  int rightWidth=right.computeSize(SWT.DEFAULT,SWT.DEFAULT).x;
  pageContainer.setWeights(new int[]{leftWidth,rightWidth});
}
Program: 67709
Project: 67709
Buggy source:
/** 
 */
public SQLKeywordScanner(){
  super();
  IToken sqlKeywordsToken=new Token(new TextAttribute(ColorManager.getColor(127,0,85),null,SWT.BOLD));
  ArrayList rules=new ArrayList();
  rules.add(new SQLKeywordRule(sqlKeywordsToken,reservedwords));
  rules.add(new SQLKeywordRule(sqlKeywordsToken,types));
  rules.add(new SQLKeywordRule(sqlKeywordsToken,constants));
  rules.add(new SQLKeywordRule(sqlKeywordsToken,functions));
  rules.add(new SQLKeywordRule(sqlKeywordsToken,predicates));
  rules.add(new WhitespaceRule(new IWhitespaceDetector(){
    public boolean isWhitespace(    char c){
      return Character.isWhitespace(c);
    }
  }
));
  setRules((IRule[])rules.toArray(new IRule[rules.size()]));
  this.setDefaultReturnToken(new Token(new TextAttribute(ColorManager.getColor(0,0,0))));
}

Fixed version (ground truth):
/** 
 */
public SQLKeywordScanner(){
  super();
  IToken sqlKeywordsToken=new Token(new TextAttribute(ColorManager.getColor(127,0,85),null,SWT.BOLD));
  ArrayList rules=new ArrayList();
  rules.add(new SQLKeywordRule(sqlKeywordsToken,reservedwords));
  rules.add(new SQLKeywordRule(sqlKeywordsToken,types));
  rules.add(new SQLKeywordRule(sqlKeywordsToken,constants));
  rules.add(new SQLKeywordRule(sqlKeywordsToken,functions));
  rules.add(new SQLKeywordRule(sqlKeywordsToken,predicates));
  rules.add(new WhitespaceRule(new IWhitespaceDetector(){
    public boolean isWhitespace(    char c){
      return Character.isWhitespace(c);
    }
  }
));
  setRules((IRule[])rules.toArray(new IRule[rules.size()]));
  this.setDefaultReturnToken(new Token(new TextAttribute(Display.getDefault().getSystemColor(SWT.COLOR_LIST_FOREGROUND))));
}
Program: 67710
Project: 67710
Buggy source:
/** 
 * Create different dataset provider for common and sharing case.
 * @return
 * @since 2.3
 */
protected AggregateOnBindingsFormHandleProvider createDataSetFormProvider(){
  if (input == null) {
    return new AggregateOnBindingsFormHandleProvider();
  }
  final ReportItemHandle rih;
  if (input instanceof List) {
    rih=(ExtendedItemHandle)((List)input).get(0);
  }
 else {
    rih=(ExtendedItemHandle)input;
  }
  if (ChartReportItemUtil.isChildOfMultiViewsHandle(rih)) {
    return new ChartShareBindingsFormHandlerProvider();
  }
  return new AggregateOnBindingsFormHandleProvider(){
    @Override public boolean isEditable(){
      return !ChartItemUtil.isChartInheritGroups(rih);
    }
  }
;
}

Fixed version (ground truth):
/** 
 * Create different dataset provider for common and sharing case.
 * @return
 * @since 2.3
 */
protected AggregateOnBindingsFormHandleProvider createDataSetFormProvider(){
  if (input == null) {
    return new AggregateOnBindingsFormHandleProvider();
  }
  final ReportItemHandle rih;
  if (input instanceof List) {
    rih=(ExtendedItemHandle)((List)input).get(0);
  }
 else {
    rih=(ExtendedItemHandle)input;
  }
  if (ChartReportItemUtil.isChildOfMultiViewsHandle(rih)) {
    return new ChartShareBindingsFormHandlerProvider();
  }
  return new AggregateOnBindingsFormHandleProvider(){
    @Override public boolean isEditable(){
      return !ChartItemUtil.isChartInheritGroups(rih) && !ChartCubeUtil.isAxisChart(rih) && !ChartCubeUtil.isPlotChart(rih);
    }
  }
;
}
Program: 67711
Project: 67711
Buggy source:
@Override public boolean isEditable(){
  return !ChartItemUtil.isChartInheritGroups(rih);
}

Fixed version (ground truth):
@Override public boolean isEditable(){
  return !ChartItemUtil.isChartInheritGroups(rih) && !ChartCubeUtil.isAxisChart(rih) && !ChartCubeUtil.isPlotChart(rih);
}
Program: 67712
Project: 67712
Buggy source:
public Object load(){
  ReportItemHandle element=getReportItemHandle();
  int type=element.getDataBindingType();
  List referenceList=getAvailableDataBindingReferenceList(element);
  String[] references=new String[referenceList.size() + 1];
  references[0]=NONE;
  for (int i=0; i < referenceList.size(); i++) {
    references[i + 1]=((ReportItemHandle)referenceList.get(i)).getQualifiedName();
  }
  setReferences(references);
  Object value;
switch (type) {
case ReportItemHandle.DATABINDING_TYPE_DATA:
    DataSetHandle dataset=element.getDataSet();
  CubeHandle cube=element.getCube();
if (dataset == null && cube == null) value=NONE;
 else if (dataset != null) value=dataset.getQualifiedName();
 else value=cube.getName();
break;
case ReportItemHandle.DATABINDING_TYPE_REPORT_ITEM_REF:
ReportItemHandle reference=element.getDataBindingReference();
if (reference == null) value=NONE;
 else value=reference.getQualifiedName();
break;
default :
value=NONE;
}
BindingInfo info=new BindingInfo(type,value);
if (ChartReportItemUtil.isChildOfMultiViewsHandle(getReportItemHandle())) {
Object name=element.getContainer().getContainer().getQualifiedName();
info.setBindingType(ReportItemHandle.DATABINDING_TYPE_REPORT_ITEM_REF);
name=(name == null) ? NONE : name;
info.setBindingValue(name);
info.setReadOnly(true);
}
return info;
}

Fixed version (ground truth):
public Object load(){
  ReportItemHandle element=getReportItemHandle();
  int type=element.getDataBindingType();
  List referenceList=getAvailableDataBindingReferenceList(element);
  String[] references=new String[referenceList.size() + 1];
  references[0]=NONE;
  for (int i=0; i < referenceList.size(); i++) {
    references[i + 1]=((ReportItemHandle)referenceList.get(i)).getQualifiedName();
  }
  setReferences(references);
  Object value;
switch (type) {
case ReportItemHandle.DATABINDING_TYPE_DATA:
    DataSetHandle dataset=element.getDataSet();
  CubeHandle cube=element.getCube();
if (dataset == null && cube == null) value=NONE;
 else if (dataset != null) value=dataset.getQualifiedName();
 else value=cube.getName();
break;
case ReportItemHandle.DATABINDING_TYPE_REPORT_ITEM_REF:
ReportItemHandle reference=element.getDataBindingReference();
if (reference == null) value=NONE;
 else value=reference.getQualifiedName();
break;
default :
value=NONE;
}
BindingInfo info=new BindingInfo(type,value);
if (ChartReportItemUtil.isChildOfMultiViewsHandle(getReportItemHandle())) {
Object name=element.getContainer().getContainer().getQualifiedName();
info.setBindingType(ReportItemHandle.DATABINDING_TYPE_REPORT_ITEM_REF);
name=(name == null) ? NONE : name;
info.setBindingValue(name);
info.setReadOnly(true);
}
if (ChartCubeUtil.isPlotChart(element) || ChartCubeUtil.isAxisChart(element)) {
info.setBindingType(ReportItemHandle.DATABINDING_TYPE_REPORT_ITEM_REF);
info.setReadOnly(true);
}
return info;
}
Program: 67713
Project: 67713
Buggy source:
protected boolean prePreview(){
  System.clearProperty(IPreviewConstants.SID);
  System.clearProperty(IPreviewConstants.MAX_DATASET_ROWS);
  System.clearProperty(IPreviewConstants.MAX_CUBE_ROW_LEVELS);
  System.clearProperty(IPreviewConstants.MAX_CUBE_COLUMN_LEVELS);
  return true;
}

Fixed version (ground truth):
protected boolean prePreview(){
  System.clearProperty(IPreviewConstants.SID);
  System.clearProperty(IPreviewConstants.DSID);
  System.clearProperty(IPreviewConstants.MAX_DATASET_ROWS);
  System.clearProperty(IPreviewConstants.MAX_CUBE_ROW_LEVELS);
  System.clearProperty(IPreviewConstants.MAX_CUBE_COLUMN_LEVELS);
  return true;
}
Program: 67714
Project: 67714
Buggy source:
protected boolean prePreview(){
  System.clearProperty(IPreviewConstants.SID);
  System.clearProperty(IPreviewConstants.MAX_DATASET_ROWS);
  System.clearProperty(IPreviewConstants.MAX_CUBE_ROW_LEVELS);
  System.clearProperty(IPreviewConstants.MAX_CUBE_COLUMN_LEVELS);
  return true;
}

Fixed version (ground truth):
protected boolean prePreview(){
  System.clearProperty(IPreviewConstants.SID);
  System.clearProperty(IPreviewConstants.DSID);
  System.clearProperty(IPreviewConstants.MAX_DATASET_ROWS);
  System.clearProperty(IPreviewConstants.MAX_CUBE_ROW_LEVELS);
  System.clearProperty(IPreviewConstants.MAX_CUBE_COLUMN_LEVELS);
  return true;
}
Program: 67715
Project: 67715
Buggy source:
protected boolean prePreview(){
  System.clearProperty(IPreviewConstants.SID);
  System.clearProperty(IPreviewConstants.MAX_DATASET_ROWS);
  System.clearProperty(IPreviewConstants.MAX_CUBE_ROW_LEVELS);
  System.clearProperty(IPreviewConstants.MAX_CUBE_COLUMN_LEVELS);
  return true;
}

Fixed version (ground truth):
protected boolean prePreview(){
  System.clearProperty(IPreviewConstants.SID);
  System.clearProperty(IPreviewConstants.DSID);
  System.clearProperty(IPreviewConstants.MAX_DATASET_ROWS);
  System.clearProperty(IPreviewConstants.MAX_CUBE_ROW_LEVELS);
  System.clearProperty(IPreviewConstants.MAX_CUBE_COLUMN_LEVELS);
  return true;
}
Program: 67716
Project: 67716
Buggy source:
protected boolean prePreview(){
  System.clearProperty(IPreviewConstants.SID);
  System.clearProperty(IPreviewConstants.MAX_DATASET_ROWS);
  System.clearProperty(IPreviewConstants.MAX_CUBE_ROW_LEVELS);
  System.clearProperty(IPreviewConstants.MAX_CUBE_COLUMN_LEVELS);
  return true;
}

Fixed version (ground truth):
protected boolean prePreview(){
  System.clearProperty(IPreviewConstants.SID);
  System.clearProperty(IPreviewConstants.DSID);
  System.clearProperty(IPreviewConstants.MAX_DATASET_ROWS);
  System.clearProperty(IPreviewConstants.MAX_CUBE_ROW_LEVELS);
  System.clearProperty(IPreviewConstants.MAX_CUBE_COLUMN_LEVELS);
  return true;
}
Program: 67719
Project: 67719
Buggy source:
protected void addData(SheetData data){
  XlsContainer container=getCurrentContainer();
  container.setEmpty(false);
  int col=axis.getColumnIndexByCoordinate(data.getStartX());
  if (col == -1 || col >= cache.getColumnCount())   return;
  int span=axis.getColumnIndexByCoordinate(data.getEndX()) - col;
  outputDataIfBufferIsFull();
  updataRowIndex(data,container);
  addDatatoCache(col,data);
  for (int i=col + 1; i < col + span; i++) {
    BlankData blankData=new BlankData(data);
    blankData.setType(Type.HORIZONTAL);
    addDatatoCache(i,blankData);
  }
  if (data.getDataType() == SheetData.IMAGE) {
    addEmptyData(data,container);
  }
  while (container != null) {
    if (container instanceof XlsCell) {
      XlsCell cell=(XlsCell)container;
      data.setRowSpanInDesign(cell.getRowSpan() - 1);
      break;
    }
 else {
      container=container.getParent();
    }
  }
}

Fixed version (ground truth):
protected void addData(SheetData data){
  XlsContainer container=getCurrentContainer();
  container.setEmpty(false);
  if (data.getStartX() == data.getEndX())   return;
  int col=axis.getColumnIndexByCoordinate(data.getStartX());
  if (col == -1 || col >= cache.getColumnCount())   return;
  int span=axis.getColumnIndexByCoordinate(data.getEndX()) - col;
  outputDataIfBufferIsFull();
  updataRowIndex(data,container);
  addDatatoCache(col,data);
  for (int i=col + 1; i < col + span; i++) {
    BlankData blankData=new BlankData(data);
    blankData.setType(Type.HORIZONTAL);
    addDatatoCache(i,blankData);
  }
  if (data.getDataType() == SheetData.IMAGE) {
    addEmptyData(data,container);
  }
  while (container != null) {
    if (container instanceof XlsCell) {
      XlsCell cell=(XlsCell)container;
      data.setRowSpanInDesign(cell.getRowSpan() - 1);
      break;
    }
 else {
      container=container.getParent();
    }
  }
}
Program: 67720
Project: 67720
Buggy source:
public void close() throws BirtException {
  if (specifiedHeight > currentBP) {
    setContentHeight(specifiedHeight);
  }
 else {
    setContentHeight(currentBP);
  }
  finished=true;
}

Fixed version (ground truth):
public void close() throws BirtException {
  if (context.isFixedLayout()) {
    setContentHeight(specifiedHeight);
  }
 else {
    setContentHeight(Math.max(specifiedHeight,currentBP));
  }
  finished=true;
}
Program: 67730
Project: 67730
Buggy source:
@Override protected Image createImageFromModel(Fill imageModel) throws ChartException {
  return new SVGImage(super.createImageFromModel(imageModel),null);
}

Fixed version (ground truth):
@Override protected Image createImageFromModel(Fill imageModel) throws ChartException {
  Image img=super.createImageFromModel(imageModel);
  if (!(img instanceof SVGImage)) {
    img=new SVGImage(img,null);
  }
  return img;
}
Program: 67731
Project: 67731
Buggy source:
public void drawOval(OvalRenderEvent ore) throws ChartException {
  ivRenderer.groupPrimitive(ore,false);
  super.drawOval(ore);
  ivRenderer.ungroupPrimitive(ore,false);
}

Fixed version (ground truth):
@Override public void drawOval(OvalRenderEvent ore) throws ChartException {
  ivRenderer.groupPrimitive(ore,false);
  super.drawOval(ore);
  ivRenderer.ungroupPrimitive(ore,false);
}
Program: 67732
Project: 67732
Buggy source:
public void fillArc(ArcRenderEvent are) throws ChartException {
  ivRenderer.groupPrimitive(are,false);
  super.fillArc(are);
  ivRenderer.ungroupPrimitive(are,false);
}

Fixed version (ground truth):
@Override public void fillArc(ArcRenderEvent are) throws ChartException {
  ivRenderer.groupPrimitive(are,false);
  super.fillArc(are);
  ivRenderer.ungroupPrimitive(are,false);
}
Program: 67733
Project: 67733
Buggy source:
public void fillPolygon(PolygonRenderEvent pre) throws ChartException {
  ivRenderer.groupPrimitive(pre,false);
  super.fillPolygon(pre);
  ivRenderer.ungroupPrimitive(pre,false);
}

Fixed version (ground truth):
@Override public void fillPolygon(PolygonRenderEvent pre) throws ChartException {
  ivRenderer.groupPrimitive(pre,false);
  super.fillPolygon(pre);
  ivRenderer.ungroupPrimitive(pre,false);
}
Program: 67734
Project: 67734
Buggy source:
public void drawRectangle(RectangleRenderEvent rre) throws ChartException {
  ivRenderer.groupPrimitive(rre,false);
  super.drawRectangle(rre);
  ivRenderer.ungroupPrimitive(rre,false);
}

Fixed version (ground truth):
@Override public void drawRectangle(RectangleRenderEvent rre) throws ChartException {
  ivRenderer.groupPrimitive(rre,false);
  super.drawRectangle(rre);
  ivRenderer.ungroupPrimitive(rre,false);
}
Program: 67735
Project: 67735
Buggy source:
public void changeStructure(StructureChangeEvent scev){
}

Fixed version (ground truth):
@Override public void changeStructure(StructureChangeEvent scev){
}
Program: 67736
Project: 67736
Buggy source:
/** 
 * @param os
 * @throws ChartException
 */
public void after() throws ChartException {
  super.after();
  ivRenderer.addInteractivity();
  addScripts();
  ((SVGGraphics2D)_g2d).flush();
  dom.getDocumentElement().appendChild(ivRenderer.getHotspotLayer());
  if (oOutputIdentifier instanceof OutputStream) {
    try {
      writeDocumentToOutputStream(dom,(OutputStream)oOutputIdentifier);
    }
 catch (    Exception ex) {
      throw new ChartException(ChartDeviceSVGPlugin.ID,ChartException.RENDERING,ex);
    }
  }
 else   if (oOutputIdentifier instanceof String) {
    FileOutputStream fos=null;
    try {
      fos=SecurityUtil.newFileOutputStream((String)oOutputIdentifier);
      writeDocumentToOutputStream(dom,fos);
      fos.close();
    }
 catch (    Exception ex) {
      throw new ChartException(ChartDeviceSVGPlugin.ID,ChartException.RENDERING,ex);
    }
  }
 else {
    throw new ChartException(ChartDeviceSVGPlugin.ID,ChartException.RENDERING,"String_Node_Str",new Object[]{oOutputIdentifier},null);
  }
  ivRenderer.clear();
}

Fixed version (ground truth):
/** 
 * @param os
 * @throws ChartException
 */
@Override public void after() throws ChartException {
  super.after();
  ivRenderer.addInteractivity();
  addScripts();
  ((SVGGraphics2D)_g2d).flush();
  dom.getDocumentElement().appendChild(ivRenderer.getHotspotLayer());
  if (oOutputIdentifier instanceof OutputStream) {
    try {
      writeDocumentToOutputStream(dom,(OutputStream)oOutputIdentifier);
    }
 catch (    Exception ex) {
      throw new ChartException(ChartDeviceSVGPlugin.ID,ChartException.RENDERING,ex);
    }
  }
 else   if (oOutputIdentifier instanceof String) {
    FileOutputStream fos=null;
    try {
      fos=SecurityUtil.newFileOutputStream((String)oOutputIdentifier);
      writeDocumentToOutputStream(dom,fos);
      fos.close();
    }
 catch (    Exception ex) {
      throw new ChartException(ChartDeviceSVGPlugin.ID,ChartException.RENDERING,ex);
    }
  }
 else {
    throw new ChartException(ChartDeviceSVGPlugin.ID,ChartException.RENDERING,"String_Node_Str",new Object[]{oOutputIdentifier},null);
  }
  ivRenderer.clear();
}
Program: 67737
Project: 67737
Buggy source:
public void drawArea(AreaRenderEvent are) throws ChartException {
  ivRenderer.groupPrimitive(are,false);
  super.drawArea(are);
  ivRenderer.ungroupPrimitive(are,false);
}

Fixed version (ground truth):
@Override public void drawArea(AreaRenderEvent are) throws ChartException {
  ivRenderer.groupPrimitive(are,false);
  super.drawArea(are);
  ivRenderer.ungroupPrimitive(are,false);
}
Program: 67738
Project: 67738
Buggy source:
protected void init(){
  final PluginSettings ps=PluginSettings.instance();
  try {
    _ids=ps.getDisplayServer("String_Node_Str");
    _tr=new SVGTextRenderer(_ids);
    ivRenderer=new SVGInteractiveRenderer(getULocale());
  }
 catch (  ChartException pex) {
    logger.log(pex);
  }
}

Fixed version (ground truth):
@Override protected void init(){
  final PluginSettings ps=PluginSettings.instance();
  try {
    _ids=ps.getDisplayServer("String_Node_Str");
    _tr=new SVGTextRenderer(_ids);
    ivRenderer=new SVGInteractiveRenderer(getULocale());
  }
 catch (  ChartException pex) {
    logger.log(pex);
  }
}
Program: 67740
Project: 67740
Buggy source:
protected Image createImage(byte[] data){
  return new SVGImage(super.createImage(data),null,data);
}

Fixed version (ground truth):
@Override protected Image createImage(byte[] data){
  return new SVGImage(super.createImage(data),null,data);
}
Program: 67741
Project: 67741
Buggy source:
public String getMimeType(){
  return "String_Node_Str";
}

Fixed version (ground truth):
@Override public String getMimeType(){
  return "String_Node_Str";
}
Program: 67742
Project: 67742
Buggy source:
public void drawText(TextRenderEvent tre) throws ChartException {
  String fontName=convertFont(tre.getLabel().getCaption().getFont().getName());
  if (fontName != null) {
    tre.getLabel().getCaption().getFont().setName(fontName);
  }
  ivRenderer.groupPrimitive(tre,true);
switch (tre.getAction()) {
case TextRenderEvent.UNDEFINED:
    throw new ChartException(ChartDeviceExtensionPlugin.ID,ChartException.RENDERING,"String_Node_Str",Messages.getResourceBundle(getULocale()));
case TextRenderEvent.RENDER_SHADOW_AT_LOCATION:
  _tr.renderShadowAtLocation(this,tre.getTextPosition(),tre.getLocation(),tre.getLabel());
break;
case TextRenderEvent.RENDER_TEXT_AT_LOCATION:
_tr.renderTextAtLocation(this,tre.getTextPosition(),tre.getLocation(),tre.getLabel());
break;
case TextRenderEvent.RENDER_TEXT_IN_BLOCK:
_tr.renderTextInBlock(this,tre.getBlockBounds(),tre.getBlockAlignment(),tre.getLabel());
break;
}
ivRenderer.ungroupPrimitive(tre,true);
}

Fixed version (ground truth):
@Override public void drawText(TextRenderEvent tre) throws ChartException {
  String fontName=convertFont(tre.getLabel().getCaption().getFont().getName());
  if (fontName != null) {
    tre.getLabel().getCaption().getFont().setName(fontName);
  }
  ivRenderer.groupPrimitive(tre,true);
switch (tre.getAction()) {
case TextRenderEvent.UNDEFINED:
    throw new ChartException(ChartDeviceExtensionPlugin.ID,ChartException.RENDERING,"String_Node_Str",Messages.getResourceBundle(getULocale()));
case TextRenderEvent.RENDER_SHADOW_AT_LOCATION:
  _tr.renderShadowAtLocation(this,tre.getTextPosition(),tre.getLocation(),tre.getLabel());
break;
case TextRenderEvent.RENDER_TEXT_AT_LOCATION:
_tr.renderTextAtLocation(this,tre.getTextPosition(),tre.getLocation(),tre.getLabel());
break;
case TextRenderEvent.RENDER_TEXT_IN_BLOCK:
_tr.renderTextInBlock(this,tre.getBlockBounds(),tre.getBlockAlignment(),tre.getLabel());
break;
}
ivRenderer.ungroupPrimitive(tre,true);
}
Program: 67743
Project: 67743
Buggy source:
public void drawArc(ArcRenderEvent are) throws ChartException {
  ivRenderer.groupPrimitive(are,false);
  super.drawArc(are);
  ivRenderer.ungroupPrimitive(are,false);
}

Fixed version (ground truth):
@Override public void drawArc(ArcRenderEvent are) throws ChartException {
  ivRenderer.groupPrimitive(are,false);
  super.drawArc(are);
  ivRenderer.ungroupPrimitive(are,false);
}
Program: 67744
Project: 67744
Buggy source:
public void drawLine(LineRenderEvent lre) throws ChartException {
  ivRenderer.groupPrimitive(lre,false);
  super.drawLine(lre);
  ivRenderer.ungroupPrimitive(lre,false);
}

Fixed version (ground truth):
@Override public void drawLine(LineRenderEvent lre) throws ChartException {
  ivRenderer.groupPrimitive(lre,false);
  super.drawLine(lre);
  ivRenderer.ungroupPrimitive(lre,false);
}
Program: 67745
Project: 67745
Buggy source:
public void drawImage(ImageRenderEvent pre) throws ChartException {
  ivRenderer.groupPrimitive(pre,false);
  super.drawImage(pre);
  ivRenderer.ungroupPrimitive(pre,false);
}

Fixed version (ground truth):
@Override public void drawImage(ImageRenderEvent pre) throws ChartException {
  ivRenderer.groupPrimitive(pre,false);
  super.drawImage(pre);
  ivRenderer.ungroupPrimitive(pre,false);
}
Program: 67746
Project: 67746
Buggy source:
public void fillArea(AreaRenderEvent are) throws ChartException {
  ivRenderer.groupPrimitive(are,false);
  super.fillArea(are);
  ivRenderer.ungroupPrimitive(are,false);
}

Fixed version (ground truth):
@Override public void fillArea(AreaRenderEvent are) throws ChartException {
  ivRenderer.groupPrimitive(are,false);
  super.fillArea(are);
  ivRenderer.ungroupPrimitive(are,false);
}