nus-yam/ex-repair huggingface dataset:
Program: 75821
Project: 75821
Buggy source:
/** 
 * @param groupSpecs
 * @param i
 */
static int getTempComputedColumnType(int i){
  int interval=i;
  if (interval == IQuery.GroupSpec.DAY_INTERVAL || interval == IQuery.GroupSpec.HOUR_INTERVAL || interval == IQuery.GroupSpec.MINUTE_INTERVAL || interval == IQuery.GroupSpec.SECOND_INTERVAL || interval == IQuery.GroupSpec.MONTH_INTERVAL || interval == IQuery.GroupSpec.QUARTER_INTERVAL || interval == IQuery.GroupSpec.YEAR_INTERVAL || interval == IQuery.GroupSpec.WEEK_INTERVAL)   interval=DataType.DATE_TYPE;
 else   if (interval == IQuery.GroupSpec.NUMERIC_INTERVAL)   interval=DataType.DOUBLE_TYPE;
 else   if (interval == IQuery.GroupSpec.STRING_PREFIX_INTERVAL)   interval=DataType.STRING_TYPE;
 else   interval=DataType.ANY_TYPE;
  return interval;
}

Fixed version (ground truth):
/** 
 * @param groupSpecs
 * @param i
 */
static int getTempComputedColumnType(int i){
  int interval=i;
  if (interval == IQuery.GroupSpec.DAY_INTERVAL || interval == IQuery.GroupSpec.HOUR_INTERVAL || interval == IQuery.GroupSpec.MINUTE_INTERVAL || interval == IQuery.GroupSpec.SECOND_INTERVAL || interval == IQuery.GroupSpec.MONTH_INTERVAL || interval == IQuery.GroupSpec.QUARTER_INTERVAL || interval == IQuery.GroupSpec.YEAR_INTERVAL || interval == IQuery.GroupSpec.WEEK_INTERVAL || interval == IQuery.GroupSpec.NUMERIC_INTERVAL)   interval=DataType.DOUBLE_TYPE;
 else   if (interval == IQuery.GroupSpec.STRING_PREFIX_INTERVAL)   interval=DataType.STRING_TYPE;
 else   interval=DataType.ANY_TYPE;
  return interval;
}
Program: 75823
Project: 75823
Buggy source:
/** 
 * refresh page
 */
private void refreshPage(){
  DataSourceDesign curDataSourceDesign=this.getDataSetDesign().getDataSourceDesign();
  if (curDataSourceDesign != prevDataSourceDesign) {
    RemoveAllAvailableDbObjects();
    resetJdbcInfo(curDataSourceDesign);
    enableSchemaComponent(isSchemaSupported);
    setRootElement();
    sourceViewerConfiguration.getContentAssistProcessor().setDataSourceHandle(curDataSourceDesign);
    populateAvailableDbObjects();
    prevDataSourceDesign=curDataSourceDesign;
  }
}

Fixed version (ground truth):
/** 
 * refresh page
 */
private void refreshPage(){
  DataSourceDesign curDataSourceDesign=this.getDataSetDesign().getDataSourceDesign();
  if (curDataSourceDesign != prevDataSourceDesign) {
    RemoveAllAvailableDbObjects();
    resetJdbcInfo(curDataSourceDesign);
    enableSchemaComponent(isSchemaSupported);
    setRootElement();
    sourceViewerConfiguration.getContentAssistProcessor().setDataSourceHandle(curDataSourceDesign);
    populateAvailableDbObjects();
    prevDataSourceDesign=curDataSourceDesign;
    try {
      ResultSetMetaData meta=this.metaDataProvider.getConnection().prepareStatement(this.getDataSetDesign().getQueryText()).getMetaData();
      ResultSetColumns rsc=this.getDataSetDesign().getPrimaryResultSet().getResultSetColumns();
      if (meta.getColumnCount() != rsc.getResultColumnDefinitions().size()) {
        this.shouldUpdateDataSetDesign=true;
        return;
      }
      for (int i=0; i < rsc.getResultColumnDefinitions().size(); i++) {
        ColumnDefinition cd=(ColumnDefinition)rsc.getResultColumnDefinitions().get(i);
        if (!(cd.getAttributes().getName().equals(meta.getColumnName(i + 1)) && cd.getAttributes().getNativeDataTypeCode() == meta.getColumnType(i + 1))) {
          this.shouldUpdateDataSetDesign=true;
          return;
        }
      }
    }
 catch (    SQLException e) {
      e.printStackTrace();
    }
  }
}
Program: 75824
Project: 75824
Buggy source:
protected DataSetDesign collectDataSetDesign(DataSetDesign design){
  if (design != null && doc != null)   design.setQueryText(doc.get());
  if (!formerQueryTxt.equals(design.getQueryText())) {
    SQLUtility.saveDataSetDesign(design);
    formerQueryTxt=design.getQueryText();
  }
  return design;
}

Fixed version (ground truth):
protected DataSetDesign collectDataSetDesign(DataSetDesign design){
  if (design != null && doc != null)   design.setQueryText(doc.get());
  if (this.shouldUpdateDataSetDesign || !formerQueryTxt.equals(design.getQueryText())) {
    SQLUtility.saveDataSetDesign(design);
    formerQueryTxt=design.getQueryText();
    this.shouldUpdateDataSetDesign=false;
  }
  return design;
}
Program: 75825
Project: 75825
Buggy source:
private void drawPropertyCombo(Group propertyGroup,final String propertyName,String propertyContent){
  GridData gd;
  final Combo propertyField=new Combo(propertyGroup,SWT.BORDER | SWT.READ_ONLY);
  propertyField.setItems(new String[]{EMPTY_STRING,"String_Node_Str","String_Node_Str"});
  if (propertyContent != null) {
    propertyField.setText(propertyContent);
    databaseProperties.put(propertyName,propertyContent);
  }
 else   propertyField.setText(EMPTY_STRING);
  propertyField.addSelectionListener(new SelectionListener(){
    @Override public void widgetSelected(    SelectionEvent arg0){
      if (propertyField.getSelectionIndex() == 1) {
        databaseProperties.put(propertyName,"String_Node_Str");
      }
 else       if (propertyField.getSelectionIndex() == 2) {
        databaseProperties.put(propertyName,"String_Node_Str");
      }
 else {
        databaseProperties.put(propertyName,EMPTY_STRING);
      }
    }
    @Override public void widgetDefaultSelected(    SelectionEvent arg0){
      databaseProperties.put(propertyName,EMPTY_STRING);
    }
  }
);
  gd=new GridData(GridData.FILL_HORIZONTAL);
  gd.horizontalSpan=3;
  gd.horizontalAlignment=SWT.FILL;
  propertyField.setLayoutData(gd);
  propertyField.getParent().layout();
}

