nus-yam/ex-repair huggingface dataset:
Program: 71523
Project: 71523
Buggy source:
/** 
 * Returns whether the list of available locales can change at runtime. This may be the case, for example, for adapters that access real input methods over the network.
 */
boolean hasDynamicLocaleList();

Fixed version (ground truth):
/** 
 * Returns whether the list of available locales can change at runtime. This may be the case, for example, for adapters that access real input methods over the network.
 * @return whether the list of available locales can change atruntime
 */
boolean hasDynamicLocaleList();
Program: 71524
Project: 71524
Buggy source:
/** 
 * Returns the user-visible name of the corresponding input method for the given input locale in the language in which the name will be displayed. <p> The inputLocale parameter specifies the locale for which text is input. This parameter can only take values obtained from this descriptor's  {@link #getAvailableLocales} method or null. If it is null, aninput locale independent name for the input method should be returned. <p> If a name for the desired display language is not available, the method may fall back to some other language.
 * @param inputLocale the locale for which text input is supported, or null
 * @param displayLanguage the language in which the name will be displayed
 */
String getInputMethodDisplayName(Locale inputLocale,Locale displayLanguage);

Fixed version (ground truth):
/** 
 * Returns the user-visible name of the corresponding input method for the given input locale in the language in which the name will be displayed. <p> The inputLocale parameter specifies the locale for which text is input. This parameter can only take values obtained from this descriptor's  {@link #getAvailableLocales} method or null. If it is null, aninput locale independent name for the input method should be returned. <p> If a name for the desired display language is not available, the method may fall back to some other language.
 * @param inputLocale the locale for which text input is supported, or null
 * @param displayLanguage the language in which the name will be displayed
 * @return the user-visible name of the corresponding input methodfor the given input locale in the language in which the name will be displayed
 */
String getInputMethodDisplayName(Locale inputLocale,Locale displayLanguage);
Program: 71525
Project: 71525
Buggy source:
/** 
 * Requests a GC that best suits this Canvas. The returned GC may differ from the requested GC passed as the argument to this method. This method must return a non-null value (given the argument is non-null as well).
 * @since 1.7
 */
GraphicsConfiguration getAppropriateGraphicsConfiguration(GraphicsConfiguration gc);

Fixed version (ground truth):
/** 
 * Requests a GC that best suits this Canvas. The returned GC may differ from the requested GC passed as the argument to this method. This method must return a non-null value (given the argument is non-null as well).
 * @param gc the requested graphics configuration
 * @return a graphics configuration that best suits this Canvas
 * @since 1.7
 */
GraphicsConfiguration getAppropriateGraphicsConfiguration(GraphicsConfiguration gc);
Program: 71526
Project: 71526
Buggy source:
/** 
 * Updates internal data structures related to the component's GC.
 * @return if the peer needs to be recreated for the changes to take effect
 * @since 1.7
 */
boolean updateGraphicsData(GraphicsConfiguration gc);

Fixed version (ground truth):
/** 
 * Updates internal data structures related to the component's GC.
 * @param gc the reference graphics configuration
 * @return if the peer needs to be recreated for the changes to take effect
 * @since 1.7
 */
boolean updateGraphicsData(GraphicsConfiguration gc);
Program: 71527
Project: 71527
Buggy source:
/** 
 * Applies the shape to the native component window.
 * @since 1.7
 * @see Component#applyCompoundShape
 */
void applyShape(Region shape);

Fixed version (ground truth):
/** 
 * Applies the shape to the native component window.
 * @param shape the shape to apply
 * @since 1.7
 * @see Component#applyCompoundShape
 */
void applyShape(Region shape);
Program: 71528
Project: 71528
Buggy source:
/** 
 * Lowers this component at the bottom of the above HW peer. If the above parameter is null then the method places this component at the top of the Z-order.
 */
void setZOrder(ComponentPeer above);

Fixed version (ground truth):
/** 
 * Lowers this component at the bottom of the above HW peer. If the above parameter is null then the method places this component at the top of the Z-order.
 * @param above the peer to lower this component with respect to
 */
void setZOrder(ComponentPeer above);
Program: 71529
Project: 71529
Buggy source:
/** 
 * Returns whether or not the window is located under the mouse pointer. The window is considered to be under the mouse pointer if it is showing on the screen, and the mouse pointer is above the part of the window that is not obscured by any other windows.
 */
