nus-yam/ex-repair huggingface dataset:
Program: 36262
Project: 36262
Buggy source:
/** 
 * Invokes native check whether a change count on the general pasteboard is different than when we set it. The different count value means the current owner lost pasteboard ownership and someone else put data on the clipboard.
 * @since 1.7
 */
public native void checkPasteboard();

Fixed version (ground truth):
/** 
 * Invokes native check whether a change count on the general pasteboard is different than when we set it. The different count value means the current owner lost pasteboard ownership and someone else put data on the clipboard.
 * @since 1.7
 */
native void checkPasteboard();
Program: 36263
Project: 36263
Buggy source:
public long getID(){
  return 0;
}

Fixed version (ground truth):
@Override public long getID(){
  return 0;
}
Program: 36264
Project: 36264
Buggy source:
protected native byte[] getClipboardData(long format) throws IOException ;

Fixed version (ground truth):
@Override protected native byte[] getClipboardData(long format) throws IOException ;
Program: 36265
Project: 36265
Buggy source:
protected native long[] getClipboardFormats();

Fixed version (ground truth):
@Override protected native long[] getClipboardFormats();
Program: 36266
Project: 36266
Buggy source:
protected void clearNativeContext(){
}

Fixed version (ground truth):
@Override protected void clearNativeContext(){
}
Program: 36267
Project: 36267
Buggy source:
/** 
 * Clones the <code>PageFormat</code> argument and alters the clone to describe a default page size and orientation.
 * @param page the <code>PageFormat</code> to be cloned and altered
 * @return clone of <code>page</code>, altered to describe a default<code>PageFormat</code>.
 */
public PageFormat defaultPage(PageFormat page){
  PageFormat newPage=(PageFormat)page.clone();
  getDefaultPage(newPage);
  return newPage;
}

Fixed version (ground truth):
/** 
 * Clones the <code>PageFormat</code> argument and alters the clone to describe a default page size and orientation.
 * @param page the <code>PageFormat</code> to be cloned and altered
 * @return clone of <code>page</code>, altered to describe a default<code>PageFormat</code>.
 */
@Override public PageFormat defaultPage(PageFormat page){
  PageFormat newPage=(PageFormat)page.clone();
  getDefaultPage(newPage);
  return newPage;
}
Program: 36268
Project: 36268
Buggy source:
/** 
 * validate the paper size against the current printer.
 */
protected native void validatePaper(Paper origPaper,Paper newPaper);

Fixed version (ground truth):
/** 
 * validate the paper size against the current printer.
 */
@Override protected native void validatePaper(Paper origPaper,Paper newPaper);
Program: 36269
Project: 36269
Buggy source:
/** 
 * Called by the print() method at the start of a print job.
 */
protected void startDoc() throws PrinterException {
  throw new PrinterException(sShouldNotReachHere);
}

Fixed version (ground truth):
/** 
 * Called by the print() method at the start of a print job.
 */
@Override protected void startDoc() throws PrinterException {
  throw new PrinterException(sShouldNotReachHere);
}
Program: 36270
Project: 36270
Buggy source:
/** 
 * Displays a dialog that allows modification of a <code>PageFormat</code> instance. The <code>page</code> argument is used to initialize controls in the page setup dialog. If the user cancels the dialog then this method returns the original <code>page</code> object unmodified. If the user okays the dialog then this method returns a new <code>PageFormat</code> object with the indicated changes. In either case, the original <code>page</code> object is not modified.
 * @param page the default <code>PageFormat</code> presented to theuser for modification
 * @return    the original <code>page</code> object if the dialogis cancelled; a new <code>PageFormat</code> object containing the format indicated by the user if the dialog is acknowledged.
 * @exception HeadlessException if GraphicsEnvironment.isHeadless()returns true.
 * @see java.awt.GraphicsEnvironment#isHeadless
 * @since     1.2
 */
public PageFormat pageDialog(PageFormat page) throws HeadlessException {
  if (GraphicsEnvironment.isHeadless()) {
    throw new HeadlessException();
  }
  if (noDefaultPrinter) {
    return page;
  }
  if (getPrintService() instanceof StreamPrintService) {
    return super.pageDialog(page);
  }
  PageFormat pageClone=(PageFormat)page.clone();
  boolean doIt=pageSetup(pageClone,null);
  return doIt ? pageClone : page;
}

Fixed version (ground truth):
/** 
 * Displays a dialog that allows modification of a <code>PageFormat</code> instance. The <code>page</code> argument is used to initialize controls in the page setup dialog. If the user cancels the dialog then this method returns the original <code>page</code> object unmodified. If the user okays the dialog then this method returns a new <code>PageFormat</code> object with the indicated changes. In either case, the original <code>page</code> object is not modified.
 * @param page the default <code>PageFormat</code> presented to theuser for modification
 * @return    the original <code>page</code> object if the dialogis cancelled; a new <code>PageFormat</code> object containing the format indicated by the user if the dialog is acknowledged.
 * @exception HeadlessException if GraphicsEnvironment.isHeadless()returns true.
 * @see java.awt.GraphicsEnvironment#isHeadless
 * @since     1.2
 */
@Override public PageFormat pageDialog(PageFormat page) throws HeadlessException {
  if (GraphicsEnvironment.isHeadless()) {
    throw new HeadlessException();
  }
  if (noDefaultPrinter) {
    return page;
  }
  if (getPrintService() instanceof StreamPrintService) {
    return super.pageDialog(page);
  }
  PageFormat pageClone=(PageFormat)page.clone();
  boolean doIt=pageSetup(pageClone,null);
  return doIt ? pageClone : page;
}
Program: 36271
Project: 36271
Buggy source:
protected void setAttributes(PrintRequestAttributeSet attributes) throws PrinterException {
  super.setAttributes(attributes);
  if (attributes == null) {
    return;
  }
  NSPrintInfo nsPrintInfo=(NSPrintInfo)attributes.get(NSPrintInfo.class);
  if (nsPrintInfo != null) {
    fNSPrintInfo=nsPrintInfo.getValue();
  }
  PageRanges pageRangesAttr=(PageRanges)attributes.get(PageRanges.class);
  if (isSupportedValue(pageRangesAttr,attributes)) {
    SunPageSelection rangeSelect=(SunPageSelection)attributes.get(SunPageSelection.class);
    if (rangeSelect == null || rangeSelect == SunPageSelection.RANGE) {
      int[][] range=pageRangesAttr.getMembers();
      setPageRange(range[0][0] - 1,range[0][1] - 1);
    }
  }
}