Fixed version (ground truth):
private void drawPropertyCombo(Group propertyGroup,final String propertyName,String propertyContent){
  GridData gd;
  final Combo propertyField=new Combo(propertyGroup,SWT.BORDER | SWT.READ_ONLY);
  propertyField.setItems(new String[]{EMPTY_STRING,"String_Node_Str","String_Node_Str"});
  if (propertyContent != null) {
    propertyField.setText(propertyContent);
    databaseProperties.put(propertyName,propertyContent);
  }
 else   propertyField.setText(EMPTY_STRING);
  propertyField.addSelectionListener(new SelectionListener(){
    public void widgetSelected(    SelectionEvent arg0){
      if (propertyField.getSelectionIndex() == 1) {
        databaseProperties.put(propertyName,"String_Node_Str");
      }
 else       if (propertyField.getSelectionIndex() == 2) {
        databaseProperties.put(propertyName,"String_Node_Str");
      }
 else {
        databaseProperties.put(propertyName,EMPTY_STRING);
      }
    }
    public void widgetDefaultSelected(    SelectionEvent arg0){
      databaseProperties.put(propertyName,EMPTY_STRING);
    }
  }
);
  gd=new GridData(GridData.FILL_HORIZONTAL);
  gd.horizontalSpan=3;
  gd.horizontalAlignment=SWT.FILL;
  propertyField.setLayoutData(gd);
  propertyField.getParent().layout();
}
Program: 75826
Project: 75826
Buggy source:
@Override public void widgetDefaultSelected(SelectionEvent arg0){
  databaseProperties.put(propertyName,EMPTY_STRING);
}

Fixed version (ground truth):
public void widgetDefaultSelected(SelectionEvent arg0){
  databaseProperties.put(propertyName,EMPTY_STRING);
}
Program: 75831
Project: 75831
Buggy source:
/** 
 * @param crosstab
 * @param measureView
 * @param function
 * @param rowDimension
 * @param rowLevel
 * @param colDimension
 * @param colLevel
 * @throws SemanticException
 */
public static void addDataItem(CrosstabReportItemHandle crosstab,MeasureViewHandle measureView,String function,String rowDimension,String rowLevel,String colDimension,String colLevel) throws SemanticException {
  if (crosstab == null || measureView == null)   return;
  AggregationCellHandle cell=measureView.getAggregationCell(rowDimension,rowLevel,colDimension,colLevel);
  if (cell == null) {
    cell=measureView.addAggregation(rowDimension,rowLevel,colDimension,colLevel);
  }
  if (cell != null && cell.getContents().size() == 0) {
    String name=CrosstabModelUtil.generateComputedColumnName(measureView,colLevel,rowLevel);
    ComputedColumn column=StructureFactory.newComputedColumn(crosstab.getModelHandle(),name);
    column.setExpression(ExpressionUtil.createJSMeasureExpression(measureView.getCubeMeasureName()));
    column.setAggregateFunction(function);
    column.addAggregateOn(rowLevel);
    column.addAggregateOn(colLevel);
    ComputedColumnHandle columnHandle=((ReportItemHandle)crosstab.getModelHandle()).addColumnBinding(column,false);
    DataItemHandle dataItem=crosstab.getModuleHandle().getElementFactory().newDataItem(null);
    dataItem.setResultSetColumn(columnHandle.getName());
    cell.addContent(dataItem);
  }
}

Fixed version (ground truth):
/** 
 * @param crosstab
 * @param measureView
 * @param function
 * @param rowDimension
 * @param rowLevel
 * @param colDimension
 * @param colLevel
 * @throws SemanticException
 */
public static void addDataItem(CrosstabReportItemHandle crosstab,MeasureViewHandle measureView,String function,String rowDimension,String rowLevel,String colDimension,String colLevel) throws SemanticException {
  if (crosstab == null || measureView == null)   return;
  AggregationCellHandle cell=measureView.getAggregationCell(rowDimension,rowLevel,colDimension,colLevel);
  if (cell == null) {
    cell=measureView.addAggregation(rowDimension,rowLevel,colDimension,colLevel);
  }
  if (cell != null && cell.getContents().size() == 0) {
    String name=CrosstabModelUtil.generateComputedColumnName(measureView,colLevel,rowLevel);
    ComputedColumn column=StructureFactory.newComputedColumn(crosstab.getModelHandle(),name);
    column.setExpression(ExpressionUtil.createJSMeasureExpression(measureView.getCubeMeasureName()));
    column.setAggregateFunction(function != null ? function : DEFAULT_MEASURE_FUNCTION);
    column.addAggregateOn(rowLevel);
    column.addAggregateOn(colLevel);
    ComputedColumnHandle columnHandle=((ReportItemHandle)crosstab.getModelHandle()).addColumnBinding(column,false);
    DataItemHandle dataItem=crosstab.getModuleHandle().getElementFactory().newDataItem(null);
    dataItem.setResultSetColumn(columnHandle.getName());
    cell.addContent(dataItem);
  }
}
Program: 75835
Project: 75835
Buggy source:
public String getParameterName(int param) throws OdaException {
  return null;
}

Fixed version (ground truth):
public String getParameterName(int param) throws OdaException {
  logger.logp(java.util.logging.Level.FINE,SPParameterMetaData.class.getName(),"String_Node_Str","String_Node_Str");
  assertNotNull(paramMetadataArray);
  ParameterDefn paramDefn=(ParameterDefn)paramMetadataArray[param - 1];
  return paramDefn.getParamName();
}
Program: 75836
Project: 75836
Buggy source:
public void tearDown(){
  if (fileName != null) {
    File file=new File(fileName);
    file.delete();
  }
  if (fileName2 != null) {
    File file=new File(fileName2);
    file.delete();
  }
}

Fixed version (ground truth):
public void tearDown(){
  if (fileName != null) {
    File file=new File(fileName);
    file.delete();
  }
  if (fileName2 != null) {
    File file=new File(fileName2);
    file.delete();
  }
  if (archiveWriter != null) {
    try {
      archiveWriter.finish();
    }
 catch (    IOException e) {
      e.printStackTrace();
    }
  }
  if (archiveReader != null) {
    try {
      archiveReader.close();
    }
 catch (    IOException e) {
      e.printStackTrace();
    }
  }
}
Program: 75839
Project: 75839
Buggy source:
protected int getRowSpan(Row row,CellArea cell){
  int rowSpan=cell.getRowSpan();
  IContent rowContent=(IContent)cell.getContent().getParent();
  if (row.getContent() == rowContent) {
    if (rowSpan > 1) {
      return rowSpan - 1;
    }
  }
  return rowSpan;
}

Fixed version (ground truth):
protected int getRowSpan(Row row,CellArea cell){
  int rowSpan=cell.getRowSpan();
  IContent rowContent=(IContent)cell.getContent().getParent();
  if (row.getContent() != rowContent) {
    if (rowSpan > 1) {
      return rowSpan - 1;
    }
  }
  return rowSpan;
}
Program: 75840
Project: 75840
Buggy source:
/** 
 * get a date formatter object
 * @param value date format
 * @return formatter object
 */
