nus-yam/ex-repair huggingface dataset:
Program: 71592
Project: 71592
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: 71593
Project: 71593
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: 71594
Project: 71594
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: 71595
Project: 71595
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: 71596
Project: 71596
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: 71597
Project: 71597
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: 71598
Project: 71598
Buggy source:
/** 
 * signal complete
 */
void dropComplete(boolean success);

Fixed version (ground truth):
/** 
 * signal complete
 * @param success the signal
 */
void dropComplete(boolean success);
Program: 71599
Project: 71599
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: 71600
Project: 71600
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: 71601
Project: 71601
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: 71602
Project: 71602
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: 71603
Project: 71603
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: 71604
Project: 71604
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: 71605
Project: 71605
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: 71606
Project: 71606
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: 71607
Project: 71607
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: 71608
Project: 71608
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: 71609
Project: 71609
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: 71610
Project: 71610
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: 71611
Project: 71611
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: 71612
Project: 71612
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: 71613
Project: 71613
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: 71614
Project: 71614
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: 71615
Project: 71615
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: 71616
Project: 71616
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;
}
Program: 71617
Project: 71617
Buggy source:
/** 
 * Returns the extended modifier mask for this event. <P> Extended modifiers are the modifiers that ends with the _DOWN_MASK suffix, such as ALT_DOWN_MASK, BUTTON1_DOWN_MASK, and others. <P> Extended modifiers represent the state of all modal keys, such as ALT, CTRL, META, and the mouse buttons just after the event occurred. <P> For example, if the user presses <b>button 1</b> followed by <b>button 2</b>, and then releases them in the same order, the following sequence of events is generated: <PRE> <code>MOUSE_PRESSED</code>:  <code>BUTTON1_DOWN_MASK</code> <code>MOUSE_PRESSED</code>:  <code>BUTTON1_DOWN_MASK | BUTTON2_DOWN_MASK</code> <code>MOUSE_RELEASED</code>: <code>BUTTON2_DOWN_MASK</code> <code>MOUSE_CLICKED</code>:  <code>BUTTON2_DOWN_MASK</code> <code>MOUSE_RELEASED</code>: <code>MOUSE_CLICKED</code>: </PRE> <P> It is not recommended to compare the return value of this method using <code>==</code> because new modifiers can be added in the future. For example, the appropriate way to check that SHIFT and BUTTON1 are down, but CTRL is up is demonstrated by the following code: <PRE> int onmask = SHIFT_DOWN_MASK | BUTTON1_DOWN_MASK; int offmask = CTRL_DOWN_MASK; if ((event.getModifiersEx() &amp; (onmask | offmask)) == onmask) { ... } </PRE> The above code will work even if new modifiers are added.
 * @since 1.4
 */
public int getModifiersEx(){
  return modifiers & ~JDK_1_3_MODIFIERS;
}

Fixed version (ground truth):
/** 
 * Returns the extended modifier mask for this event. <P> Extended modifiers are the modifiers that ends with the _DOWN_MASK suffix, such as ALT_DOWN_MASK, BUTTON1_DOWN_MASK, and others. <P> Extended modifiers represent the state of all modal keys, such as ALT, CTRL, META, and the mouse buttons just after the event occurred. <P> For example, if the user presses <b>button 1</b> followed by <b>button 2</b>, and then releases them in the same order, the following sequence of events is generated: <PRE> <code>MOUSE_PRESSED</code>:  <code>BUTTON1_DOWN_MASK</code> <code>MOUSE_PRESSED</code>:  <code>BUTTON1_DOWN_MASK | BUTTON2_DOWN_MASK</code> <code>MOUSE_RELEASED</code>: <code>BUTTON2_DOWN_MASK</code> <code>MOUSE_CLICKED</code>:  <code>BUTTON2_DOWN_MASK</code> <code>MOUSE_RELEASED</code>: <code>MOUSE_CLICKED</code>: </PRE> <P> It is not recommended to compare the return value of this method using <code>==</code> because new modifiers can be added in the future. For example, the appropriate way to check that SHIFT and BUTTON1 are down, but CTRL is up is demonstrated by the following code: <PRE> int onmask = SHIFT_DOWN_MASK | BUTTON1_DOWN_MASK; int offmask = CTRL_DOWN_MASK; if ((event.getModifiersEx() &amp; (onmask | offmask)) == onmask) { ... } </PRE> The above code will work even if new modifiers are added.
 * @return the extended modifier mask for this event
 * @since 1.4
 */