Fixed version (ground truth):
@Override protected void setAttributes(PrintRequestAttributeSet attributes) throws PrinterException {
  super.setAttributes(attributes);
  if (attributes == null) {
    return;
  }
  NSPrintInfo nsPrintInfo=(NSPrintInfo)attributes.get(NSPrintInfo.class);
  if (nsPrintInfo != null) {
    fNSPrintInfo=nsPrintInfo.getValue();
  }
  PageRanges pageRangesAttr=(PageRanges)attributes.get(PageRanges.class);
  if (isSupportedValue(pageRangesAttr,attributes)) {
    SunPageSelection rangeSelect=(SunPageSelection)attributes.get(SunPageSelection.class);
    if (rangeSelect == null || rangeSelect == SunPageSelection.RANGE) {
      int[][] range=pageRangesAttr.getMembers();
      setPageRange(range[0][0] - 1,range[0][1] - 1);
    }
  }
}
Program: 36272
Project: 36272
Buggy source:
/** 
 * Called by the print() method at the end of a print job.
 */
protected void endDoc() throws PrinterException {
  throw new PrinterException(sShouldNotReachHere);
}

Fixed version (ground truth):
/** 
 * Called by the print() method at the end of a print job.
 */
@Override protected void endDoc() throws PrinterException {
  throw new PrinterException(sShouldNotReachHere);
}
Program: 36273
Project: 36273
Buggy source:
/** 
 * Must be obtained from the current printer. Value is in device pixels. Not adjusted for orientation of the paper.
 */
protected double getPhysicalPageHeight(Paper p){
  return 0;
}

Fixed version (ground truth):
/** 
 * Must be obtained from the current printer. Value is in device pixels. Not adjusted for orientation of the paper.
 */
@Override protected double getPhysicalPageHeight(Paper p){
  return 0;
}
Program: 36274
Project: 36274
Buggy source:
/** 
 * Must be obtained from the current printer. Value is in device pixels. Not adjusted for orientation of the paper.
 */
protected double getPhysicalPrintableY(Paper p){
  return 0;
}

Fixed version (ground truth):
/** 
 * Must be obtained from the current printer. Value is in device pixels. Not adjusted for orientation of the paper.
 */
@Override protected double getPhysicalPrintableY(Paper p){
  return 0;
}
Program: 36275
Project: 36275
Buggy source:
/** 
 * Must be obtained from the current printer. Value is in device pixels. Not adjusted for orientation of the paper.
 */
protected double getPhysicalPrintableX(Paper p){
  return 0;
}

Fixed version (ground truth):
/** 
 * Must be obtained from the current printer. Value is in device pixels. Not adjusted for orientation of the paper.
 */
@Override protected double getPhysicalPrintableX(Paper p){
  return 0;
}
Program: 36276
Project: 36276
Buggy source:
/** 
 * Returns the resolution in dots per inch down the height of the page.
 */
protected double getYRes(){
  return 0;
}

Fixed version (ground truth):
/** 
 * Returns the resolution in dots per inch down the height of the page.
 */
@Override protected double getYRes(){
  return 0;
}
Program: 36277
Project: 36277
Buggy source:
/** 
 * Prints the contents of the array of ints, 'data' to the current page. The band is placed at the location (x, y) in device coordinates on the page. The width and height of the band is specified by the caller.
 */
protected void printBand(byte[] data,int x,int y,int width,int height) throws PrinterException {
  throw new PrinterException(sShouldNotReachHere);
}

Fixed version (ground truth):
/** 
 * Prints the contents of the array of ints, 'data' to the current page. The band is placed at the location (x, y) in device coordinates on the page. The width and height of the band is specified by the caller.
 */
@Override protected void printBand(byte[] data,int x,int y,int width,int height) throws PrinterException {
  throw new PrinterException(sShouldNotReachHere);
}
Program: 36278
Project: 36278
Buggy source:
/** 
 * Must be obtained from the current printer. Value is in device pixels. Not adjusted for orientation of the paper.
 */
protected double getPhysicalPrintableWidth(Paper p){
  return 0;
}

Fixed version (ground truth):
/** 
 * Must be obtained from the current printer. Value is in device pixels. Not adjusted for orientation of the paper.
 */
@Override protected double getPhysicalPrintableWidth(Paper p){
  return 0;
}
Program: 36279
Project: 36279
Buggy source:
/** 
 * Presents a dialog to the user for changing the properties of the print job. This method will display a native dialog if a native print service is selected, and user choice of printers will be restricted to these native print services. To present the cross platform print dialog for all services, including native ones instead use <code>printDialog(PrintRequestAttributeSet)</code>. <p> PrinterJob implementations which can use PrintService's will update the PrintService for this PrinterJob to reflect the new service selected by the user.
 * @return <code>true</code> if the user does not cancel the dialog;<code>false</code> otherwise.
 * @exception HeadlessException if GraphicsEnvironment.isHeadless()returns true.
 * @see java.awt.GraphicsEnvironment#isHeadless
 */
public boolean printDialog() throws HeadlessException {
  if (GraphicsEnvironment.isHeadless()) {
    throw new HeadlessException();
  }
  if (noDefaultPrinter) {
    return false;
  }
  if (attributes == null) {
    attributes=new HashPrintRequestAttributeSet();
  }
  if (getPrintService() instanceof StreamPrintService) {
    return super.printDialog(attributes);
  }
  return jobSetup(getPageable(),checkAllowedToPrintToFile());
}