public DateFormatter getDateFormatter(String value){
  DateFormatter fmt=(DateFormatter)dateFormatters.get(value);
  if (fmt == null) {
    fmt=new DateFormatter(value,ULocale.forLocale(locale));
    dateFormatters.put(value,fmt);
  }
  return fmt;
}

Fixed version (ground truth):
/** 
 * get a date formatter object
 * @param value date format
 * @return formatter object
 */
public DateFormatter getDateFormatter(String value){
  DateFormatter fmt=null;
  if (value != null) {
    fmt=(DateFormatter)dateFormatters.get(value);
    if (fmt == null) {
      fmt=new DateFormatter(value,ULocale.forLocale(locale));
      dateFormatters.put(value,fmt);
    }
    return fmt;
  }
  return new DateFormatter(value,ULocale.forLocale(locale));
}
Program: 75841
Project: 75841
Buggy source:
/** 
 * Get printer settings from http request
 * @param request
 * @return
 */
public static Printer getPrinter(HttpServletRequest request){
  String printerName=ParameterAccessor.getParameter(request,PARAM_PRINTER);
  Printer printer=null;
  if (printerName != null) {
    List printers=findPrinters();
    for (int i=0; i < printers.size(); i++) {
      if (printerName.equalsIgnoreCase(((Printer)printers.get(i)).getName())) {
        printer=(Printer)printers.get(i);
        break;
      }
    }
  }
  if (printer == null) {
    PrintService service=PrintServiceLookup.lookupDefaultPrintService();
    printer=createPrinter(service);
  }
  if (printer != null) {
    String copies=ParameterAccessor.getParameter(request,PARAM_PRINTER_COPIES);
    if (copies != null)     printer.setCopies(Integer.parseInt(copies));
    String collate=ParameterAccessor.getParameter(request,PARAM_PRINTER_COLLATE);
    if (collate != null)     printer.setCollate(Boolean.valueOf(collate).booleanValue());
    String duplex=ParameterAccessor.getParameter(request,PARAM_PRINTER_DUPLEX);
    if (duplex != null)     printer.setDuplex(Integer.parseInt(duplex));
    String mode=ParameterAccessor.getParameter(request,PARAM_PRINTER_MODE);
    if (mode != null)     printer.setMode(Integer.parseInt(mode));
    String mediaSize=ParameterAccessor.getParameter(request,PARAM_PRINTER_MEDIASIZE);
    if (mediaSize != null)     printer.setMediaSize(mediaSize);
  }
  return printer;
}

Fixed version (ground truth):
/** 
 * Get printer settings from http request
 * @param request
 * @return
 */
public static Printer getPrinter(HttpServletRequest request){
  String printerName=ParameterAccessor.getParameter(request,PARAM_PRINTER);
  Printer printer=null;
  if (printerName != null) {
    List printers=findPrinters();
    for (int i=0; i < printers.size(); i++) {
      if (printerName.equalsIgnoreCase(((Printer)printers.get(i)).getName())) {
        printer=(Printer)printers.get(i);
        break;
      }
    }
  }
  if (printer == null) {
    PrintService service=PrintServiceLookup.lookupDefaultPrintService();
    printer=createPrinter(service);
  }
  if (printer != null) {
    String copies=ParameterAccessor.getParameter(request,PARAM_PRINTER_COPIES);
    if (copies != null)     printer.setCopies(Integer.parseInt(copies));
    String collate=ParameterAccessor.getParameter(request,PARAM_PRINTER_COLLATE);
    if (collate != null)     printer.setCollate(Boolean.valueOf(collate).booleanValue());
    String duplex=ParameterAccessor.getParameter(request,PARAM_PRINTER_DUPLEX);
    if (duplex != null)     printer.setDuplex(Integer.parseInt(duplex));
    String mode=ParameterAccessor.getParameter(request,PARAM_PRINTER_MODE);
    if (mode != null)     printer.setMode(Integer.parseInt(mode));
    String mediaSize=ParameterAccessor.getParameter(request,PARAM_PRINTER_MEDIASIZE);
    mediaSize=ParameterAccessor.htmlDecode(mediaSize);
    if (mediaSize != null)     printer.setMediaSize(mediaSize);
  }
  return printer;
}
Program: 75843
Project: 75843
Buggy source:
protected void mergeDropCell(RowArea row){
  if (unresolvedRow == null) {
    return;
  }
  CellArea[] cells=new CellArea[columnNumber];
  Iterator iter=row.getChildren();
  while (iter.hasNext()) {
    CellArea cell=(CellArea)iter.next();
    int colStart=cell.getColumnID();
    int colEnd=colStart + cell.getColSpan();
    for (int i=colStart; i < colEnd; i++) {
      int index=colStart - start;
      if (index >= 0 && index < columnNumber) {
        cells[colStart - start]=cell;
      }
    }
  }
  for (int i=0; i < columnNumber; i++) {
    if (cells[i] == null) {
      ICellContent cellContent=null;
      CellArea ca=unresolvedRow.getCell(start + i);
      if (ca != null) {
        ICellContent cc=(ICellContent)ca.getContent();
        cellContent=new ClonedCellContent(cc,getRowSpan(unresolvedRow,ca));
        int startColumn=cellContent.getColumn();
        int endColumn=cellContent.getColSpan() + startColumn;
        CellArea emptyCell=AreaFactory.createCellArea(cellContent);
        emptyCell.setRowSpan(ca.getRowSpan());
        resolveBorderConflict(emptyCell,false);
        emptyCell.setWidth(getCellWidth(startColumn,endColumn));
        emptyCell.setPosition(layoutInfo.getXPosition(i),0);
        emptyCell.setHeight(row.getHeight());
        row.addChild(emptyCell);
      }
    }
  }
}

Fixed version (ground truth):
protected void mergeDropCell(RowArea row){
  if (unresolvedRow == null) {
    return;
  }
  CellArea[] cells=new CellArea[columnNumber];
  Iterator iter=row.getChildren();
  while (iter.hasNext()) {
    CellArea cell=(CellArea)iter.next();
    int colStart=cell.getColumnID();
    int colEnd=colStart + cell.getColSpan();
    for (int i=colStart; i < colEnd; i++) {
      int index=colStart - start;
      if (index >= 0 && index < columnNumber) {
        cells[colStart - start]=cell;
      }
    }
  }
  for (int i=0; i < columnNumber; i++) {
    if (cells[i] == null) {
      ICellContent cellContent=null;
      CellArea ca=unresolvedRow.getCell(start + i);
      if (ca != null) {
        ICellContent cc=(ICellContent)ca.getContent();
        cellContent=new ClonedCellContent(cc,getRowSpan((IRowContent)row.getContent(),ca));
        int startColumn=cellContent.getColumn();
        int endColumn=cellContent.getColSpan() + startColumn;
        CellArea emptyCell=AreaFactory.createCellArea(cellContent);
        emptyCell.setRowSpan(ca.getRowSpan());
        resolveBorderConflict(emptyCell,false);
        emptyCell.setWidth(getCellWidth(startColumn,endColumn));
        emptyCell.setPosition(layoutInfo.getXPosition(i),0);
        emptyCell.setHeight(row.getHeight());
        row.addChild(emptyCell);
      }
    }
  }
}
Program: 75844
Project: 75844
Buggy source:
protected int getRowSpan(Row row,CellArea cell){
  int rowSpan=cell.getRowSpan();
  IContent rowContent=(IContent)cell.getContent().getParent();
  if (row.getContent() != rowContent) {
    if (rowSpan > 1) {
      return rowSpan - 1;
    }
  }
  return rowSpan;
}