public int getModifiersEx(){
  return modifiers & ~JDK_1_3_MODIFIERS;
}
Program: 71618
Project: 71618
Buggy source:
/** 
 * Returns whether or not the Shift modifier is down on this event.
 */
public boolean isShiftDown(){
  return (modifiers & SHIFT_MASK) != 0;
}

Fixed version (ground truth):
/** 
 * Returns whether or not the Shift modifier is down on this event.
 * @return whether or not the Shift modifier is down on this event
 */
public boolean isShiftDown(){
  return (modifiers & SHIFT_MASK) != 0;
}
Program: 71619
Project: 71619
Buggy source:
/** 
 * Returns whether or not this event has been consumed.
 * @see #consume
 */
public boolean isConsumed(){
  return consumed;
}

Fixed version (ground truth):
/** 
 * Returns whether or not this event has been consumed.
 * @return whether or not this event has been consumed
 * @see #consume
 */
public boolean isConsumed(){
  return consumed;
}
Program: 71621
Project: 71621
Buggy source:
/** 
 * Returns whether or not the AltGraph modifier is down on this event.
 */
public boolean isAltGraphDown(){
  return (modifiers & ALT_GRAPH_MASK) != 0;
}

Fixed version (ground truth):
/** 
 * Returns whether or not the AltGraph modifier is down on this event.
 * @return whether or not the AltGraph modifier is down on this event
 */
public boolean isAltGraphDown(){
  return (modifiers & ALT_GRAPH_MASK) != 0;
}
Program: 71623
Project: 71623
Buggy source:
/** 
 * Returns the difference in milliseconds between the timestamp of when this event occurred and midnight, January 1, 1970 UTC.
 */
public long getWhen(){
  return when;
}

Fixed version (ground truth):
/** 
 * Returns the difference in milliseconds between the timestamp of when this event occurred and midnight, January 1, 1970 UTC.
 * @return the difference in milliseconds between the timestamp and midnight, January 1, 1970 UTC
 */
public long getWhen(){
  return when;
}
Program: 71624
Project: 71624
Buggy source:
/** 
 * Returns the modifier mask for this event.
 */
public int getModifiers(){
  return modifiers & (JDK_1_3_MODIFIERS | HIGH_MODIFIERS);
}

Fixed version (ground truth):
/** 
 * Returns the modifier mask for this event.
 * @return the modifier mask for this event
 */
public int getModifiers(){
  return modifiers & (JDK_1_3_MODIFIERS | HIGH_MODIFIERS);
}
Program: 71625
Project: 71625
Buggy source:
/** 
 * Returns whether or not the Alt modifier is down on this event.
 */
public boolean isAltDown(){
  return (modifiers & ALT_MASK) != 0;
}

Fixed version (ground truth):
/** 
 * Returns whether or not the Alt modifier is down on this event.
 * @return whether or not the Alt modifier is down on this event
 */
public boolean isAltDown(){
  return (modifiers & ALT_MASK) != 0;
}
Program: 71626
Project: 71626
Buggy source:
/** 
 * Gets the number of committed characters in the text.
 */
public int getCommittedCharacterCount(){
  return committedCharacterCount;
}

Fixed version (ground truth):
/** 
 * Gets the number of committed characters in the text.
 * @return the number of committed characters in the text
 */
public int getCommittedCharacterCount(){
  return committedCharacterCount;
}
Program: 71627
Project: 71627
Buggy source:
/** 
 * Invoked when the text entered through an input method has changed.
 */
void inputMethodTextChanged(InputMethodEvent event);

Fixed version (ground truth):
/** 
 * Invoked when the text entered through an input method has changed.
 * @param event the event to be processed
 */
void inputMethodTextChanged(InputMethodEvent event);
Program: 71628
Project: 71628
Buggy source:
/** 
 * Invoked when the caret within composed text has changed.
 */
void caretPositionChanged(InputMethodEvent event);

Fixed version (ground truth):
/** 
 * Invoked when the caret within composed text has changed.
 * @param event the event to be processed
 */
void caretPositionChanged(InputMethodEvent event);
Program: 71629
Project: 71629
Buggy source:
/** 
 * Invoked when an item has been selected or deselected by the user. The code written for this method performs the operations that need to occur when an item is selected (or deselected).
 */
void itemStateChanged(ItemEvent e);