Fixed version (ground truth):
/** 
 * Presents a dialog to the user for changing the properties of the print job. This method will display a native dialog if a native print service is selected, and user choice of printers will be restricted to these native print services. To present the cross platform print dialog for all services, including native ones instead use <code>printDialog(PrintRequestAttributeSet)</code>. <p> PrinterJob implementations which can use PrintService's will update the PrintService for this PrinterJob to reflect the new service selected by the user.
 * @return <code>true</code> if the user does not cancel the dialog;<code>false</code> otherwise.
 * @exception HeadlessException if GraphicsEnvironment.isHeadless()returns true.
 * @see java.awt.GraphicsEnvironment#isHeadless
 */
@Override public boolean printDialog() throws HeadlessException {
  if (GraphicsEnvironment.isHeadless()) {
    throw new HeadlessException();
  }
  if (noDefaultPrinter) {
    return false;
  }
  if (attributes == null) {
    attributes=new HashPrintRequestAttributeSet();
  }
  if (getPrintService() instanceof StreamPrintService) {
    return super.printDialog(attributes);
  }
  return jobSetup(getPageable(),checkAllowedToPrintToFile());
}
Program: 36281
Project: 36281
Buggy source:
protected native void abortDoc();

Fixed version (ground truth):
@Override protected native void abortDoc();
Program: 36282
Project: 36282
Buggy source:
/** 
 * Must be obtained from the current printer. Value is in device pixels. Not adjusted for orientation of the paper.
 */
protected double getPhysicalPageWidth(Paper p){
  return 0;
}

Fixed version (ground truth):
/** 
 * Must be obtained from the current printer. Value is in device pixels. Not adjusted for orientation of the paper.
 */
@Override protected double getPhysicalPageWidth(Paper p){
  return 0;
}
Program: 36283
Project: 36283
Buggy source:
/** 
 * Returns the resolution in dots per inch across the width of the page.
 */
protected double getXRes(){
  return 0;
}

Fixed version (ground truth):
/** 
 * Returns the resolution in dots per inch across the width of the page.
 */
@Override protected double getXRes(){
  return 0;
}
Program: 36284
Project: 36284
Buggy source:
protected void finalize(){
  if (fNSPrintInfo != -1) {
    dispose(fNSPrintInfo);
  }
}

Fixed version (ground truth):
@Override protected void finalize(){
  if (fNSPrintInfo != -1) {
    dispose(fNSPrintInfo);
  }
}
Program: 36285
Project: 36285
Buggy source:
/** 
 * Must be obtained from the current printer. Value is in device pixels. Not adjusted for orientation of the paper.
 */
protected double getPhysicalPrintableHeight(Paper p){
  return 0;
}

Fixed version (ground truth):
/** 
 * Must be obtained from the current printer. Value is in device pixels. Not adjusted for orientation of the paper.
 */
@Override protected double getPhysicalPrintableHeight(Paper p){
  return 0;
}
Program: 36286
Project: 36286
Buggy source:
/** 
 * End a page.
 */
protected void endPage(PageFormat format,Printable painter,int index) throws PrinterException {
  throw new PrinterException(sShouldNotReachHere);
}

Fixed version (ground truth):
/** 
 * End a page.
 */
@Override protected void endPage(PageFormat format,Printable painter,int index) throws PrinterException {
  throw new PrinterException(sShouldNotReachHere);
}
Program: 36287
Project: 36287
Buggy source:
protected native boolean showDialog();

Fixed version (ground truth):
@Override protected native boolean showDialog();
Program: 36288
Project: 36288
Buggy source:
protected native boolean showDialog();

Fixed version (ground truth):
@Override protected native boolean showDialog();
Program: 36289
Project: 36289
Buggy source:
public static SurfaceData createData(PageFormat pf,long context){
  return new CPrinterSurfaceData(CPrinterGraphicsConfig.getConfig(pf),context);
}

Fixed version (ground truth):
static SurfaceData createData(PageFormat pf,long context){
  return new CPrinterSurfaceData(CPrinterGraphicsConfig.getConfig(pf),context);
}
Program: 36290
Project: 36290
Buggy source:
public CPrinterSurfaceData(GraphicsConfiguration gc,long context){
  super(IntRgbPQ,gc.getColorModel(),gc,gc.getBounds());
  initOps(context,this.fGraphicsStates,this.fGraphicsStatesObject,gc.getBounds().width,gc.getBounds().height);
}

Fixed version (ground truth):
private CPrinterSurfaceData(GraphicsConfiguration gc,long context){
  super(IntRgbPQ,gc.getColorModel(),gc,gc.getBounds());
  initOps(context,this.fGraphicsStates,this.fGraphicsStatesObject,gc.getBounds().width,gc.getBounds().height);
}
Program: 36291
Project: 36291
Buggy source:
public native void declareTypes(long[] formats,SunClipboard newOwner);

Fixed version (ground truth):
private native void declareTypes(long[] formats,SunClipboard newOwner);
Program: 36292
Project: 36292
Buggy source:
protected void unregisterClipboardViewerChecked(){
}

Fixed version (ground truth):
@Override protected void unregisterClipboardViewerChecked(){
}
Program: 36293
Project: 36293
Buggy source:
private void notifyLostOwnership(){
  lostOwnershipImpl();
}

Fixed version (ground truth):
/** 
 * Native Callbacks 
 */
private void notifyLostOwnership(){
  lostOwnershipImpl();
}
Program: 36294
Project: 36294
Buggy source:
protected void registerClipboardViewerChecked(){
}

Fixed version (ground truth):
@Override protected void registerClipboardViewerChecked(){
}
Program: 36295
Project: 36295
Buggy source:
protected void setContentsNative(Transferable contents){
  DataTransferer dataTransferer=DataTransferer.getInstance();
  long[] formatArray=dataTransferer.getFormatsForTransferableAsArray(contents,flavorMap);
  declareTypes(formatArray,this);
  Map<Long,DataFlavor> formatMap=dataTransferer.getFormatsForTransferable(contents,flavorMap);
  for (  Map.Entry<Long,DataFlavor> entry : formatMap.entrySet()) {
    long format=entry.getKey();
    DataFlavor flavor=entry.getValue();
    try {
      byte[] bytes=DataTransferer.getInstance().translateTransferable(contents,flavor,format);
      setData(bytes,format);
    }
 catch (    IOException e) {
      if (!(flavor.isMimeTypeEqual(DataFlavor.javaJVMLocalObjectMimeType) && e instanceof NotSerializableException)) {
        e.printStackTrace();
      }
    }
  }
  notifyChanged();
}