Fixed version (ground truth):
protected int getRowSpan(IRowContent row,CellArea cell){
  int rowSpan=cell.getRowSpan();
  IContent rowContent=(IContent)cell.getContent().getParent();
  if (row != rowContent) {
    if (rowSpan > 1) {
      return rowSpan - 1;
    }
  }
  return rowSpan;
}
Program: 75847
Project: 75847
Buggy source:
/** 
 * The constructor.
 * @param _lhmAllTriggers
 * @param _jc
 * @param _lcl
 */
SwingEventHandler(Map _lhmAllTriggers,IUpdateNotifier _jc,ULocale _lcl){
  lhmAllTriggers=_lhmAllTriggers;
  iun=_jc;
  lcl=_lcl;
}

Fixed version (ground truth):
/** 
 * The constructor.
 * @param _lhmAllTriggers
 * @param _jc
 * @param _lcl
 */
SwingEventHandler(InteractiveRenderer iv,Map _lhmAllTriggers,IUpdateNotifier _jc,ULocale _lcl){
  lhmAllTriggers=_lhmAllTriggers;
  iun=_jc;
  lcl=_lcl;
  this.iv=iv;
}
Program: 75849
Project: 75849
Buggy source:
public void drawOval(OvalRenderEvent ore) throws ChartException {
  final LineAttributes lia=ore.getOutline();
  if (!validateLineAttributes(ore.getSource(),lia)) {
    return;
  }
  final Color cFG=(Color)validateEdgeColor(lia.getColor(),ore.getBackground(),_ids);
  if (cFG == null || cFG.getAlpha() == 0) {
    return;
  }
  final Bounds bo=ore.getBounds();
  final Ellipse2D.Double e2d=new Ellipse2D.Double(bo.getLeft(),bo.getTop(),bo.getWidth(),bo.getHeight());
  Stroke sPrevious=null;
  Stroke sCurrent=getCachedStroke(lia);
  if (sCurrent != null) {
    sPrevious=_g2d.getStroke();
    _g2d.setStroke(sCurrent);
  }
  _g2d.setColor(cFG);
  _g2d.draw(e2d);
  if (sPrevious != null) {
    _g2d.setStroke(sPrevious);
  }
}

Fixed version (ground truth):
public void drawOval(OvalRenderEvent ore) throws ChartException {
  iv.modifyEvent(ore);
  final LineAttributes lia=ore.getOutline();
  if (!validateLineAttributes(ore.getSource(),lia)) {
    return;
  }
  final Color cFG=(Color)validateEdgeColor(lia.getColor(),ore.getBackground(),_ids);
  if (cFG == null || cFG.getAlpha() == 0) {
    return;
  }
  final Bounds bo=ore.getBounds();
  final Ellipse2D.Double e2d=new Ellipse2D.Double(bo.getLeft(),bo.getTop(),bo.getWidth(),bo.getHeight());
  Stroke sPrevious=null;
  Stroke sCurrent=getCachedStroke(lia);
  if (sCurrent != null) {
    sPrevious=_g2d.getStroke();
    _g2d.setStroke(sCurrent);
  }
  _g2d.setColor(cFG);
  _g2d.draw(e2d);
  if (sPrevious != null) {
    _g2d.setStroke(sPrevious);
  }
}
Program: 75852
Project: 75852
Buggy source:
public void drawRectangle(RectangleRenderEvent rre) throws ChartException {
  final LineAttributes lia=rre.getOutline();
  if (!validateLineAttributes(rre.getSource(),lia)) {
    return;
  }
  final Color cFG=(Color)validateEdgeColor(lia.getColor(),rre.getBackground(),_ids);
  if (cFG == null || cFG.getAlpha() == 0) {
    return;
  }
  final Bounds bo=normalizeBounds(rre.getBounds());
  Stroke sPrevious=null;
  Stroke sCurrent=getCachedStroke(lia);
  if (sCurrent != null) {
    sPrevious=_g2d.getStroke();
    _g2d.setStroke(sCurrent);
  }
  _g2d.setColor(cFG);
  _g2d.draw(new Rectangle2D.Double(bo.getLeft(),bo.getTop(),bo.getWidth() - 1,bo.getHeight() - 1));
  if (sPrevious != null) {
    _g2d.setStroke(sPrevious);
  }
}

Fixed version (ground truth):
public void drawRectangle(RectangleRenderEvent rre) throws ChartException {
  iv.modifyEvent(rre);
  final LineAttributes lia=rre.getOutline();
  if (!validateLineAttributes(rre.getSource(),lia)) {
    return;
  }
  final Color cFG=(Color)validateEdgeColor(lia.getColor(),rre.getBackground(),_ids);
  if (cFG == null || cFG.getAlpha() == 0) {
    return;
  }
  final Bounds bo=normalizeBounds(rre.getBounds());
  Stroke sPrevious=null;
  Stroke sCurrent=getCachedStroke(lia);
  if (sCurrent != null) {
    sPrevious=_g2d.getStroke();
    _g2d.setStroke(sCurrent);
  }
  _g2d.setColor(cFG);
  _g2d.draw(new Rectangle2D.Double(bo.getLeft(),bo.getTop(),bo.getWidth() - 1,bo.getHeight() - 1));
  if (sPrevious != null) {
    _g2d.setStroke(sPrevious);
  }
}
Program: 75853
Project: 75853
Buggy source:
public void drawArea(AreaRenderEvent are) throws ChartException {
  final LineAttributes lia=are.getOutline();
  if (!validateLineAttributes(are.getSource(),lia)) {
    return;
  }
  final Color cFG=(Color)validateEdgeColor(lia.getColor(),are.getBackground(),_ids);
  if (cFG == null || cFG.getAlpha() == 0) {
    return;
  }
  final GeneralPath gp=new GeneralPath();
  PrimitiveRenderEvent pre;
  for (int i=0; i < are.getElementCount(); i++) {
    pre=are.getElement(i);
    if (pre instanceof ArcRenderEvent) {
      final ArcRenderEvent acre=(ArcRenderEvent)pre;
      final Arc2D.Double a2d=new Arc2D.Double(acre.getTopLeft().getX(),acre.getTopLeft().getY(),acre.getWidth(),acre.getHeight(),acre.getStartAngle(),acre.getAngleExtent(),toSwingArcType(acre.getStyle()));
      gp.append(a2d,true);
    }
 else     if (pre instanceof LineRenderEvent) {
      final LineRenderEvent lre=(LineRenderEvent)pre;
      final Line2D.Double l2d=new Line2D.Double(lre.getStart().getX(),lre.getStart().getY(),lre.getEnd().getX(),lre.getEnd().getY());
      gp.append(l2d,true);
    }
  }
  Stroke sPrevious=null;
  Stroke sCurrent=getCachedStroke(lia);
  if (sCurrent != null) {
    sPrevious=_g2d.getStroke();
    _g2d.setStroke(sCurrent);
  }
  _g2d.setColor(cFG);
  _g2d.draw(gp);
  if (sPrevious != null) {
    _g2d.setStroke(sPrevious);
  }
}