boolean isWindowUnderMouse(Window w);

Fixed version (ground truth):
/** 
 * Returns whether or not the window is located under the mouse pointer. The window is considered to be under the mouse pointer if it is showing on the screen, and the mouse pointer is above the part of the window that is not obscured by any other windows.
 * @param w the window to check
 * @return whether or not the window is located under the mousepointer
 */
boolean isWindowUnderMouse(Window w);
Program: 71530
Project: 71530
Buggy source:
/** 
 * This method does two things: it fills the point fields with the current coordinates of the mouse cursor and returns the number of the screen device where the pointer is located. The number of the screen device is only returned for independent devices (which are not parts of a virtual screen device). For virtual screen devices, 0 is returned. Mouse coordinates are also calculated depending on whether or not the screen device is virtual. For virtual screen devices, pointer coordinates are calculated in the virtual coordinate system. Otherwise, coordinates are calculated in the coordinate system of the screen device where the pointer is located. See java.awt.GraphicsConfiguration documentation for more details about virtual screen devices.
 */
int fillPointWithCoords(Point point);

Fixed version (ground truth):
/** 
 * This method does two things: it fills the point fields with the current coordinates of the mouse cursor and returns the number of the screen device where the pointer is located. The number of the screen device is only returned for independent devices (which are not parts of a virtual screen device). For virtual screen devices, 0 is returned. Mouse coordinates are also calculated depending on whether or not the screen device is virtual. For virtual screen devices, pointer coordinates are calculated in the virtual coordinate system. Otherwise, coordinates are calculated in the coordinate system of the screen device where the pointer is located. See java.awt.GraphicsConfiguration documentation for more details about virtual screen devices.
 * @param point holder for the current coordinates of the mousecursor
 * @return the number of the screen device where the pointer islocated
 */
int fillPointWithCoords(Point point);
Program: 71531
Project: 71531
Buggy source:
/** 
 * Enables the per-pixel alpha support for the window.
 * @see Window#setBackground(Color)
 */
void setOpaque(boolean isOpaque);

Fixed version (ground truth):
/** 
 * Enables the per-pixel alpha support for the window.
 * @param isOpaque whether or not per-pixel alpha support isenabled
 * @see Window#setBackground(Color)
 */
void setOpaque(boolean isOpaque);
Program: 71532
Project: 71532
Buggy source:
/** 
 * Sets the level of opacity for the window.
 * @see Window#setOpacity(float)
 */
void setOpacity(float opacity);

Fixed version (ground truth):
/** 
 * Sets the level of opacity for the window.
 * @param opacity the level of opacity
 * @see Window#setOpacity(float)
 */
void setOpacity(float opacity);
Program: 71533
Project: 71533
Buggy source:
public native void declareTypes(long[] formats,SunClipboard newOwner);

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

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

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

Fixed version (ground truth):
@Override protected void registerClipboardViewerChecked(){
}
Program: 71537
Project: 71537
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: 71538
Project: 71538
Buggy source:
public native void setData(byte[] data,long format);

Fixed version (ground truth):
private native void setData(byte[] data,long format);
Program: 71539
Project: 71539
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: 71540
Project: 71540
Buggy source:
public long getID(){
  return 0;
}

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

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

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

Fixed version (ground truth):
@Override protected void clearNativeContext(){
}
Program: 71544
Project: 71544
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: 71545
Project: 71545
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: 71546
Project: 71546
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: 71547
Project: 71547
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: 71548
Project: 71548
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: 71549
Project: 71549
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: 71550
Project: 71550
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: 71551
Project: 71551
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: 71552
Project: 71552
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: 71553
Project: 71553
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: 71554
Project: 71554
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: 71555
Project: 71555
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: 71556
Project: 71556
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: 71558
Project: 71558
Buggy source:
protected native void abortDoc();

Fixed version (ground truth):
@Override protected native void abortDoc();
Program: 71559
Project: 71559
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: 71560
Project: 71560
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: 71561
Project: 71561
Buggy source:
protected void finalize(){
  if (fNSPrintInfo != -1) {
    dispose(fNSPrintInfo);
  }
}

Fixed version (ground truth):
@Override protected void finalize(){
  if (fNSPrintInfo != -1) {
    dispose(fNSPrintInfo);
  }
}
Program: 71562
Project: 71562
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: 71563
Project: 71563
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: 71564
Project: 71564
Buggy source:
protected native boolean showDialog();

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