Fixed version (ground truth):
@Override protected void setContentsNative(Transferable contents){
  DataTransferer dataTransferer=DataTransferer.getInstance();
  long[] formatArray=dataTransferer.getFormatsForTransferableAsArray(contents,flavorMap);
  declareTypes(formatArray,this);
  Map<Long,DataFlavor> formatMap=dataTransferer.getFormatsForTransferable(contents,flavorMap);
  for (  Map.Entry<Long,DataFlavor> entry : formatMap.entrySet()) {
    long format=entry.getKey();
    DataFlavor flavor=entry.getValue();
    try {
      byte[] bytes=DataTransferer.getInstance().translateTransferable(contents,flavor,format);
      setData(bytes,format);
    }
 catch (    IOException e) {
      if (!(flavor.isMimeTypeEqual(DataFlavor.javaJVMLocalObjectMimeType) && e instanceof NotSerializableException)) {
        e.printStackTrace();
      }
    }
  }
  notifyChanged();
}
Program: 36296
Project: 36296
Buggy source:
public native void setData(byte[] data,long format);

Fixed version (ground truth):
private native void setData(byte[] data,long format);
Program: 36297
Project: 36297
Buggy source:
/** 
 * Invokes native check whether a change count on the general pasteboard is different than when we set it. The different count value means the current owner lost pasteboard ownership and someone else put data on the clipboard.
 * @since 1.7
 */
public native void checkPasteboard();

Fixed version (ground truth):
/** 
 * Invokes native check whether a change count on the general pasteboard is different than when we set it. The different count value means the current owner lost pasteboard ownership and someone else put data on the clipboard.
 * @since 1.7
 */
native void checkPasteboard();
Program: 36298
Project: 36298
Buggy source:
public long getID(){
  return 0;
}

Fixed version (ground truth):
@Override public long getID(){
  return 0;
}
Program: 36299
Project: 36299
Buggy source:
protected native byte[] getClipboardData(long format) throws IOException ;

Fixed version (ground truth):
@Override protected native byte[] getClipboardData(long format) throws IOException ;
Program: 36300
Project: 36300
Buggy source:
protected native long[] getClipboardFormats();

Fixed version (ground truth):
@Override protected native long[] getClipboardFormats();
Program: 36301
Project: 36301
Buggy source:
protected void clearNativeContext(){
}

Fixed version (ground truth):
@Override protected void clearNativeContext(){
}
Program: 36302
Project: 36302
Buggy source:
/** 
 * Clones the <code>PageFormat</code> argument and alters the clone to describe a default page size and orientation.
 * @param page the <code>PageFormat</code> to be cloned and altered
 * @return clone of <code>page</code>, altered to describe a default<code>PageFormat</code>.
 */
public PageFormat defaultPage(PageFormat page){
  PageFormat newPage=(PageFormat)page.clone();
  getDefaultPage(newPage);
  return newPage;
}

Fixed version (ground truth):
/** 
 * Clones the <code>PageFormat</code> argument and alters the clone to describe a default page size and orientation.
 * @param page the <code>PageFormat</code> to be cloned and altered
 * @return clone of <code>page</code>, altered to describe a default<code>PageFormat</code>.
 */
@Override public PageFormat defaultPage(PageFormat page){
  PageFormat newPage=(PageFormat)page.clone();
  getDefaultPage(newPage);
  return newPage;
}
Program: 36303
Project: 36303
Buggy source:
/** 
 * validate the paper size against the current printer.
 */
protected native void validatePaper(Paper origPaper,Paper newPaper);

Fixed version (ground truth):
/** 
 * validate the paper size against the current printer.
 */
@Override protected native void validatePaper(Paper origPaper,Paper newPaper);
Program: 36304
Project: 36304
Buggy source:
/** 
 * Called by the print() method at the start of a print job.
 */
protected void startDoc() throws PrinterException {
  throw new PrinterException(sShouldNotReachHere);
}

Fixed version (ground truth):
/** 
 * Called by the print() method at the start of a print job.
 */
@Override protected void startDoc() throws PrinterException {
  throw new PrinterException(sShouldNotReachHere);
}
Program: 36305
Project: 36305
Buggy source:
/** 
 * Displays a dialog that allows modification of a <code>PageFormat</code> instance. The <code>page</code> argument is used to initialize controls in the page setup dialog. If the user cancels the dialog then this method returns the original <code>page</code> object unmodified. If the user okays the dialog then this method returns a new <code>PageFormat</code> object with the indicated changes. In either case, the original <code>page</code> object is not modified.
 * @param page the default <code>PageFormat</code> presented to theuser for modification
 * @return    the original <code>page</code> object if the dialogis cancelled; a new <code>PageFormat</code> object containing the format indicated by the user if the dialog is acknowledged.
 * @exception HeadlessException if GraphicsEnvironment.isHeadless()returns true.
 * @see java.awt.GraphicsEnvironment#isHeadless
 * @since     1.2
 */
public PageFormat pageDialog(PageFormat page) throws HeadlessException {
  if (GraphicsEnvironment.isHeadless()) {
    throw new HeadlessException();
  }
  if (noDefaultPrinter) {
    return page;
  }
  if (getPrintService() instanceof StreamPrintService) {
    return super.pageDialog(page);
  }
  PageFormat pageClone=(PageFormat)page.clone();
  boolean doIt=pageSetup(pageClone,null);
  return doIt ? pageClone : page;
}