Fixed version (ground truth):
public void drawArea(AreaRenderEvent are) throws ChartException {
  iv.modifyEvent(are);
  final LineAttributes lia=are.getOutline();
  if (!validateLineAttributes(are.getSource(),lia)) {
    return;
  }
  final Color cFG=(Color)validateEdgeColor(lia.getColor(),are.getBackground(),_ids);
  if (cFG == null || cFG.getAlpha() == 0) {
    return;
  }
  final GeneralPath gp=new GeneralPath();
  PrimitiveRenderEvent pre;
  for (int i=0; i < are.getElementCount(); i++) {
    pre=are.getElement(i);
    if (pre instanceof ArcRenderEvent) {
      final ArcRenderEvent acre=(ArcRenderEvent)pre;
      final Arc2D.Double a2d=new Arc2D.Double(acre.getTopLeft().getX(),acre.getTopLeft().getY(),acre.getWidth(),acre.getHeight(),acre.getStartAngle(),acre.getAngleExtent(),toSwingArcType(acre.getStyle()));
      gp.append(a2d,true);
    }
 else     if (pre instanceof LineRenderEvent) {
      final LineRenderEvent lre=(LineRenderEvent)pre;
      final Line2D.Double l2d=new Line2D.Double(lre.getStart().getX(),lre.getStart().getY(),lre.getEnd().getX(),lre.getEnd().getY());
      gp.append(l2d,true);
    }
  }
  Stroke sPrevious=null;
  Stroke sCurrent=getCachedStroke(lia);
  if (sCurrent != null) {
    sPrevious=_g2d.getStroke();
    _g2d.setStroke(sCurrent);
  }
  _g2d.setColor(cFG);
  _g2d.draw(gp);
  if (sPrevious != null) {
    _g2d.setStroke(sPrevious);
  }
}
Program: 75854
Project: 75854
Buggy source:
public void drawText(TextRenderEvent tre) throws ChartException {
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;
}
}

Fixed version (ground truth):
public void drawText(TextRenderEvent tre) throws ChartException {
  iv.modifyEvent(tre);
  if (!tre.getLabel().isVisible())   return;
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;
}
}
Program: 75855
Project: 75855
Buggy source:
public void drawLine(LineRenderEvent lre) throws ChartException {
  final LineAttributes lia=lre.getLineAttributes();
  if (!validateLineAttributes(lre.getSource(),lia) || lia.getColor() == null) {
    return;
  }
  if (lia.getColor().isSetTransparency() && lia.getColor().getTransparency() == 0) {
    return;
  }
  final Location loStart=lre.getStart();
  final Location loEnd=lre.getEnd();
  Stroke sPrevious=null, sCurrent=getCachedStroke(lia);
  if (sCurrent != null) {
    sPrevious=_g2d.getStroke();
    _g2d.setStroke(sCurrent);
  }
  _g2d.setColor((Color)_ids.getColor(lia.getColor()));
  _g2d.draw(new Line2D.Double(loStart.getX(),loStart.getY(),loEnd.getX(),loEnd.getY()));
  if (sPrevious != null) {
    _g2d.setStroke(sPrevious);
  }
}

Fixed version (ground truth):
public void drawLine(LineRenderEvent lre) throws ChartException {
  iv.modifyEvent(lre);
  final LineAttributes lia=lre.getLineAttributes();
  if (!validateLineAttributes(lre.getSource(),lia) || lia.getColor() == null) {
    return;
  }
  if (lia.getColor().isSetTransparency() && lia.getColor().getTransparency() == 0) {
    return;
  }
  final Location loStart=lre.getStart();
  final Location loEnd=lre.getEnd();
  Stroke sPrevious=null, sCurrent=getCachedStroke(lia);
  if (sCurrent != null) {
    sPrevious=_g2d.getStroke();
    _g2d.setStroke(sCurrent);
  }
  _g2d.setColor((Color)_ids.getColor(lia.getColor()));
  _g2d.draw(new Line2D.Double(loStart.getX(),loStart.getY(),loEnd.getX(),loEnd.getY()));
  if (sPrevious != null) {
    _g2d.setStroke(sPrevious);
  }
}
Program: 75857
Project: 75857
Buggy source:
/** 
 * The constructor.
 */
public SwingRendererImpl(){
  final PluginSettings ps=PluginSettings.instance();
  try {
    _ids=ps.getDisplayServer("String_Node_Str");
    _tr=new SwingTextRenderer((SwingDisplayServer)_ids);
  }
 catch (  ChartException pex) {
    logger.log(pex);
  }
}

Fixed version (ground truth):
/** 
 * The constructor.
 */
public SwingRendererImpl(){
  final PluginSettings ps=PluginSettings.instance();
  try {
    _ids=ps.getDisplayServer("String_Node_Str");
    iv=new InteractiveRenderer();
    _tr=new SwingTextRenderer((SwingDisplayServer)_ids);
  }
 catch (  ChartException pex) {
    logger.log(pex);
  }
}
Program: 75860
Project: 75860
Buggy source:
public void setProperty(String sProperty,Object oValue){
  if (sProperty.equals(IDeviceRenderer.UPDATE_NOTIFIER)) {
    _iun=(IUpdateNotifier)oValue;
    _lhmAllTriggers.clear();
    Object obj=_iun.peerInstance();
    if (obj instanceof JComponent) {
      JComponent jc=(JComponent)obj;
      if (_eh != null) {
        jc.removeMouseListener(_eh);
        jc.removeMouseMotionListener(_eh);
        jc.removeKeyListener(_eh);
        jc.removeFocusListener(_eh);
      }
      _eh=new SwingEventHandler(_lhmAllTriggers,_iun,getULocale());
      jc.addMouseListener(_eh);
      jc.addMouseMotionListener(_eh);
      jc.addKeyListener(_eh);
      jc.addFocusListener(_eh);
    }
  }
 else   if (sProperty.equals(IDeviceRenderer.GRAPHICS_CONTEXT)) {
    _g2d=(Graphics2D)oValue;
    _g2d.setRenderingHint(RenderingHints.KEY_TEXT_ANTIALIASING,RenderingHints.VALUE_TEXT_ANTIALIAS_ON);
    _g2d.setRenderingHint(RenderingHints.KEY_ANTIALIASING,RenderingHints.VALUE_ANTIALIAS_ON);
    _g2d.setRenderingHint(RenderingHints.KEY_FRACTIONALMETRICS,RenderingHints.VALUE_FRACTIONALMETRICS_ON);
    _g2d.setRenderingHint(RenderingHints.KEY_RENDERING,RenderingHints.VALUE_RENDER_QUALITY);
    logger.log(ILogger.INFORMATION,Messages.getString("String_Node_Str",new Object[]{_g2d},getULocale()));
  }
 else   if (sProperty.equals(IDeviceRenderer.DPI_RESOLUTION)) {
    getDisplayServer().setDpiResolution(((Integer)oValue).intValue());
  }
}