Fixed version (ground truth):
/** 
 * Invoked when an item has been selected or deselected by the user. The code written for this method performs the operations that need to occur when an item is selected (or deselected).
 * @param e the event to be processed
 */
void itemStateChanged(ItemEvent e);
Program: 71630
Project: 71630
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: 71631
Project: 71631
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: 71632
Project: 71632
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: 71633
Project: 71633
Buggy source:
/** 
 * Destroys all created buffers.
 * @see Component.FlipBufferStrategy#destroyBuffers
 */
void destroyBuffers();

Fixed version (ground truth):
/** 
 * Destroys all created buffers.
 */
void destroyBuffers();
Program: 71634
Project: 71634
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: 71635
Project: 71635
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: 71636
Project: 71636
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: 71639
Project: 71639
Buggy source:
public void run(){
  Invoker.GroupAndInvokeCount myGroupAndInvokeCount=Invoker.getGroupAndInvokeCount();
  final boolean isPooledThread=(myGroupAndInvokeCount != null);
  boolean replaceMe=false;
  Event ev;
  try {
    for (; ; ) {
      if (isPooledThread)       myGroupAndInvokeCount.resetInvokeCount();
      try {
        replaceMe=false;
        ev=queue.take();
        if (ev == NEED_TO_POLL) {
          try {
            ev=poll();
          }
 catch (          IOException x) {
            x.printStackTrace();
            return;
          }
        }
      }
 catch (      InterruptedException x) {
        continue;
      }
      if (ev == EXECUTE_TASK_OR_SHUTDOWN) {
        Runnable task=pollTask();
        if (task == null) {
          return;
        }
        replaceMe=true;
        task.run();
        continue;
      }
      try {
        ev.channel().onEvent(ev.events(),isPooledThread);
      }
 catch (      Error x) {
        replaceMe=true;
        throw x;
      }
catch (      RuntimeException x) {
        replaceMe=true;
        throw x;
      }
    }
  }
  finally {
    int remaining=threadExit(this,replaceMe);
    if (remaining == 0 && isShutdown()) {
      implClose();
    }
  }
}

Fixed version (ground truth):
public void run(){
  Invoker.GroupAndInvokeCount myGroupAndInvokeCount=Invoker.getGroupAndInvokeCount();
  final boolean isPooledThread=(myGroupAndInvokeCount != null);
  boolean replaceMe=false;
  Event ev;
  try {
    for (; ; ) {
      if (isPooledThread)       myGroupAndInvokeCount.resetInvokeCount();
      try {
        replaceMe=false;
        ev=queue.take();
        if (ev == NEED_TO_POLL) {
          try {
            ev=poll();
          }
 catch (          IOException x) {
            x.printStackTrace();
            return;
          }
        }
      }
 catch (      InterruptedException x) {
        continue;
      }
      if (ev == CONTINUE_AFTER_CTL_EVENT) {
        continue;
      }
      if (ev == EXECUTE_TASK_OR_SHUTDOWN) {
        Runnable task=pollTask();
        if (task == null) {
          return;
        }
        replaceMe=true;
        task.run();
        continue;
      }
      try {
        ev.channel().onEvent(ev.events(),isPooledThread);
      }
 catch (      Error x) {
        replaceMe=true;
        throw x;
      }
catch (      RuntimeException x) {
        replaceMe=true;
        throw x;
      }
    }
  }
  finally {
    int remaining=threadExit(this,replaceMe);
    if (remaining == 0 && isShutdown()) {
      implClose();
    }
  }
}
Program: 71640
Project: 71640
Buggy source:
private Event poll() throws IOException {
  try {
    for (; ; ) {
      int n;
      controlLock.lock();
      try {
        n=pollsetPoll(pollset,address,MAX_POLL_EVENTS);
      }
  finally {
        controlLock.unlock();
      }
      fdToChannelLock.readLock().lock();
      try {
        while (n-- > 0) {
          long eventAddress=getEvent(address,n);
          int fd=getDescriptor(eventAddress);
          pollsetCtl(pollset,PS_DELETE,fd,0);
          if (fd == sp[0]) {
            if (wakeupCount.decrementAndGet() == 0) {
              drain1(sp[0]);
            }
            pollsetCtl(pollset,PS_ADD,sp[0],Net.POLLIN);
            if (n > 0) {
              queue.offer(EXECUTE_TASK_OR_SHUTDOWN);
              continue;
            }
            return EXECUTE_TASK_OR_SHUTDOWN;
          }
          if (fd == ctlSp[0]) {
synchronized (controlQueue) {
              drain1(ctlSp[0]);
              pollsetCtl(pollset,PS_ADD,ctlSp[0],Net.POLLIN);
              processControlQueue();
            }
            continue;
          }
          PollableChannel channel=fdToChannel.get(fd);
          if (channel != null) {
            int events=getRevents(eventAddress);
            Event ev=new Event(channel,events);
            if (n > 0) {
              queue.offer(ev);
            }
 else {
              return ev;
            }
          }
        }
      }
  finally {
        fdToChannelLock.readLock().unlock();
      }
    }
  }
  finally {
    queue.offer(NEED_TO_POLL);
  }
}