Fixed version (ground truth):
@Override protected native boolean showDialog();
Program: 71566
Project: 71566
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: 71567
Project: 71567
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: 71568
Project: 71568
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: 71569
Project: 71569
Buggy source:
/** 
 * Gets the value of the single specified service attribute. This may be useful to clients which only need the value of one attribute and want to minimize overhead.
 * @param category the category of a PrintServiceAttribute supportedby this service - may not be null.
 * @return the value of the supported attribute or null if theattribute is not supported by this service.
 * @exception NullPointerException if the category is null.
 * @exception IllegalArgumentException (unchecked exception) if <CODE>category</CODE> is not a <code>Class</code> that implements interface {@link javax.print.attribute.PrintServiceAttribute PrintServiceAttribute}.
 */
public <T extends PrintServiceAttribute>T getAttribute(Class<T> category);

Fixed version (ground truth):
/** 
 * Gets the value of the single specified service attribute. This may be useful to clients which only need the value of one attribute and want to minimize overhead.
 * @param < T > the type of the specified service attribute
 * @param category the category of a PrintServiceAttribute supportedby this service - may not be null.
 * @return the value of the supported attribute or null if theattribute is not supported by this service.
 * @exception NullPointerException if the category is null.
 * @exception IllegalArgumentException (unchecked exception) if <CODE>category</CODE> is not a <code>Class</code> that implements interface {@link javax.print.attribute.PrintServiceAttribute PrintServiceAttribute}.
 */
public <T extends PrintServiceAttribute>T getAttribute(Class<T> category);
Program: 71570
Project: 71570
Buggy source:
/** 
 * Returns the name of this clipboard object.
 * @see java.awt.Toolkit#getSystemClipboard
 */
public String getName(){
  return name;
}

Fixed version (ground truth):
/** 
 * Returns the name of this clipboard object.
 * @return the name of this clipboard object
 * @see java.awt.Toolkit#getSystemClipboard
 */
public String getName(){
  return name;
}
Program: 71571
Project: 71571
Buggy source:
/** 
 * Creates a clipboard object.
 * @see java.awt.Toolkit#getSystemClipboard
 */
public Clipboard(String name){
  this.name=name;
}

Fixed version (ground truth):
/** 
 * Creates a clipboard object.
 * @param name for the clipboard
 * @see java.awt.Toolkit#getSystemClipboard
 */
public Clipboard(String name){
  this.name=name;
}
Program: 71572
Project: 71572
Buggy source:
public final Class<?> getDefaultRepresentationClass(){
  return ioInputStreamClass;
}

Fixed version (ground truth):
/** 
 * Returns the default representation class.
 * @return the default representation class
 */
public final Class<?> getDefaultRepresentationClass(){
  return ioInputStreamClass;
}
Program: 71573
Project: 71573
Buggy source:
/** 
 * Called on <code>DataFlavor</code> for every MIME Type parameter to allow <code>DataFlavor</code> subclasses to handle special parameters like the text/plain <code>charset</code> parameters, whose values are case insensitive.  (MIME type parameter values are supposed to be case sensitive. <p> This method is called for each parameter name/value pair and should return the normalized representation of the <code>parameterValue</code>. This method is never invoked by this implementation from 1.1 onwards.
 * @deprecated
 */
@Deprecated protected String normalizeMimeTypeParameter(String parameterName,String parameterValue){
  return parameterValue;
}

Fixed version (ground truth):
/** 
 * Called on <code>DataFlavor</code> for every MIME Type parameter to allow <code>DataFlavor</code> subclasses to handle special parameters like the text/plain <code>charset</code> parameters, whose values are case insensitive.  (MIME type parameter values are supposed to be case sensitive. <p> This method is called for each parameter name/value pair and should return the normalized representation of the <code>parameterValue</code>. This method is never invoked by this implementation from 1.1 onwards.
 * @param parameterName the parameter name
 * @param parameterValue the parameter value
 * @return the parameter value
 * @deprecated
 */
@Deprecated protected String normalizeMimeTypeParameter(String parameterName,String parameterValue){
  return parameterValue;
}
Program: 71574
Project: 71574
Buggy source:
public final String getDefaultRepresentationClassAsString(){
  return getDefaultRepresentationClass().getName();
}