Fixed version (ground truth):
public void setProperty(String sProperty,Object oValue){
  if (sProperty.equals(IDeviceRenderer.UPDATE_NOTIFIER)) {
    _iun=(IUpdateNotifier)oValue;
    iv.setUpdateNotifier(_iun);
    _lhmAllTriggers.clear();
    Object obj=_iun.peerInstance();
    if (obj instanceof JComponent) {
      JComponent jc=(JComponent)obj;
      if (_eh != null) {
        jc.removeMouseListener(_eh);
        jc.removeMouseMotionListener(_eh);
        jc.removeKeyListener(_eh);
        jc.removeFocusListener(_eh);
      }
      _eh=new SwingEventHandler(iv,_lhmAllTriggers,_iun,getULocale());
      jc.addMouseListener(_eh);
      jc.addMouseMotionListener(_eh);
      jc.addKeyListener(_eh);
      jc.addFocusListener(_eh);
    }
  }
 else   if (sProperty.equals(IDeviceRenderer.GRAPHICS_CONTEXT)) {
    _g2d=(Graphics2D)oValue;
    _g2d.setRenderingHint(RenderingHints.KEY_TEXT_ANTIALIASING,RenderingHints.VALUE_TEXT_ANTIALIAS_ON);
    _g2d.setRenderingHint(RenderingHints.KEY_ANTIALIASING,RenderingHints.VALUE_ANTIALIAS_ON);
    _g2d.setRenderingHint(RenderingHints.KEY_FRACTIONALMETRICS,RenderingHints.VALUE_FRACTIONALMETRICS_ON);
    _g2d.setRenderingHint(RenderingHints.KEY_RENDERING,RenderingHints.VALUE_RENDER_QUALITY);
    logger.log(ILogger.INFORMATION,Messages.getString("String_Node_Str",new Object[]{_g2d},getULocale()));
  }
 else   if (sProperty.equals(IDeviceRenderer.DPI_RESOLUTION)) {
    getDisplayServer().setDpiResolution(((Integer)oValue).intValue());
  }
}
Program: 75863
Project: 75863
Buggy source:
public void drawPolygon(PolygonRenderEvent pre) throws ChartException {
  final LineAttributes lia=pre.getOutline();
  if (!validateLineAttributes(pre.getSource(),lia)) {
    return;
  }
  final Color cFG=(Color)validateEdgeColor(lia.getColor(),pre.getBackground(),_ids);
  if (cFG == null || cFG.getAlpha() == 0) {
    return;
  }
  final Location[] la=pre.getPoints();
  final int[][] i2a=getCoordinatesAsInts(la);
  Stroke sPrevious=null;
  final Stroke sCurrent=getCachedStroke(lia);
  if (sCurrent != null) {
    sPrevious=_g2d.getStroke();
    _g2d.setStroke(sCurrent);
  }
  _g2d.setColor(cFG);
  _g2d.draw(new Polygon(i2a[0],i2a[1],la.length));
  if (sPrevious != null) {
    _g2d.setStroke(sPrevious);
  }
}

Fixed version (ground truth):
public void drawPolygon(PolygonRenderEvent pre) throws ChartException {
  iv.modifyEvent(pre);
  final LineAttributes lia=pre.getOutline();
  if (!validateLineAttributes(pre.getSource(),lia)) {
    return;
  }
  final Color cFG=(Color)validateEdgeColor(lia.getColor(),pre.getBackground(),_ids);
  if (cFG == null || cFG.getAlpha() == 0) {
    return;
  }
  final Location[] la=pre.getPoints();
  final int[][] i2a=getCoordinatesAsInts(la);
  Stroke sPrevious=null;
  final Stroke sCurrent=getCachedStroke(lia);
  if (sCurrent != null) {
    sPrevious=_g2d.getStroke();
    _g2d.setStroke(sCurrent);
  }
  _g2d.setColor(cFG);
  _g2d.draw(new Polygon(i2a[0],i2a[1],la.length));
  if (sPrevious != null) {
    _g2d.setStroke(sPrevious);
  }
}
Program: 75866
Project: 75866
Buggy source:
public void defineCube(CubeHandle cubeHandle) throws BirtException {
  int mode=this.sessionContext.getDataEngineContext().getMode();
  try {
    CubeMaterializer cubeMaterializer=null;
    if (mode == DataEngineContext.DIRECT_PRESENTATION) {
      cubeMaterializer=createCubeMaterializer(cubeHandle);
      createCube((TabularCubeHandle)cubeHandle,cubeMaterializer);
    }
 else     if (mode == DataEngineContext.MODE_GENERATION) {
      cubeMaterializer=createCubeMaterializer(cubeHandle);
      createCube((TabularCubeHandle)cubeHandle,cubeMaterializer);
      cubeMaterializer.saveCubeToReportDocument(cubeHandle.getQualifiedName(),this.sessionContext.getDocumentWriter(),null);
    }
  }
 catch (  Exception e) {
    throw new DataException(e.getLocalizedMessage());
  }
}

Fixed version (ground truth):
public void defineCube(CubeHandle cubeHandle) throws BirtException {
  int mode=this.sessionContext.getDataEngineContext().getMode();
  try {
    CubeMaterializer cubeMaterializer=null;
    if (mode == DataEngineContext.DIRECT_PRESENTATION) {
      cubeMaterializer=createCubeMaterializer(cubeHandle);
      createCube((TabularCubeHandle)cubeHandle,cubeMaterializer);
      cubeMaterializer.close();
    }
 else     if (mode == DataEngineContext.MODE_GENERATION) {
      cubeMaterializer=createCubeMaterializer(cubeHandle);
      createCube((TabularCubeHandle)cubeHandle,cubeMaterializer);
      cubeMaterializer.saveCubeToReportDocument(cubeHandle.getQualifiedName(),this.sessionContext.getDocumentWriter(),null);
      cubeMaterializer.close();
    }
  }
 catch (  Exception e) {
    throw new DataException(e.getLocalizedMessage());
  }
}
Program: 75867
Project: 75867
Buggy source:
/** 
 * @param cubeName
 * @return
 * @throws IOException
 * @throws DataException
 */