Fixed version (ground truth):
private Event poll() throws IOException {
  try {
    for (; ; ) {
      int n;
      controlLock.lock();
      try {
        n=pollsetPoll(pollset,address,MAX_POLL_EVENTS);
      }
  finally {
        controlLock.unlock();
      }
      fdToChannelLock.readLock().lock();
      try {
        while (n-- > 0) {
          long eventAddress=getEvent(address,n);
          int fd=getDescriptor(eventAddress);
          if (fd != sp[0] && fd != ctlSp[0]) {
synchronized (controlQueue) {
              pollsetCtl(pollset,PS_DELETE,fd,0);
            }
          }
          if (fd == sp[0]) {
            if (wakeupCount.decrementAndGet() == 0) {
              drain1(sp[0]);
            }
            if (n > 0) {
              queue.offer(EXECUTE_TASK_OR_SHUTDOWN);
              continue;
            }
            return EXECUTE_TASK_OR_SHUTDOWN;
          }
          if (fd == ctlSp[0]) {
synchronized (controlQueue) {
              drain1(ctlSp[0]);
              processControlQueue();
            }
            if (n > 0) {
              continue;
            }
            return CONTINUE_AFTER_CTL_EVENT;
          }
          PollableChannel channel=fdToChannel.get(fd);
          if (channel != null) {
            int events=getRevents(eventAddress);
            Event ev=new Event(channel,events);
            if (n > 0) {
              queue.offer(ev);
            }
 else {
              return ev;
            }
          }
        }
      }
  finally {
        fdToChannelLock.readLock().unlock();
      }
    }
  }
  finally {
    queue.offer(NEED_TO_POLL);
  }
}
Program: 71641
Project: 71641
Buggy source:
/** 
 * Returns the pre-digested input stream, if <a href="XMLSignContext.html#Supported Properties">reference caching</a> is enabled. This is the input to the digest operation during a validation or signing operation.
 * @return an input stream containing the pre-digested input, or<code>null</code> if reference caching is not enabled or this reference has not been generated or validated
 */
InputStream getDigestInputStream();

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

Fixed version (ground truth):
/** 
 * Returns the dereferenced data, if <a href="XMLSignContext.html#Supported%20Properties">reference caching</a> is enabled. This is the result of dereferencing the URI of this reference during a validation or generation operation.
 * @return the dereferenced data, or <code>null</code> if referencecaching is not enabled or this reference has not been generated or validated
 */
Data getDereferencedData();
Program: 71644
Project: 71644
Buggy source:
/** 
 * Returns a valid scripting language executable program with given statements. For instance an implementation for a PHP engine might be: <p> <pre>  {@code}public String getProgram(String... statements)  String retval = "<?\n"; int len = statements.length; for (int i = 0; i < len; i++) { retval += statements[i] + ";\n"; } return retval += "?>"; } }</pre>
 * @param statements The statements to be executed.  May be return values ofcalls to the <code>getMethodCallSyntax</code> and <code>getOutputStatement</code> methods.
 * @return The Program
 */
public String getProgram(String... statements);

Fixed version (ground truth):
/** 
 * Returns a valid scripting language executable program with given statements. For instance an implementation for a PHP engine might be: <pre>  {@code}public String getProgram(String... statements)  String retval = "<?\n"; int len = statements.length; for (int i = 0; i < len; i++) { retval += statements[i] + ";\n"; } return retval += "?>"; } }</pre>
 * @param statements The statements to be executed.  May be return values ofcalls to the <code>getMethodCallSyntax</code> and <code>getOutputStatement</code> methods.
 * @return The Program
 */