Fixed version (ground truth):
/** 
 * Displays a dialog that allows modification of a <code>PageFormat</code> instance. The <code>page</code> argument is used to initialize controls in the page setup dialog. If the user cancels the dialog then this method returns the original <code>page</code> object unmodified. If the user okays the dialog then this method returns a new <code>PageFormat</code> object with the indicated changes. In either case, the original <code>page</code> object is not modified.
 * @param page the default <code>PageFormat</code> presented to theuser for modification
 * @return    the original <code>page</code> object if the dialogis cancelled; a new <code>PageFormat</code> object containing the format indicated by the user if the dialog is acknowledged.
 * @exception HeadlessException if GraphicsEnvironment.isHeadless()returns true.
 * @see java.awt.GraphicsEnvironment#isHeadless
 * @since     1.2
 */
@Override public PageFormat pageDialog(PageFormat page) throws HeadlessException {
  if (GraphicsEnvironment.isHeadless()) {
    throw new HeadlessException();
  }
  if (noDefaultPrinter) {
    return page;
  }
  if (getPrintService() instanceof StreamPrintService) {
    return super.pageDialog(page);
  }
  PageFormat pageClone=(PageFormat)page.clone();
  boolean doIt=pageSetup(pageClone,null);
  return doIt ? pageClone : page;
}
Program: 36306
Project: 36306
Buggy source:
protected void setAttributes(PrintRequestAttributeSet attributes) throws PrinterException {
  super.setAttributes(attributes);
  if (attributes == null) {
    return;
  }
  NSPrintInfo nsPrintInfo=(NSPrintInfo)attributes.get(NSPrintInfo.class);
  if (nsPrintInfo != null) {
    fNSPrintInfo=nsPrintInfo.getValue();
  }
  PageRanges pageRangesAttr=(PageRanges)attributes.get(PageRanges.class);
  if (isSupportedValue(pageRangesAttr,attributes)) {
    SunPageSelection rangeSelect=(SunPageSelection)attributes.get(SunPageSelection.class);
    if (rangeSelect == null || rangeSelect == SunPageSelection.RANGE) {
      int[][] range=pageRangesAttr.getMembers();
      setPageRange(range[0][0] - 1,range[0][1] - 1);
    }
  }
}

Fixed version (ground truth):
@Override protected void setAttributes(PrintRequestAttributeSet attributes) throws PrinterException {
  super.setAttributes(attributes);
  if (attributes == null) {
    return;
  }
  NSPrintInfo nsPrintInfo=(NSPrintInfo)attributes.get(NSPrintInfo.class);
  if (nsPrintInfo != null) {
    fNSPrintInfo=nsPrintInfo.getValue();
  }
  PageRanges pageRangesAttr=(PageRanges)attributes.get(PageRanges.class);
  if (isSupportedValue(pageRangesAttr,attributes)) {
    SunPageSelection rangeSelect=(SunPageSelection)attributes.get(SunPageSelection.class);
    if (rangeSelect == null || rangeSelect == SunPageSelection.RANGE) {
      int[][] range=pageRangesAttr.getMembers();
      setPageRange(range[0][0] - 1,range[0][1] - 1);
    }
  }
}
Program: 36307
Project: 36307
Buggy source:
/** 
 * Called by the print() method at the end of a print job.
 */
protected void endDoc() throws PrinterException {
  throw new PrinterException(sShouldNotReachHere);
}

Fixed version (ground truth):
/** 
 * Called by the print() method at the end of a print job.
 */
@Override protected void endDoc() throws PrinterException {
  throw new PrinterException(sShouldNotReachHere);
}
Program: 36308
Project: 36308
Buggy source:
/** 
 * Must be obtained from the current printer. Value is in device pixels. Not adjusted for orientation of the paper.
 */
protected double getPhysicalPageHeight(Paper p){
  return 0;
}

Fixed version (ground truth):
/** 
 * Must be obtained from the current printer. Value is in device pixels. Not adjusted for orientation of the paper.
 */
@Override protected double getPhysicalPageHeight(Paper p){
  return 0;
}
Program: 36309
Project: 36309
Buggy source:
/** 
 * Must be obtained from the current printer. Value is in device pixels. Not adjusted for orientation of the paper.
 */
protected double getPhysicalPrintableY(Paper p){
  return 0;
}

Fixed version (ground truth):
/** 
 * Must be obtained from the current printer. Value is in device pixels. Not adjusted for orientation of the paper.
 */
@Override protected double getPhysicalPrintableY(Paper p){
  return 0;
}
Program: 36310
Project: 36310
Buggy source:
/** 
 * Must be obtained from the current printer. Value is in device pixels. Not adjusted for orientation of the paper.
 */
protected double getPhysicalPrintableX(Paper p){
  return 0;
}

Fixed version (ground truth):
/** 
 * Must be obtained from the current printer. Value is in device pixels. Not adjusted for orientation of the paper.
 */
@Override protected double getPhysicalPrintableX(Paper p){
  return 0;
}
Program: 36311
Project: 36311
Buggy source:
/** 
 * Returns the resolution in dots per inch down the height of the page.
 */
protected double getYRes(){
  return 0;
}

Fixed version (ground truth):
/** 
 * Returns the resolution in dots per inch down the height of the page.
 */
@Override protected double getYRes(){
  return 0;
}
Program: 36312
Project: 36312
Buggy source:
/** 
 * Prints the contents of the array of ints, 'data' to the current page. The band is placed at the location (x, y) in device coordinates on the page. The width and height of the band is specified by the caller.
 */
protected void printBand(byte[] data,int x,int y,int width,int height) throws PrinterException {
  throw new PrinterException(sShouldNotReachHere);
}

Fixed version (ground truth):
/** 
 * Prints the contents of the array of ints, 'data' to the current page. The band is placed at the location (x, y) in device coordinates on the page. The width and height of the band is specified by the caller.
 */
@Override protected void printBand(byte[] data,int x,int y,int width,int height) throws PrinterException {
  throw new PrinterException(sShouldNotReachHere);
}
Program: 36313
Project: 36313
Buggy source:
/** 
 * Must be obtained from the current printer. Value is in device pixels. Not adjusted for orientation of the paper.
 */
protected double getPhysicalPrintableWidth(Paper p){
  return 0;
}