Fixed version (ground truth):
/** 
 * Returns the name of the default representation class.
 * @return the name of the default representation class
 */
public final String getDefaultRepresentationClassAsString(){
  return getDefaultRepresentationClass().getName();
}
Program: 71575
Project: 71575
Buggy source:
/** 
 * Returns whether the representation class for this <code>DataFlavor</code> is <code>java.nio.CharBuffer</code> or a subclass thereof.
 * @since 1.4
 */
public boolean isRepresentationClassCharBuffer(){
  return java.nio.CharBuffer.class.isAssignableFrom(representationClass);
}

Fixed version (ground truth):
/** 
 * Returns whether the representation class for this <code>DataFlavor</code> is <code>java.nio.CharBuffer</code> or a subclass thereof.
 * @return whether or not the representation class for this{@code DataFlavor} is {@code java.nio.CharBuffer} or a subclassthereof
 * @since 1.4
 */
public boolean isRepresentationClassCharBuffer(){
  return java.nio.CharBuffer.class.isAssignableFrom(representationClass);
}
Program: 71576
Project: 71576
Buggy source:
/** 
 * Returns whether the representation class for this <code>DataFlavor</code> is <code>java.nio.ByteBuffer</code> or a subclass thereof.
 * @since 1.4
 */
public boolean isRepresentationClassByteBuffer(){
  return java.nio.ByteBuffer.class.isAssignableFrom(representationClass);
}

Fixed version (ground truth):
/** 
 * Returns whether the representation class for this <code>DataFlavor</code> is <code>java.nio.ByteBuffer</code> or a subclass thereof.
 * @return whether or not the representation class for this{@code DataFlavor} is {@code java.nio.ByteBuffer} or a subclassthereof
 * @since 1.4
 */
public boolean isRepresentationClassByteBuffer(){
  return java.nio.ByteBuffer.class.isAssignableFrom(representationClass);
}
Program: 71577
Project: 71577
Buggy source:
/** 
 * Called for each MIME type string to give <code>DataFlavor</code> subtypes the opportunity to change how the normalization of MIME types is accomplished.  One possible use would be to add default parameter/value pairs in cases where none are present in the MIME type string passed in. This method is never invoked by this implementation from 1.1 onwards.
 * @deprecated
 */
@Deprecated protected String normalizeMimeType(String mimeType){
  return mimeType;
}

Fixed version (ground truth):
/** 
 * Called for each MIME type string to give <code>DataFlavor</code> subtypes the opportunity to change how the normalization of MIME types is accomplished.  One possible use would be to add default parameter/value pairs in cases where none are present in the MIME type string passed in. This method is never invoked by this implementation from 1.1 onwards.
 * @param mimeType the mime type
 * @return the mime type
 * @deprecated
 */
@Deprecated protected String normalizeMimeType(String mimeType){
  return mimeType;
}
Program: 71578
Project: 71578
Buggy source:
/** 
 * Does the <code>DataFlavor</code> represent a serialized object?
 */
public boolean isMimeTypeSerializedObject(){
  return isMimeTypeEqual(javaSerializedObjectMimeType);
}

Fixed version (ground truth):
/** 
 * Does the <code>DataFlavor</code> represent a serialized object?
 * @return whether or not a serialized object is represented
 */
public boolean isMimeTypeSerializedObject(){
  return isMimeTypeEqual(javaSerializedObjectMimeType);
}
Program: 71579
Project: 71579
Buggy source:
/** 
 * Does the <code>DataFlavor</code> represent a <code>java.io.InputStream</code>?
 */
public boolean isRepresentationClassInputStream(){
  return ioInputStreamClass.isAssignableFrom(representationClass);
}

Fixed version (ground truth):
/** 
 * Does the <code>DataFlavor</code> represent a <code>java.io.InputStream</code>?
 * @return whether or not this {@code DataFlavor} represent a{@code java.io.InputStream}
 */
public boolean isRepresentationClassInputStream(){
  return ioInputStreamClass.isAssignableFrom(representationClass);
}
Program: 71580
Project: 71580
Buggy source:
/** 
 * Returns whether the representation class for this <code>DataFlavor</code> is <code>java.io.Reader</code> or a subclass thereof.
 * @since 1.4
 */
public boolean isRepresentationClassReader(){
  return java.io.Reader.class.isAssignableFrom(representationClass);
}