private ICube loadCube(CubeQueryExecutor executor) throws DataException, IOException {
  ICube cube=null;
  IDocumentManager documentManager;
  documentManager=getDocumentManager(executor);
  cube=CubeQueryExecutorHelper.loadCube(executor.getCubeQueryDefinition().getName(),documentManager,new StopSign());
  return cube;
}

Fixed version (ground truth):
/** 
 * @param cubeName
 * @return
 * @throws IOException
 * @throws DataException
 */
private ICube loadCube(IDocumentManager documentManager,CubeQueryExecutor executor) throws DataException, IOException {
  ICube cube=null;
  cube=CubeQueryExecutorHelper.loadCube(executor.getCubeQueryDefinition().getName(),documentManager,new StopSign());
  return cube;
}
Program: 75868
Project: 75868
Buggy source:
protected void perform(boolean undo){
  boolean doAdd=(undo && !isAdd || !undo && isAdd);
  if (doAdd) {
    list.add(listRef.getIndex(),value);
    if (listRef.getDepth() == 1) {
      CachedMemberRef memberRef=new CachedMemberRef(listRef.getPropDefn(),listRef.getIndex());
      Structure.StructureContext structContext=new Structure.StructureContext(element,memberRef);
      ((Structure)value).setContext(structContext);
    }
 else {
      Structure.StructureContext structContext=new Structure.StructureContext(element,listRef.getPropDefn().getName());
      ((Structure)value).setContext(structContext);
    }
  }
 else {
    list.remove(listRef.getIndex());
  }
}

Fixed version (ground truth):
protected void perform(boolean undo){
  boolean doAdd=(undo && !isAdd || !undo && isAdd);
  if (doAdd) {
    list.add(listRef.getIndex(),value);
    IPropertyDefn propDefn=listRef.getPropDefn();
    if (listRef.getDepth() == 1 && propDefn.isList() && propDefn.getStructDefn() != null) {
      CachedMemberRef memberRef=new CachedMemberRef(listRef.getPropDefn(),listRef.getIndex());
      Structure.StructureContext structContext=new Structure.StructureContext(element,memberRef);
      ((Structure)value).setContext(structContext);
    }
 else {
      Structure.StructureContext structContext=new Structure.StructureContext(element,listRef.getPropDefn().getName());
      ((Structure)value).setContext(structContext);
    }
  }
 else {
    list.remove(listRef.getIndex());
  }
}
Program: 75870
Project: 75870
Buggy source:
public void buildStyle(IContent element,StringBuffer styleBuffer){
  IStyle style;
  if (isEmbeddable) {
    style=element.getStyle();
  }
 else {
    style=element.getInlineStyle();
  }
  AttributeBuilder.buildStyle(styleBuffer,style,parentEmitter);
  AttributeBuilder.checkHyperlinkTextDecoration(element.getComputedStyle(),styleBuffer);
}

Fixed version (ground truth):
public void buildStyle(IContent element,StringBuffer styleBuffer){
  buildSimpleStyle(element,styleBuffer);
  AttributeBuilder.checkHyperlinkTextDecoration(element.getComputedStyle(),styleBuffer);
}
Program: 75872
Project: 75872
Buggy source:
/** 
 * Build the style of foreign content.
 */
public void buildForeignStyle(IForeignContent foreign,StringBuffer styleBuffer,int display,String url){
  IStyle style=foreign.getStyle();
  handleShrink(display,style,foreign.getHeight(),foreign.getWidth(),styleBuffer);
  if (url != null) {
    setDisplayProperty(display,HTMLEmitterUtil.DISPLAY_BLOCK | HTMLEmitterUtil.DISPLAY_INLINE_BLOCK,styleBuffer);
  }
 else {
    setDisplayProperty(display,HTMLEmitterUtil.DISPLAY_INLINE_BLOCK,styleBuffer);
  }
  String textAlign=foreign.getComputedStyle().getTextAlign();
  if (textAlign != null) {
    styleBuffer.append("String_Node_Str");
    styleBuffer.append(textAlign);
    styleBuffer.append("String_Node_Str");
  }
  buildStyle(foreign,styleBuffer);
  AttributeBuilder.checkHyperlinkTextDecoration(foreign.getComputedStyle(),styleBuffer);
}

Fixed version (ground truth):
/** 
 * Build the style of foreign content.
 */
public void buildForeignStyle(IForeignContent foreign,StringBuffer styleBuffer,int display,String url){
  IStyle style=foreign.getStyle();
  handleShrink(display,style,foreign.getHeight(),foreign.getWidth(),styleBuffer);
  if (url != null) {
    setDisplayProperty(display,HTMLEmitterUtil.DISPLAY_BLOCK | HTMLEmitterUtil.DISPLAY_INLINE_BLOCK,styleBuffer);
  }
 else {
    setDisplayProperty(display,HTMLEmitterUtil.DISPLAY_INLINE_BLOCK,styleBuffer);
  }
  String textAlign=foreign.getComputedStyle().getTextAlign();
  if (textAlign != null) {
    styleBuffer.append("String_Node_Str");
    styleBuffer.append(textAlign);
    styleBuffer.append("String_Node_Str");
  }
  buildSimpleStyle(foreign,styleBuffer);
  AttributeBuilder.checkHyperlinkTextDecoration(foreign.getComputedStyle(),styleBuffer);
}
Program: 75873
Project: 75873
Buggy source:
/** 
 * Build the style of text content.
 */
public void buildTextStyle(ITextContent text,StringBuffer styleBuffer,int display,String url){
  IStyle style=text.getStyle();
  handleShrink(display,style,text.getHeight(),text.getWidth(),styleBuffer);
  if (url != null) {
    setDisplayProperty(display,HTMLEmitterUtil.DISPLAY_BLOCK | HTMLEmitterUtil.DISPLAY_INLINE_BLOCK,styleBuffer);
  }
 else {
    setDisplayProperty(display,HTMLEmitterUtil.DISPLAY_INLINE_BLOCK,styleBuffer);
  }
  String textAlign=text.getComputedStyle().getTextAlign();
  if (textAlign != null) {
    styleBuffer.append("String_Node_Str");
    styleBuffer.append(textAlign);
    styleBuffer.append("String_Node_Str");
  }
  buildStyle(text,styleBuffer);
  AttributeBuilder.checkHyperlinkTextDecoration(text.getComputedStyle(),styleBuffer);
}

Fixed version (ground truth):
/** 
 * Build the style of text content.
 */