public String getProgram(String... statements);
Program: 71645
Project: 71645
Buggy source:
/** 
 * Returns a String that can be used as a statement to display the specified String  using the syntax of the supported scripting language.  For instance, the implementation for a Perl engine might be; <p> <pre><code> public String getOutputStatement(String toDisplay) { return "print(" + toDisplay + ")"; } </code></pre>
 * @param toDisplay The String to be displayed by the returned statement.
 * @return The string used to display the String in the syntax of the scripting language.
 */
public String getOutputStatement(String toDisplay);

Fixed version (ground truth):
/** 
 * Returns a String that can be used as a statement to display the specified String  using the syntax of the supported scripting language.  For instance, the implementation for a Perl engine might be; <pre><code> public String getOutputStatement(String toDisplay) { return "print(" + toDisplay + ")"; } </code></pre>
 * @param toDisplay The String to be displayed by the returned statement.
 * @return The string used to display the String in the syntax of the scripting language.
 */
public String getOutputStatement(String toDisplay);
Program: 71646
Project: 71646
Buggy source:
/** 
 * Returns a String which can be used to invoke a method of a  Java object using the syntax of the supported scripting language.  For instance, an implementation for a Javascript engine might be; <p> <pre>  {@code public String getMethodCallSyntax(String obj,}String m, String... args)  String ret = obj; ret += "." + m + "("; for (int i = 0; i < args.length; i++) { ret += args[i]; if (i < args.length - 1) { ret += ","; } } ret += ")"; return ret; } } </pre> <p>
 * @param obj The name representing the object whose method is to be invoked. Thename is the one used to create bindings using the <code>put</code> method of <code>ScriptEngine</code>, the <code>put</code> method of an <code>ENGINE_SCOPE</code> <code>Bindings</code>,or the <code>setAttribute</code> method of <code>ScriptContext</code>.  The identifier used in scripts may be a decorated form of the specified one.
 * @param m The name of the method to invoke.
 * @param args names of the arguments in the method call.
 * @return The String used to invoke the method in the syntax of the scripting language.
 */
public String getMethodCallSyntax(String obj,String m,String... args);

Fixed version (ground truth):
/** 
 * Returns a String which can be used to invoke a method of a  Java object using the syntax of the supported scripting language.  For instance, an implementation for a Javascript engine might be; <pre>  {@code public String getMethodCallSyntax(String obj,}String m, String... args)  String ret = obj; ret += "." + m + "("; for (int i = 0; i < args.length; i++) { ret += args[i]; if (i < args.length - 1) { ret += ","; } } ret += ")"; return ret; } } </pre> <p>
 * @param obj The name representing the object whose method is to be invoked. Thename is the one used to create bindings using the <code>put</code> method of <code>ScriptEngine</code>, the <code>put</code> method of an <code>ENGINE_SCOPE</code> <code>Bindings</code>,or the <code>setAttribute</code> method of <code>ScriptContext</code>.  The identifier used in scripts may be a decorated form of the specified one.
 * @param m The name of the method to invoke.
 * @param args names of the arguments in the method call.
 * @return The String used to invoke the method in the syntax of the scripting language.
 */
public String getMethodCallSyntax(String obj,String m,String... args);
Program: 71647
Project: 71647
Buggy source:
/** 
 * Overwrites the Transform in the <code>Graphics2D</code> context. WARNING: This method should <b>never</b> be used to apply a new coordinate transform on top of an existing transform because the <code>Graphics2D</code> might already have a transform that is needed for other purposes, such as rendering Swing components or applying a scaling transformation to adjust for the resolution of a printer. <p>To add a coordinate transform, use the <code>transform</code>, <code>rotate</code>, <code>scale</code>, or <code>shear</code> methods.  The <code>setTransform</code> method is intended only for restoring the original <code>Graphics2D</code> transform after rendering, as shown in this example: <pre><blockquote> // Get the current transform AffineTransform saveAT = g2.getTransform(); // Perform transformation g2d.transform(...); // Render g2d.draw(...); // Restore original transform g2d.setTransform(saveAT); </blockquote></pre>
 * @param Tx the <code>AffineTransform</code> that was retrievedfrom the <code>getTransform</code> method
 * @see #transform
 * @see #getTransform
 * @see AffineTransform
 */
public abstract void setTransform(AffineTransform Tx);