Fixed version (ground truth):
/** 
 * Returns whether the representation class for this <code>DataFlavor</code> is <code>java.io.Reader</code> or a subclass thereof.
 * @return whether or not the representation class for this{@code DataFlavor} is {@code java.io.Reader} or a subclassthereof
 * @since 1.4
 */
public boolean isRepresentationClassReader(){
  return java.io.Reader.class.isAssignableFrom(representationClass);
}
Program: 71581
Project: 71581
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: 71582
Project: 71582
Buggy source:
/** 
 * Returns the default FlavorMap for this thread's ClassLoader.
 */
public static FlavorMap getDefaultFlavorMap(){
  ClassLoader contextClassLoader=Thread.currentThread().getContextClassLoader();
  if (contextClassLoader == null) {
    contextClassLoader=ClassLoader.getSystemClassLoader();
  }
  FlavorMap fm;
synchronized (flavorMaps) {
    fm=flavorMaps.get(contextClassLoader);
    if (fm == null) {
      fm=new SystemFlavorMap();
      flavorMaps.put(contextClassLoader,fm);
    }
  }
  return fm;
}

Fixed version (ground truth):
/** 
 * Returns the default FlavorMap for this thread's ClassLoader.
 * @return the default FlavorMap for this thread's ClassLoader
 */
public static FlavorMap getDefaultFlavorMap(){
  ClassLoader contextClassLoader=Thread.currentThread().getContextClassLoader();
  if (contextClassLoader == null) {
    contextClassLoader=ClassLoader.getSystemClassLoader();
  }
  FlavorMap fm;
synchronized (flavorMaps) {
    fm=flavorMaps.get(contextClassLoader);
    if (fm == null) {
      fm=new SystemFlavorMap();
      flavorMaps.put(contextClassLoader,fm);
    }
  }
  return fm;
}
Program: 71583
Project: 71583
Buggy source:
/** 
 * Decodes a <code>String</code> native for use as a <code>DataFlavor</code>.
 * @param nat the <code>String</code> to decode
 * @return the decoded <code>DataFlavor</code>, or <code>null</code> ifnat is not an encoded <code>String</code> native
 */
public static DataFlavor decodeDataFlavor(String nat) throws ClassNotFoundException {
  String retval_str=SystemFlavorMap.decodeJavaMIMEType(nat);
  return (retval_str != null) ? new DataFlavor(retval_str) : null;
}

Fixed version (ground truth):
/** 
 * Decodes a <code>String</code> native for use as a <code>DataFlavor</code>.
 * @param nat the <code>String</code> to decode
 * @return the decoded <code>DataFlavor</code>, or <code>null</code> ifnat is not an encoded <code>String</code> native
 * @throws ClassNotFoundException if the class of the data flavoris not loaded
 */
public static DataFlavor decodeDataFlavor(String nat) throws ClassNotFoundException {
  String retval_str=SystemFlavorMap.decodeJavaMIMEType(nat);
  return (retval_str != null) ? new DataFlavor(retval_str) : null;
}
Program: 71584
Project: 71584
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: 71585
Project: 71585
Buggy source:
/** 
 * Gets all the objects currently registered as <code><em>Foo</em>Listener</code>s upon this <code>DragSource</code>. <code><em>Foo</em>Listener</code>s are registered using the <code>add<em>Foo</em>Listener</code> method.
 * @param listenerType the type of listeners requested; this parametershould specify an interface that descends from <code>java.util.EventListener</code>
 * @return an array of all objects registered as<code><em>Foo</em>Listener</code>s on this <code>DragSource</code>, or an empty array if no such listeners have been added
 * @exception ClassCastException if <code>listenerType</code>doesn't specify a class or interface that implements <code>java.util.EventListener</code>
 * @see #getDragSourceListeners
 * @see #getDragSourceMotionListeners
 * @since 1.4
 */
public <T extends EventListener>T[] getListeners(Class<T> listenerType){
  EventListener l=null;
  if (listenerType == DragSourceListener.class) {
    l=listener;
  }
 else   if (listenerType == DragSourceMotionListener.class) {
    l=motionListener;
  }
  return DnDEventMulticaster.getListeners(l,listenerType);
}

