nus-yam/ex-repair huggingface dataset:
Program: 78786
Project: 78786
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: 78787
Project: 78787
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: 78788
Project: 78788
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: 78789
Project: 78789
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: 78790
Project: 78790
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: 78791
Project: 78791
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: 78792
Project: 78792
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: 78793
Project: 78793
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: 78794
Project: 78794
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: 78795
Project: 78795
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: 78796
Project: 78796
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: 78797
Project: 78797
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: 78798
Project: 78798
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: 78800
Project: 78800
Buggy source:
protected native void abortDoc();

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

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

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

Fixed version (ground truth):
@Override protected native boolean showDialog();
Program: 78808
Project: 78808
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: 78809
Project: 78809
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: 78810
Project: 78810
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: 78811
Project: 78811
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: 78812
Project: 78812
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: 78813
Project: 78813
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: 78814
Project: 78814
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: 78815
Project: 78815
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: 78816
Project: 78816
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: 78817
Project: 78817
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: 78818
Project: 78818
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: 78819
Project: 78819
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: 78820
Project: 78820
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: 78821
Project: 78821
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: 78822
Project: 78822
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: 78823
Project: 78823
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: 78824
Project: 78824
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: 78825
Project: 78825
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: 78826
Project: 78826
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: 78827
Project: 78827
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: 78828
Project: 78828
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: 78829
Project: 78829
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: 78830
Project: 78830
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: 78831
Project: 78831
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: 78832
Project: 78832
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 ;
Program: 78833
Project: 78833
Buggy source:
/** 
 * @return if the DragSource Transferable is in the same JVM as the Target
 */
boolean isTransferableJVMLocal();

Fixed version (ground truth):
/** 
 * Return whether or not the DragSource Transferable is in the same JVM as the Target.
 * @return if the DragSource Transferable is in the same JVM as the Target
 */
boolean isTransferableJVMLocal();
Program: 78834
Project: 78834
Buggy source:
/** 
 * accept the Drop
 */
void acceptDrop(int dropAction);

Fixed version (ground truth):
/** 
 * accept the Drop
 * @param dropAction the drop action
 */
void acceptDrop(int dropAction);
Program: 78835
Project: 78835
Buggy source:
/** 
 * update the peer's notion of the Target's actions
 */
void setTargetActions(int actions);

Fixed version (ground truth):
/** 
 * update the peer's notion of the Target's actions
 * @param actions the actions
 */
void setTargetActions(int actions);
Program: 78836
Project: 78836
Buggy source:
/** 
 * get the current Target actions
 */
int getTargetActions();

Fixed version (ground truth):
/** 
 * get the current Target actions
 * @return the current Target actions
 */
int getTargetActions();
Program: 78837
Project: 78837
Buggy source:
/** 
 * accept the Drag
 */
void acceptDrag(int dragAction);

Fixed version (ground truth):
/** 
 * accept the Drag
 * @param dragAction the drag action
 */
void acceptDrag(int dragAction);
Program: 78838
Project: 78838
Buggy source:
/** 
 * get the DropTarget associated with this peer
 */
DropTarget getDropTarget();

Fixed version (ground truth):
/** 
 * get the DropTarget associated with this peer
 * @return the DropTarget associated with this peer
 */
DropTarget getDropTarget();
Program: 78839
Project: 78839
Buggy source:
/** 
 * signal complete
 */
void dropComplete(boolean success);

Fixed version (ground truth):
/** 
 * signal complete
 * @param success the signal
 */
void dropComplete(boolean success);
Program: 78840
Project: 78840
Buggy source:
/** 
 * get the (remote) DataFlavors from the peer
 */
DataFlavor[] getTransferDataFlavors();

Fixed version (ground truth):
/** 
 * get the (remote) DataFlavors from the peer
 * @return the (remote) DataFlavors from the peer
 */
DataFlavor[] getTransferDataFlavors();
Program: 78841
Project: 78841
Buggy source:
/** 
 * get an input stream to the remote data
 */
Transferable getTransferable() throws InvalidDnDOperationException ;

Fixed version (ground truth):
/** 
 * get an input stream to the remote data
 * @return an input stream to the remote data
 */
Transferable getTransferable() throws InvalidDnDOperationException ;
Program: 78842
Project: 78842
Buggy source:
/** 
 * Move the back buffer to the front buffer.
 * @param x1 the area to be flipped, upper left X coordinate
 * @param y1 the area to be flipped, upper left Y coordinate
 * @param x2 the area to be flipped, lower right X coordinate
 * @param y2 the area to be flipped, lower right Y coordinate
 * @param flipAction the flip action to perform
 * @see Component.FlipBufferStrategy#flip
 */
void flip(int x1,int y1,int x2,int y2,BufferCapabilities.FlipContents flipAction);

Fixed version (ground truth):
/** 
 * Move the back buffer to the front buffer.
 * @param x1 the area to be flipped, upper left X coordinate
 * @param y1 the area to be flipped, upper left Y coordinate
 * @param x2 the area to be flipped, lower right X coordinate
 * @param y2 the area to be flipped, lower right Y coordinate
 * @param flipAction the flip action to perform
 */