Fixed version (ground truth):
/** 
 * Must be obtained from the current printer. Value is in device pixels. Not adjusted for orientation of the paper.
 */
@Override protected double getPhysicalPrintableWidth(Paper p){
  return 0;
}
Program: 36314
Project: 36314
Buggy source:
/** 
 * Presents a dialog to the user for changing the properties of the print job. This method will display a native dialog if a native print service is selected, and user choice of printers will be restricted to these native print services. To present the cross platform print dialog for all services, including native ones instead use <code>printDialog(PrintRequestAttributeSet)</code>. <p> PrinterJob implementations which can use PrintService's will update the PrintService for this PrinterJob to reflect the new service selected by the user.
 * @return <code>true</code> if the user does not cancel the dialog;<code>false</code> otherwise.
 * @exception HeadlessException if GraphicsEnvironment.isHeadless()returns true.
 * @see java.awt.GraphicsEnvironment#isHeadless
 */
public boolean printDialog() throws HeadlessException {
  if (GraphicsEnvironment.isHeadless()) {
    throw new HeadlessException();
  }
  if (noDefaultPrinter) {
    return false;
  }
  if (attributes == null) {
    attributes=new HashPrintRequestAttributeSet();
  }
  if (getPrintService() instanceof StreamPrintService) {
    return super.printDialog(attributes);
  }
  return jobSetup(getPageable(),checkAllowedToPrintToFile());
}

Fixed version (ground truth):
/** 
 * Presents a dialog to the user for changing the properties of the print job. This method will display a native dialog if a native print service is selected, and user choice of printers will be restricted to these native print services. To present the cross platform print dialog for all services, including native ones instead use <code>printDialog(PrintRequestAttributeSet)</code>. <p> PrinterJob implementations which can use PrintService's will update the PrintService for this PrinterJob to reflect the new service selected by the user.
 * @return <code>true</code> if the user does not cancel the dialog;<code>false</code> otherwise.
 * @exception HeadlessException if GraphicsEnvironment.isHeadless()returns true.
 * @see java.awt.GraphicsEnvironment#isHeadless
 */
@Override public boolean printDialog() throws HeadlessException {
  if (GraphicsEnvironment.isHeadless()) {
    throw new HeadlessException();
  }
  if (noDefaultPrinter) {
    return false;
  }
  if (attributes == null) {
    attributes=new HashPrintRequestAttributeSet();
  }
  if (getPrintService() instanceof StreamPrintService) {
    return super.printDialog(attributes);
  }
  return jobSetup(getPageable(),checkAllowedToPrintToFile());
}
Program: 36316
Project: 36316
Buggy source:
protected native void abortDoc();

Fixed version (ground truth):
@Override protected native void abortDoc();
Program: 36317
Project: 36317
Buggy source:
/** 
 * Must be obtained from the current printer. Value is in device pixels. Not adjusted for orientation of the paper.
 */
protected double getPhysicalPageWidth(Paper p){
  return 0;
}

Fixed version (ground truth):
/** 
 * Must be obtained from the current printer. Value is in device pixels. Not adjusted for orientation of the paper.
 */
@Override protected double getPhysicalPageWidth(Paper p){
  return 0;
}
Program: 36318
Project: 36318
Buggy source:
/** 
 * Returns the resolution in dots per inch across the width of the page.
 */
protected double getXRes(){
  return 0;
}

Fixed version (ground truth):
/** 
 * Returns the resolution in dots per inch across the width of the page.
 */
@Override protected double getXRes(){
  return 0;
}
Program: 36319
Project: 36319
Buggy source:
protected void finalize(){
  if (fNSPrintInfo != -1) {
    dispose(fNSPrintInfo);
  }
}

Fixed version (ground truth):
@Override protected void finalize(){
  if (fNSPrintInfo != -1) {
    dispose(fNSPrintInfo);
  }
}
Program: 36320
Project: 36320
Buggy source:
/** 
 * Must be obtained from the current printer. Value is in device pixels. Not adjusted for orientation of the paper.
 */
protected double getPhysicalPrintableHeight(Paper p){
  return 0;
}

Fixed version (ground truth):
/** 
 * Must be obtained from the current printer. Value is in device pixels. Not adjusted for orientation of the paper.
 */
@Override protected double getPhysicalPrintableHeight(Paper p){
  return 0;
}
Program: 36321
Project: 36321
Buggy source:
/** 
 * End a page.
 */
protected void endPage(PageFormat format,Printable painter,int index) throws PrinterException {
  throw new PrinterException(sShouldNotReachHere);
}

Fixed version (ground truth):
/** 
 * End a page.
 */
@Override protected void endPage(PageFormat format,Printable painter,int index) throws PrinterException {
  throw new PrinterException(sShouldNotReachHere);
}
Program: 36322
Project: 36322
Buggy source:
protected native boolean showDialog();

Fixed version (ground truth):
@Override protected native boolean showDialog();
Program: 36323
Project: 36323
Buggy source:
protected native boolean showDialog();

Fixed version (ground truth):
@Override protected native boolean showDialog();
Program: 36324
Project: 36324
Buggy source:
public static SurfaceData createData(PageFormat pf,long context){
  return new CPrinterSurfaceData(CPrinterGraphicsConfig.getConfig(pf),context);
}

Fixed version (ground truth):
static SurfaceData createData(PageFormat pf,long context){
  return new CPrinterSurfaceData(CPrinterGraphicsConfig.getConfig(pf),context);
}
Program: 36325
Project: 36325
Buggy source:
public CPrinterSurfaceData(GraphicsConfiguration gc,long context){
  super(IntRgbPQ,gc.getColorModel(),gc,gc.getBounds());
  initOps(context,this.fGraphicsStates,this.fGraphicsStatesObject,gc.getBounds().width,gc.getBounds().height);
}

Fixed version (ground truth):
private CPrinterSurfaceData(GraphicsConfiguration gc,long context){
  super(IntRgbPQ,gc.getColorModel(),gc,gc.getBounds());
  initOps(context,this.fGraphicsStates,this.fGraphicsStatesObject,gc.getBounds().width,gc.getBounds().height);
}
Program: 36326
Project: 36326
Buggy source:
/** 
 * Creates a <code>Transferable</code> capable of transferring the specified <code>String</code>.
 */