Fixed version (ground truth):
/** 
 * Overwrites the Transform in the <code>Graphics2D</code> context. WARNING: This method should <b>never</b> be used to apply a new coordinate transform on top of an existing transform because the <code>Graphics2D</code> might already have a transform that is needed for other purposes, such as rendering Swing components or applying a scaling transformation to adjust for the resolution of a printer. <p>To add a coordinate transform, use the <code>transform</code>, <code>rotate</code>, <code>scale</code>, or <code>shear</code> methods.  The <code>setTransform</code> method is intended only for restoring the original <code>Graphics2D</code> transform after rendering, as shown in this example: <pre> // Get the current transform AffineTransform saveAT = g2.getTransform(); // Perform transformation g2d.transform(...); // Render g2d.draw(...); // Restore original transform g2d.setTransform(saveAT); </pre>
 * @param Tx the <code>AffineTransform</code> that was retrievedfrom the <code>getTransform</code> method
 * @see #transform
 * @see #getTransform
 * @see AffineTransform
 */
public abstract void setTransform(AffineTransform Tx);
Program: 71648
Project: 71648
Buggy source:
/** 
 * Gets a property of this image by name. <p> Individual property names are defined by the various image formats. If a property is not defined for a particular image, this method returns the <code>UndefinedProperty</code> object. <p> If the properties for this image are not yet known, this method returns <code>null</code>, and the <code>ImageObserver</code> object is notified later. <p> The property name <code>"comment"</code> should be used to store an optional comment which can be presented to the application as a description of the image, its source, or its author.
 * @param name   a property name.
 * @param observer   an object waiting for this image to be loaded.
 * @return      the value of the named property.
 * @throws      <code>NullPointerException</code> if the property name is null.
 * @see java.awt.image.ImageObserver
 * @see java.awt.Image#UndefinedProperty
 */
public abstract Object getProperty(String name,ImageObserver observer);

Fixed version (ground truth):
/** 
 * Gets a property of this image by name. <p> Individual property names are defined by the various image formats. If a property is not defined for a particular image, this method returns the <code>UndefinedProperty</code> object. <p> If the properties for this image are not yet known, this method returns <code>null</code>, and the <code>ImageObserver</code> object is notified later. <p> The property name <code>"comment"</code> should be used to store an optional comment which can be presented to the application as a description of the image, its source, or its author.
 * @param name   a property name.
 * @param observer   an object waiting for this image to be loaded.
 * @return      the value of the named property.
 * @throws NullPointerException if the property name is null.
 * @see java.awt.image.ImageObserver
 * @see java.awt.Image#UndefinedProperty
 */
public abstract Object getProperty(String name,ImageObserver observer);
Program: 71649
Project: 71649
Buggy source:
/** 
 * Returns <code>true</code> if this <code>RenderingHints</code> contains a mapping for the specified key.
 * @param key key whose presence in this<code>RenderingHints</code> is to be tested.
 * @return <code>true</code> if this <code>RenderingHints</code>contains a mapping for the specified key.
 * @exception <code>ClassCastException</code> if the key can notbe cast to <code>RenderingHints.Key</code>
 */
public boolean containsKey(Object key){
  return hintmap.containsKey((Key)key);
}

Fixed version (ground truth):
/** 
 * Returns   {@code true} if this {@code RenderingHints}contains a mapping for the specified key.
 * @param key key whose presence in this{@code RenderingHints} is to be tested.
 * @return {@code true} if this {@code RenderingHints}contains a mapping for the specified key.
 * @exception ClassCastException if the key can notbe cast to  {@code RenderingHints.Key}
 */
public boolean containsKey(Object key){
  return hintmap.containsKey((Key)key);
}
Program: 71650
Project: 71650
Buggy source:
/** 
 * Maps the specified <code>key</code> to the specified <code>value</code> in this <code>RenderingHints</code> object. Neither the key nor the value can be <code>null</code>. The value can be retrieved by calling the <code>get</code> method with a key that is equal to the original key.
 * @param key     the rendering hint key.
 * @param value   the rendering hint value.
 * @return     the previous value of the specified key in this objector <code>null</code> if it did not have one.
 * @exception <code>NullPointerException</code> if the key is<code>null</code>.
 * @exception <code>ClassCastException</code> if the key can notbe cast to <code>RenderingHints.Key</code>
 * @exception <code>IllegalArgumentException</code> if the{@link Key#isCompatibleValue(java.lang.Object) Key.isCompatibleValue()}method of the specified key returns false for the specified value
 * @see #get(Object)
 */