Fixed version (ground truth):
/** 
 * Gets all the objects currently registered as <code><em>Foo</em>Listener</code>s upon this <code>DragSource</code>. <code><em>Foo</em>Listener</code>s are registered using the <code>add<em>Foo</em>Listener</code> method.
 * @param < T > the type of listener objects
 * @param listenerType the type of listeners requested; this parametershould specify an interface that descends from <code>java.util.EventListener</code>
 * @return an array of all objects registered as<code><em>Foo</em>Listener</code>s on this <code>DragSource</code>, or an empty array if no such listeners have been added
 * @exception ClassCastException if <code>listenerType</code>doesn't specify a class or interface that implements <code>java.util.EventListener</code>
 * @see #getDragSourceListeners
 * @see #getDragSourceMotionListeners
 * @since 1.4
 */
public <T extends EventListener>T[] getListeners(Class<T> listenerType){
  EventListener l=null;
  if (listenerType == DragSourceListener.class) {
    l=listener;
  }
 else   if (listenerType == DragSourceMotionListener.class) {
    l=motionListener;
  }
  return DnDEventMulticaster.getListeners(l,listenerType);
}
Program: 71586
Project: 71586
Buggy source:
/** 
 * Creates a new <code>DragGestureRecognizer</code> that implements the specified abstract subclass of <code>DragGestureRecognizer</code>, and sets the specified <code>Component</code> and <code>DragGestureListener</code> on the newly created object. <P>
 * @param recognizerAbstractClass the requested abstract type
 * @param actions                 the permitted source drag actions
 * @param c                       the <code>Component</code> target
 * @param dgl        the <code>DragGestureListener</code> to notify<P>
 * @return the new <code>DragGestureRecognizer</code> or <code>null</code>if the <code>Toolkit.createDragGestureRecognizer</code> method has no implementation available for the requested <code>DragGestureRecognizer</code> subclass and returns <code>null</code>
 */
public <T extends DragGestureRecognizer>T createDragGestureRecognizer(Class<T> recognizerAbstractClass,Component c,int actions,DragGestureListener dgl){
  return Toolkit.getDefaultToolkit().createDragGestureRecognizer(recognizerAbstractClass,this,c,actions,dgl);
}

Fixed version (ground truth):
/** 
 * Creates a new <code>DragGestureRecognizer</code> that implements the specified abstract subclass of <code>DragGestureRecognizer</code>, and sets the specified <code>Component</code> and <code>DragGestureListener</code> on the newly created object. <P>
 * @param < T > the type of {@code DragGestureRecognizer} to create
 * @param recognizerAbstractClass the requested abstract type
 * @param actions                 the permitted source drag actions
 * @param c                       the <code>Component</code> target
 * @param dgl        the <code>DragGestureListener</code> to notify<P>
 * @return the new <code>DragGestureRecognizer</code> or <code>null</code>if the <code>Toolkit.createDragGestureRecognizer</code> method has no implementation available for the requested <code>DragGestureRecognizer</code> subclass and returns <code>null</code>
 */
public <T extends DragGestureRecognizer>T createDragGestureRecognizer(Class<T> recognizerAbstractClass,Component c,int actions,DragGestureListener dgl){
  return Toolkit.getDefaultToolkit().createDragGestureRecognizer(recognizerAbstractClass,this,c,actions,dgl);
}
Program: 71587
Project: 71587
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: 71588
Project: 71588
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: 71589
Project: 71589
Buggy source:
/** 
 * return the current drag cursor
 */
Cursor getCursor();

Fixed version (ground truth):
/** 
 * return the current drag cursor
 * @return the current drag cursor
 */
Cursor getCursor();
Program: 71590
Project: 71590
Buggy source:
/** 
 * start a drag
 */
void startDrag(DragSourceContext dsc,Cursor c,Image dragImage,Point imageOffset) throws InvalidDnDOperationException ;

Fixed version (ground truth):
/** 
 * start a drag
 * @param dsc the DragSourceContext
 * @param c the cursor
 * @param dragImage the image to be dragged
 * @param imageOffset the offset
 */
void startDrag(DragSourceContext dsc,Cursor c,Image dragImage,Point imageOffset) throws InvalidDnDOperationException ;
Program: 71591
Project: 71591
Buggy source:
/** 
 * set the current drag cursor
 */
void setCursor(Cursor c) throws InvalidDnDOperationException ;

Fixed version (ground truth):
/** 
 * set the current drag cursor
 * @param c the cursor
 */
void setCursor(Cursor c) throws InvalidDnDOperationException ;