public StringSelection(String data){
  this.data=data;
}

Fixed version (ground truth):
/** 
 * Creates a <code>Transferable</code> capable of transferring the specified <code>String</code>.
 * @param data the string to be transferred
 */
public StringSelection(String data){
  this.data=data;
}
Program: 36327
Project: 36327
Buggy source:
/** 
 * Creates the DropTargetContext associated with this DropTarget. Subclasses may override this method to instantiate their own DropTargetContext subclass. This call is typically *only* called by the platform's DropTargetContextPeer as a drag operation encounters this DropTarget. Accessing the Context while no Drag is current has undefined results.
 */
protected DropTargetContext createDropTargetContext(){
  return new DropTargetContext(this);
}

Fixed version (ground truth):
/** 
 * Creates the DropTargetContext associated with this DropTarget. Subclasses may override this method to instantiate their own DropTargetContext subclass. This call is typically *only* called by the platform's DropTargetContextPeer as a drag operation encounters this DropTarget. Accessing the Context while no Drag is current has undefined results.
 * @return the DropTargetContext associated with this DropTarget
 */
protected DropTargetContext createDropTargetContext(){
  return new DropTargetContext(this);
}
Program: 36328
Project: 36328
Buggy source:
/** 
 * create an embedded autoscroller <P>
 * @param c the <code>Component</code>
 * @param p the <code>Point</code>
 */
protected DropTargetAutoScroller createDropTargetAutoScroller(Component c,Point p){
  return new DropTargetAutoScroller(c,p);
}

Fixed version (ground truth):
/** 
 * create an embedded autoscroller
 * @param c the <code>Component</code>
 * @param p the <code>Point</code>
 * @return an embedded autoscroller
 */
protected DropTargetAutoScroller createDropTargetAutoScroller(Component c,Point p){
  return new DropTargetAutoScroller(c,p);
}
Program: 36329
Project: 36329
Buggy source:
/** 
 * <p> Subclasses can override this method to insert their own subclass of Child without having to override add() or the other Collection methods that add children to the set. </p>
 * @param targetChild the child to create the Child on behalf of
 * @param peer        the peer if the tragetChild and the peer are related by an implementation of BeanContextProxy     * @return Subtype-specific subclass of Child without overriding collection methods
 */
protected BCSChild createBCSChild(Object targetChild,Object peer){
  return new BCSChild(targetChild,peer);
}

Fixed version (ground truth):
/** 
 * <p> Subclasses can override this method to insert their own subclass of Child without having to override add() or the other Collection methods that add children to the set. </p>
 * @param targetChild the child to create the Child on behalf of
 * @param peer        the peer if the tragetChild and the peer are related by an implementation of BeanContextProxy
 * @return Subtype-specific subclass of Child without overriding collection methods
 */
protected BCSChild createBCSChild(Object targetChild,Object peer){
  return new BCSChild(targetChild,peer);
}
Program: 36330
Project: 36330
Buggy source:
/** 
 * Block the specified windows. This is used for modal dialogs.
 * @param windows the windows to block
 * @see Dialog#modalShow()
 * @see Dialog#blockWindows()
 */
void blockWindows(java.util.List<Window> windows);

Fixed version (ground truth):
/** 
 * Block the specified windows. This is used for modal dialogs.
 * @param windows the windows to block
 * @see Dialog#modalShow()
 */
void blockWindows(java.util.List<Window> windows);
Program: 36331
Project: 36331
Buggy source:
/** 
 * Updates the window's always-on-top state. Sets if the window should always stay on top of all other windows or not.
 * @see Window#getAlwaysOnTop()
 * @see Window#setAlwaysOnTop(boolean)
 */
void updateAlwaysOnTopState();

Fixed version (ground truth):
/** 
 * Updates the window's always-on-top state. Sets if the window should always stay on top of all other windows or not.
 * @see Window#isAlwaysOnTop()
 * @see Window#setAlwaysOnTop(boolean)
 */
void updateAlwaysOnTopState();
Program: 36333
Project: 36333
Buggy source:
/** 
 * Invoked when the value of the adjustable has changed.
 */
public void adjustmentValueChanged(AdjustmentEvent e);

Fixed version (ground truth):
/** 
 * Invoked when the value of the adjustable has changed.
 * @param e the event to be processed
 */
public void adjustmentValueChanged(AdjustmentEvent e);
Program: 36334
Project: 36334
Buggy source:
/** 
 * Invoked when the component has been made invisible.
 */
public void componentHidden(ComponentEvent e);

Fixed version (ground truth):
/** 
 * Invoked when the component has been made invisible.
 * @param e the event to be processed
 */
public void componentHidden(ComponentEvent e);
Program: 36335
Project: 36335
Buggy source:
/** 
 * Invoked when the component's size changes.
 */
public void componentResized(ComponentEvent e);

Fixed version (ground truth):
/** 
 * Invoked when the component's size changes.
 * @param e the event to be processed
 */
public void componentResized(ComponentEvent e);
Program: 36336
Project: 36336
Buggy source:
/** 
 * Invoked when the component's position changes.
 */
public void componentMoved(ComponentEvent e);

Fixed version (ground truth):
/** 
 * Invoked when the component's position changes.
 * @param e the event to be processed
 */
public void componentMoved(ComponentEvent e);
Program: 36337
Project: 36337
Buggy source:
/** 
 * Invoked when the component has been made visible.
 */
public void componentShown(ComponentEvent e);

Fixed version (ground truth):
/** 
 * Invoked when the component has been made visible.
 * @param e the event to be processed
 */
public void componentShown(ComponentEvent e);
Program: 36338
Project: 36338
Buggy source:
/** 
 * Called when the hierarchy has been changed. To discern the actual type of change, call <code>HierarchyEvent.getChangeFlags()</code>.
 * @see HierarchyEvent#getChangeFlags()
 */