public Object put(Object key,Object value){
  if (!((Key)key).isCompatibleValue(value)) {
    throw new IllegalArgumentException(value + "String_Node_Str" + key);
  }
  return hintmap.put((Key)key,value);
}

Fixed version (ground truth):
/** 
 * Maps the specified   {@code key} to the specified{@code value} in this {@code RenderingHints} object.Neither the key nor the value can be  {@code null}. The value can be retrieved by calling the   {@code get} methodwith a key that is equal to the original key.
 * @param key     the rendering hint key.
 * @param value   the rendering hint value.
 * @return     the previous value of the specified key in this objector  {@code null} if it did not have one.
 * @exception NullPointerException if the key is{@code null}.
 * @exception ClassCastException if the key can notbe cast to  {@code RenderingHints.Key}
 * @exception IllegalArgumentException if the{@link Key#isCompatibleValue(java.lang.Object) Key.isCompatibleValue()}method of the specified key returns false for the specified value
 * @see #get(Object)
 */
public Object put(Object key,Object value){
  if (!((Key)key).isCompatibleValue(value)) {
    throw new IllegalArgumentException(value + "String_Node_Str" + key);
  }
  return hintmap.put((Key)key,value);
}
Program: 71651
Project: 71651
Buggy source:
/** 
 * Removes the key and its corresponding value from this <code>RenderingHints</code> object. This method does nothing if the key is not in this <code>RenderingHints</code> object.
 * @param key   the rendering hints key that needs to be removed
 * @exception <code>ClassCastException</code> if the key can notbe cast to <code>RenderingHints.Key</code>
 * @return  the value to which the key had previously been mapped in this<code>RenderingHints</code> object, or <code>null</code> if the key did not have a mapping.
 */
public Object remove(Object key){
  return hintmap.remove((Key)key);
}

Fixed version (ground truth):
/** 
 * Removes the key and its corresponding value from this  {@code RenderingHints} object. This method does nothing if thekey is not in this  {@code RenderingHints} object.
 * @param key   the rendering hints key that needs to be removed
 * @exception ClassCastException if the key can notbe cast to  {@code RenderingHints.Key}
 * @return  the value to which the key had previously been mapped in this{@code RenderingHints} object, or {@code null}if the key did not have a mapping.
 */
public Object remove(Object key){
  return hintmap.remove((Key)key);
}
Program: 71652
Project: 71652
Buggy source:
/** 
 * Returns the value to which the specified key is mapped.
 * @param key   a rendering hint key
 * @return  the value to which the key is mapped in this object or<code>null</code> if the key is not mapped to any value in this object.
 * @exception <code>ClassCastException</code> if the key can notbe cast to <code>RenderingHints.Key</code>
 * @see #put(Object,Object)
 */
public Object get(Object key){
  return hintmap.get((Key)key);
}

Fixed version (ground truth):
/** 
 * Returns the value to which the specified key is mapped.
 * @param key   a rendering hint key
 * @return  the value to which the key is mapped in this object or{@code null} if the key is not mapped to any value inthis object.
 * @exception ClassCastException if the key can notbe cast to  {@code RenderingHints.Key}
 * @see #put(Object,Object)
 */
public Object get(Object key){
  return hintmap.get((Key)key);
}
Program: 71653
Project: 71653
Buggy source:
/** 
 * Copies all of the mappings from the specified <code>Map</code> to this <code>RenderingHints</code>.  These mappings replace any mappings that this <code>RenderingHints</code> had for any of the keys currently in the specified <code>Map</code>.
 * @param m the specified <code>Map</code>
 * @exception <code>ClassCastException</code> class of a key or valuein the specified <code>Map</code> prevents it from being stored in this <code>RenderingHints</code>.
 * @exception <code>IllegalArgumentException</code> some aspectof a key or value in the specified <code>Map</code> prevents it from being stored in this <code>RenderingHints</code>.
 */
public void putAll(Map<?,?> m){
  if (RenderingHints.class.isInstance(m)) {
    for (    Map.Entry<?,?> entry : m.entrySet())     hintmap.put(entry.getKey(),entry.getValue());
  }
 else {
    for (    Map.Entry<?,?> entry : m.entrySet())     put(entry.getKey(),entry.getValue());
  }
}