void flip(int x1,int y1,int x2,int y2,BufferCapabilities.FlipContents flipAction);
Program: 78843
Project: 78843
Buggy source:
/** 
 * Returns the back buffer as image.
 * @return the back buffer as image
 * @see Component.FlipBufferStrategy#getBackBuffer
 */
Image getBackBuffer();

Fixed version (ground truth):
/** 
 * Returns the back buffer as image.
 * @return the back buffer as image
 */
Image getBackBuffer();
Program: 78844
Project: 78844
Buggy source:
/** 
 * Create   {@code numBuffers} flipping buffers with the specifiedbuffer capabilities.
 * @param numBuffers the number of buffers to create
 * @param caps the buffer capabilities
 * @throws AWTException if flip buffering is not supported
 * @see Component.FlipBufferStrategy#createBuffers
 */
void createBuffers(int numBuffers,BufferCapabilities caps) throws AWTException ;

Fixed version (ground truth):
/** 
 * Create   {@code numBuffers} flipping buffers with the specifiedbuffer capabilities.
 * @param numBuffers the number of buffers to create
 * @param caps the buffer capabilities
 * @throws AWTException if flip buffering is not supported
 */
void createBuffers(int numBuffers,BufferCapabilities caps) throws AWTException ;
Program: 78845
Project: 78845
Buggy source:
/** 
 * Destroys all created buffers.
 * @see Component.FlipBufferStrategy#destroyBuffers
 */
void destroyBuffers();

Fixed version (ground truth):
/** 
 * Destroys all created buffers.
 */
void destroyBuffers();
Program: 78846
Project: 78846
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: 78847
Project: 78847
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: 78848
Project: 78848
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: 78851
Project: 78851
Buggy source:
/** 
 * Invoked when an event is dispatched in the AWT.
 */
public void eventDispatched(AWTEvent event);

Fixed version (ground truth):
/** 
 * Invoked when an event is dispatched in the AWT.
 * @param event the event to be processed
 */
public void eventDispatched(AWTEvent event);
Program: 78852
Project: 78852
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: 78853
Project: 78853
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: 78854
Project: 78854
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: 78855
Project: 78855
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: 78856
Project: 78856
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: 78857
Project: 78857
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: 78858
Project: 78858
Buggy source:
/** 
 * Invoked when a component has been added to the container.
 */
public void componentAdded(ContainerEvent e);

Fixed version (ground truth):
/** 
 * Invoked when a component has been added to the container.
 * @param e the event to be processed
 */
public void componentAdded(ContainerEvent e);
Program: 78859
Project: 78859
Buggy source:
/** 
 * Invoked when a component has been removed from the container.
 */
public void componentRemoved(ContainerEvent e);

Fixed version (ground truth):
/** 
 * Invoked when a component has been removed from the container.
 * @param e the event to be processed
 */
public void componentRemoved(ContainerEvent e);
Program: 78860
Project: 78860
Buggy source:
/** 
 * Invoked when a component gains the keyboard focus.
 */
public void focusGained(FocusEvent e);

Fixed version (ground truth):
/** 
 * Invoked when a component gains the keyboard focus.
 * @param e the event to be processed
 */
public void focusGained(FocusEvent e);
Program: 78861
Project: 78861
Buggy source:
/** 
 * Invoked when a component loses the keyboard focus.
 */
public void focusLost(FocusEvent e);

Fixed version (ground truth):
/** 
 * Invoked when a component loses the keyboard focus.
 * @param e the event to be processed
 */
public void focusLost(FocusEvent e);
Program: 78862
Project: 78862
Buggy source:
/** 
 * Called when an ancestor of the source is moved.
 */
public void ancestorMoved(HierarchyEvent e);

Fixed version (ground truth):
/** 
 * Called when an ancestor of the source is moved.
 * @param e the event to be processed
 */
public void ancestorMoved(HierarchyEvent e);
Program: 78863
Project: 78863
Buggy source:
/** 
 * Called when an ancestor of the source is resized.
 */
public void ancestorResized(HierarchyEvent e);

Fixed version (ground truth):
/** 
 * Called when an ancestor of the source is resized.
 * @param e the event to be processed
 */
public void ancestorResized(HierarchyEvent e);
Program: 78864
Project: 78864
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: 78865
Project: 78865
Buggy source:
/** 
 * Returns whether or not the Control modifier is down on this event.
 */
public boolean isControlDown(){
  return (modifiers & CTRL_MASK) != 0;
}

Fixed version (ground truth):
/** 
 * Returns whether or not the Control modifier is down on this event.
 * @return whether or not the Control modifier is down on this event
 */
public boolean isControlDown(){
  return (modifiers & CTRL_MASK) != 0;
}
Program: 78866
Project: 78866
Buggy source:
/** 
 * Returns whether or not the Meta modifier is down on this event.
 */
public boolean isMetaDown(){
  return (modifiers & META_MASK) != 0;
}

Fixed version (ground truth):
/** 
 * Returns whether or not the Meta modifier is down on this event.
 * @return whether or not the Meta modifier is down on this event
 */
public boolean isMetaDown(){
  return (modifiers & META_MASK) != 0;
}