public void hierarchyChanged(HierarchyEvent e);

Fixed version (ground truth):
/** 
 * Called when the hierarchy has been changed. To discern the actual type of change, call <code>HierarchyEvent.getChangeFlags()</code>.
 * @param e the event to be processed
 * @see HierarchyEvent#getChangeFlags()
 */
public void hierarchyChanged(HierarchyEvent e);
Program: 36339
Project: 36339
Buggy source:
/** 
 * Invoked when an item has been selected or deselected by the user. The code written for this method performs the operations that need to occur when an item is selected (or deselected).
 */
void itemStateChanged(ItemEvent e);

Fixed version (ground truth):
/** 
 * Invoked when an item has been selected or deselected by the user. The code written for this method performs the operations that need to occur when an item is selected (or deselected).
 * @param e the event to be processed
 */
void itemStateChanged(ItemEvent e);
Program: 36340
Project: 36340
Buggy source:
/** 
 * Block the specified windows. This is used for modal dialogs.
 * @param windows the windows to block
 * @see Dialog#modalShow()
 * @see Dialog#blockWindows()
 */
void blockWindows(java.util.List<Window> windows);

Fixed version (ground truth):
/** 
 * Block the specified windows. This is used for modal dialogs.
 * @param windows the windows to block
 * @see Dialog#modalShow()
 */
void blockWindows(java.util.List<Window> windows);
Program: 36341
Project: 36341
Buggy source:
/** 
 * Clears the current global focus owner.
 * @param activeWindow
 * @see KeyboardFocusManager#clearGlobalFocusOwner()
 */
void clearGlobalFocusOwner(Window activeWindow);

Fixed version (ground truth):
/** 
 * Clears the current global focus owner.
 * @param activeWindow the active window
 * @see KeyboardFocusManager#clearGlobalFocusOwner()
 */
void clearGlobalFocusOwner(Window activeWindow);
Program: 36343
Project: 36343
Buggy source:
/** 
 * Returns an object which represents the data to be transferred.  The class of the object returned is defined by the representation class of the flavor.
 * @param flavor the requested flavor for the data
 * @see DataFlavor#getRepresentationClass
 * @exception IOException                if the data is no longer availablein the requested flavor.
 * @exception UnsupportedFlavorException if the requested data flavor isnot supported.
 */
public Object getTransferData(DataFlavor flavor) throws UnsupportedFlavorException, IOException ;

Fixed version (ground truth):
/** 
 * Returns an object which represents the data to be transferred.  The class of the object returned is defined by the representation class of the flavor.
 * @param flavor the requested flavor for the data
 * @return an object which represents the data to be transferred
 * @see DataFlavor#getRepresentationClass
 * @exception IOException                if the data is no longer availablein the requested flavor.
 * @exception UnsupportedFlavorException if the requested data flavor isnot supported.
 */
public Object getTransferData(DataFlavor flavor) throws UnsupportedFlavorException, IOException ;
Program: 36344
Project: 36344
Buggy source:
/** 
 * Invoked when an action occurs.
 */
public void actionPerformed(ActionEvent e);

Fixed version (ground truth):
/** 
 * Invoked when an action occurs.
 * @param e the event to be processed
 */
public void actionPerformed(ActionEvent e);
Program: 36345
Project: 36345
Buggy source:
/** 
 * Invoked when the component has been made invisible.
 */
public void componentHidden(ComponentEvent e);

Fixed version (ground truth):
/** 
 * Invoked when the component has been made invisible.
 * @param e the event to be processed
 */
public void componentHidden(ComponentEvent e);
Program: 36346
Project: 36346
Buggy source:
/** 
 * Invoked when the component's size changes.
 */
public void componentResized(ComponentEvent e);

Fixed version (ground truth):
/** 
 * Invoked when the component's size changes.
 * @param e the event to be processed
 */
public void componentResized(ComponentEvent e);
Program: 36347
Project: 36347
Buggy source:
/** 
 * Invoked when the component's position changes.
 */
public void componentMoved(ComponentEvent e);

Fixed version (ground truth):
/** 
 * Invoked when the component's position changes.
 * @param e the event to be processed
 */
public void componentMoved(ComponentEvent e);
Program: 36348
Project: 36348
Buggy source:
/** 
 * Invoked when the component has been made visible.
 */
public void componentShown(ComponentEvent e);

Fixed version (ground truth):
/** 
 * Invoked when the component has been made visible.
 * @param e the event to be processed
 */
public void componentShown(ComponentEvent e);
Program: 36349
Project: 36349
Buggy source:
/** 
 * Returns the pre-digested input stream, if <a href="XMLSignContext.html#Supported Properties">reference caching</a> is enabled. This is the input to the digest operation during a validation or signing operation.
 * @return an input stream containing the pre-digested input, or<code>null</code> if reference caching is not enabled or this reference has not been generated or validated
 */
InputStream getDigestInputStream();

Fixed version (ground truth):
/** 
 * Returns the pre-digested input stream, if <a href="XMLSignContext.html#Supported%20Properties">reference caching</a> is enabled. This is the input to the digest operation during a validation or signing operation.
 * @return an input stream containing the pre-digested input, or<code>null</code> if reference caching is not enabled or this reference has not been generated or validated
 */
InputStream getDigestInputStream();
Program: 36350
Project: 36350
Buggy source:
/** 
 * Returns the dereferenced data, if <a href="XMLSignContext.html#Supported Properties">reference caching</a> is enabled. This is the result of dereferencing the URI of this reference during a validation or generation operation.
 * @return the dereferenced data, or <code>null</code> if referencecaching is not enabled or this reference has not been generated or validated
 */
Data getDereferencedData();

Fixed version (ground truth):
/** 
 * Returns the dereferenced data, if <a href="XMLSignContext.html#Supported%20Properties">reference caching</a> is enabled. This is the result of dereferencing the URI of this reference during a validation or generation operation.
 * @return the dereferenced data, or <code>null</code> if referencecaching is not enabled or this reference has not been generated or validated
 */
Data getDereferencedData();