Fixed version (ground truth):
/** 
 * Copies all of the mappings from the specified   {@code Map}to this   {@code RenderingHints}.  These mappings replace any mappings that this   {@code RenderingHints} had for anyof the keys currently in the specified  {@code Map}.
 * @param m the specified {@code Map}
 * @exception ClassCastException class of a key or valuein the specified  {@code Map} prevents it from beingstored in this  {@code RenderingHints}.
 * @exception IllegalArgumentException some aspectof a key or value in the specified  {@code Map}prevents it from being stored in this   {@code RenderingHints}.
 */
public void putAll(Map<?,?> m){
  if (RenderingHints.class.isInstance(m)) {
    for (    Map.Entry<?,?> entry : m.entrySet())     hintmap.put(entry.getKey(),entry.getValue());
  }
 else {
    for (    Map.Entry<?,?> entry : m.entrySet())     put(entry.getKey(),entry.getValue());
  }
}
Program: 71654
Project: 71654
Buggy source:
/** 
 * Returns an <code>int</code> that ORs together the values for all the ranges that will be shaped. <p> For example, to check if a shaper shapes to Arabic, you would use the following: <blockquote> <code>if ((shaper.getRanges() &amp; shaper.ARABIC) != 0) { ... </code> </blockquote> <p>Note that this method supports only the bit mask-based ranges. Call   {@link #getRangeSet()} for the enum-based ranges.
 * @return the values for all the ranges to be shaped.
 */
public int getRanges(){
  return mask & ~CONTEXTUAL_MASK;
}

Fixed version (ground truth):
/** 
 * Returns an <code>int</code> that ORs together the values for all the ranges that will be shaped. <p> For example, to check if a shaper shapes to Arabic, you would use the following: <blockquote>  {@code if ((shaper.getRanges() & shaper.ARABIC) != 0) &#123; ... }</blockquote> <p>Note that this method supports only the bit mask-based ranges. Call   {@link #getRangeSet()} for the enum-based ranges.
 * @return the values for all the ranges to be shaped.
 */
public int getRanges(){
  return mask & ~CONTEXTUAL_MASK;
}
Program: 71655
Project: 71655
Buggy source:
/** 
 * Constructs a new <code>FlatteningPathIterator</code> object that flattens a path as it iterates over it. The <code>limit</code> parameter allows you to control the maximum number of recursive subdivisions that the iterator can make before it assumes that the curve is flat enough without measuring against the <code>flatness</code> parameter. The flattened iteration therefore never generates more than a maximum of <code>(2^limit)</code> line segments per curve.
 * @param src the original unflattened path being iterated over
 * @param flatness the maximum allowable distance between thecontrol points and the flattened curve
 * @param limit the maximum number of recursive subdivisionsallowed for any curved segment
 * @exception <code>IllegalArgumentException</code> if<code>flatness</code> or <code>limit</code> is less than zero
 */
public FlatteningPathIterator(PathIterator src,double flatness,int limit){
  if (flatness < 0.0) {
    throw new IllegalArgumentException("String_Node_Str");
  }
  if (limit < 0) {
    throw new IllegalArgumentException("String_Node_Str");
  }
  this.src=src;
  this.squareflat=flatness * flatness;
  this.limit=limit;
  this.levels=new int[limit + 1];
  next(false);
}

Fixed version (ground truth):
/** 
 * Constructs a new <code>FlatteningPathIterator</code> object that flattens a path as it iterates over it. The <code>limit</code> parameter allows you to control the maximum number of recursive subdivisions that the iterator can make before it assumes that the curve is flat enough without measuring against the <code>flatness</code> parameter. The flattened iteration therefore never generates more than a maximum of <code>(2^limit)</code> line segments per curve.
 * @param src the original unflattened path being iterated over
 * @param flatness the maximum allowable distance between thecontrol points and the flattened curve
 * @param limit the maximum number of recursive subdivisionsallowed for any curved segment
 * @exception IllegalArgumentException if<code>flatness</code> or <code>limit</code> is less than zero
 */
public FlatteningPathIterator(PathIterator src,double flatness,int limit){
  if (flatness < 0.0) {
    throw new IllegalArgumentException("String_Node_Str");
  }
  if (limit < 0) {
    throw new IllegalArgumentException("String_Node_Str");
  }
  this.src=src;
  this.squareflat=flatness * flatness;
  this.limit=limit;
  this.levels=new int[limit + 1];
  next(false);
}