public void buildTextStyle(ITextContent text,StringBuffer styleBuffer,int display,String url){
  IStyle style=text.getStyle();
  handleShrink(display,style,text.getHeight(),text.getWidth(),styleBuffer);
  if (url != null) {
    setDisplayProperty(display,HTMLEmitterUtil.DISPLAY_BLOCK | HTMLEmitterUtil.DISPLAY_INLINE_BLOCK,styleBuffer);
  }
 else {
    setDisplayProperty(display,HTMLEmitterUtil.DISPLAY_INLINE_BLOCK,styleBuffer);
  }
  String textAlign=text.getComputedStyle().getTextAlign();
  if (textAlign != null) {
    styleBuffer.append("String_Node_Str");
    styleBuffer.append(textAlign);
    styleBuffer.append("String_Node_Str");
  }
  buildSimpleStyle(text,styleBuffer);
  AttributeBuilder.checkHyperlinkTextDecoration(text.getComputedStyle(),styleBuffer);
}
Program: 75876
Project: 75876
Buggy source:
/** 
 * Creates a PdfAction.
 * @param hyperlink the hyperlink.
 * @param bookmark the bookmark.
 * @param target if target equals "_blank", the target will be opened in a new window, else the target will be opened in the current window.
 * @return the created PdfAction.
 */
private PdfAction createPdfAction(String hyperlink,String bookmark,String target,int type){
  if ("String_Node_Str".equalsIgnoreCase(target)) {
    return new PdfAction(hyperlink);
  }
 else {
    if (type == IHyperlinkAction.ACTION_BOOKMARK) {
      return PdfAction.gotoLocalPage(bookmark,false);
    }
 else {
      return PdfAction.gotoRemotePage(hyperlink,bookmark,false,false);
    }
  }
}

Fixed version (ground truth):
/** 
 * Creates a PdfAction.
 * @param hyperlink the hyperlink.
 * @param bookmark the bookmark.
 * @param target if target equals "_blank", the target will be opened in a new window, else the target will be opened in the current window.
 * @return the created PdfAction.
 */
private PdfAction createPdfAction(String hyperlink,String bookmark,String target,int type){
  if ("String_Node_Str".equalsIgnoreCase(target) || "String_Node_Str".equalsIgnoreCase(target) || "String_Node_Str".equalsIgnoreCase(target)|| "String_Node_Str".equalsIgnoreCase(target)) {
    return new PdfAction(hyperlink);
  }
 else {
    if (type == IHyperlinkAction.ACTION_BOOKMARK) {
      return PdfAction.gotoLocalPage(bookmark,false);
    }
 else {
      return PdfAction.gotoRemotePage(hyperlink,bookmark,false,false);
    }
  }
}
Program: 75877
Project: 75877
Buggy source:
public static IDesignElement getElement(org.eclipse.birt.report.model.api.simpleapi.IDesignElement element){
  if (element == null)   return null;
  if (element instanceof IReportDesign)   return new ReportDesign((IReportDesign)element);
  if (element instanceof IDataItem)   return new DataItem((IDataItem)element);
  if (element instanceof IGrid)   return new Grid((IGrid)element);
  if (element instanceof IImage)   return new Image((IImage)element);
  if (element instanceof ILabel)   return new Label((ILabel)element);
  if (element instanceof IList)   return new List((IList)element);
  if (element instanceof ITable)   return new Table((ITable)element);
  if (element instanceof IDynamicText)   return new DynamicText((IDynamicText)element);
  if (element instanceof ITextItem)   return new TextItem((ITextItem)element);
  return new DesignElement(element);
}

Fixed version (ground truth):
public static IDesignElement getElement(org.eclipse.birt.report.model.api.simpleapi.IDesignElement element){
  if (element == null)   return null;
  if (element instanceof IReportDesign)   return new ReportDesign((IReportDesign)element);
  if (element instanceof IDataItem)   return new DataItem((IDataItem)element);
  if (element instanceof IGrid)   return new Grid((IGrid)element);
  if (element instanceof IImage)   return new Image((IImage)element);
  if (element instanceof ILabel)   return new Label((ILabel)element);
  if (element instanceof IList)   return new List((IList)element);
  if (element instanceof ITable)   return new Table((ITable)element);
  if (element instanceof IDynamicText)   return new DynamicText((IDynamicText)element);
  if (element instanceof ITextItem)   return new TextItem((ITextItem)element);
  if (element instanceof IReportItem)   return new ReportItem((IReportItem)element);
  if (element instanceof IReportElement)   return new ReportElement((IReportElement)element);
  return new DesignElement(element);
}
Program: 75878
Project: 75878
Buggy source:
public DataItem(org.eclipse.birt.report.model.api.simpleapi.IDataItem dataItem){
  super(null);
  designElementImpl=dataItem;
}

Fixed version (ground truth):
public DataItem(org.eclipse.birt.report.model.api.simpleapi.IDataItem dataItem){
  super(dataItem);
}
Program: 75879
Project: 75879
Buggy source:
public DynamicText(org.eclipse.birt.report.model.api.simpleapi.IDynamicText dynamicTextImpl){
  super(null);
  designElementImpl=dynamicTextImpl;
}

Fixed version (ground truth):
public DynamicText(org.eclipse.birt.report.model.api.simpleapi.IDynamicText dynamicTextImpl){
  super(dynamicTextImpl);
}
Program: 75880
Project: 75880
Buggy source:
public Grid(org.eclipse.birt.report.model.api.simpleapi.IGrid gridImpl){
  super(null);
  designElementImpl=gridImpl;
}

Fixed version (ground truth):
public Grid(org.eclipse.birt.report.model.api.simpleapi.IGrid gridImpl){
  super(gridImpl);
}
Program: 75881
Project: 75881
Buggy source:
public Image(org.eclipse.birt.report.model.api.simpleapi.IImage imageImpl){
  super(null);
  designElementImpl=imageImpl;
}

Fixed version (ground truth):
public Image(org.eclipse.birt.report.model.api.simpleapi.IImage imageImpl){
  super(imageImpl);
}
Program: 75882
Project: 75882
Buggy source:
public Label(org.eclipse.birt.report.model.api.simpleapi.ILabel labelImpl){
  super(null);
  designElementImpl=labelImpl;
}

Fixed version (ground truth):
public Label(org.eclipse.birt.report.model.api.simpleapi.ILabel labelImpl){
  super(labelImpl);
}
Program: 75883
Project: 75883
Buggy source:
public IReportElement getReportElement(String name){
  org.eclipse.birt.report.model.api.simpleapi.IReportElement tmpElement=((org.eclipse.birt.report.model.api.simpleapi.IReportDesign)designElementImpl).getReportElement(name);
  return (IReportElement)ElementUtil.getElement(tmpElement);
}

Fixed version (ground truth):
public IReportElement getReportElement(String name){
  org.eclipse.birt.report.model.api.simpleapi.IReportElement tmpElement=((org.eclipse.birt.report.model.api.simpleapi.IReportDesign)designElementImpl).getReportElement(name);
  IDesignElement retElement=ElementUtil.getElement(tmpElement);
  if (retElement instanceof IReportElement)   return (IReportElement)retElement;
  return null;
}