nus-yam/ex-repair huggingface dataset:
Program: 71356
Project: 71356
Buggy source:
/** 
 * Gets this <code>InputMap</code>'s parent.
 * @return map  the <code>InputMap</code> that is the parent of this one,or null if this <code>InputMap</code> has no parent
 */
public InputMap getParent(){
  return parent;
}

Fixed version (ground truth):
/** 
 * Gets this   {@code InputMap}'s parent.
 * @return map the {@code InputMap} that is the parent of this one,or null if this  {@code InputMap} has no parent
 */
public InputMap getParent(){
  return parent;
}
Program: 71357
Project: 71357
Buggy source:
/** 
 * Returns the number of <code>KeyStroke</code> bindings.
 */
public int size(){
  if (arrayTable == null) {
    return 0;
  }
  return arrayTable.size();
}

Fixed version (ground truth):
/** 
 * Returns the number of   {@code KeyStroke} bindings.
 * @return the number of {@code KeyStroke} bindings
 */
public int size(){
  if (arrayTable == null) {
    return 0;
  }
  return arrayTable.size();
}
Program: 71358
Project: 71358
Buggy source:
/** 
 * Returns the <code>KeyStroke</code>s that are bound in this <code>InputMap</code>.
 */
public KeyStroke[] keys(){
  if (arrayTable == null) {
    return null;
  }
  KeyStroke[] keys=new KeyStroke[arrayTable.size()];
  arrayTable.getKeys(keys);
  return keys;
}

Fixed version (ground truth):
/** 
 * Returns the   {@code KeyStroke}s that are bound in this   {@code InputMap}.
 * @return an array of the {@code KeyStroke}s that are bound in this  {@code InputMap}
 */
public KeyStroke[] keys(){
  if (arrayTable == null) {
    return null;
  }
  KeyStroke[] keys=new KeyStroke[arrayTable.size()];
  arrayTable.getKeys(keys);
  return keys;
}
Program: 71359
Project: 71359
Buggy source:
/** 
 * Returns the binding for <code>keyStroke</code>, messaging the parent <code>InputMap</code> if the binding is not locally defined.
 */
public Object get(KeyStroke keyStroke){
  if (arrayTable == null) {
    InputMap parent=getParent();
    if (parent != null) {
      return parent.get(keyStroke);
    }
    return null;
  }
  Object value=arrayTable.get(keyStroke);
  if (value == null) {
    InputMap parent=getParent();
    if (parent != null) {
      return parent.get(keyStroke);
    }
  }
  return value;
}

Fixed version (ground truth):
/** 
 * Returns the binding for   {@code keyStroke}, messaging the parent   {@code InputMap} if the binding is not locally defined.
 * @param keyStroke the {@code KeyStroke} for which to get the binding
 * @return the binding for {@code keyStroke}
 */
public Object get(KeyStroke keyStroke){
  if (arrayTable == null) {
    InputMap parent=getParent();
    if (parent != null) {
      return parent.get(keyStroke);
    }
    return null;
  }
  Object value=arrayTable.get(keyStroke);
  if (value == null) {
    InputMap parent=getParent();
    if (parent != null) {
      return parent.get(keyStroke);
    }
  }
  return value;
}
Program: 71360
Project: 71360
Buggy source:
/** 
 * Removes all the mappings from this <code>InputMap</code>.
 */
public void clear(){
  if (arrayTable != null) {
    arrayTable.clear();
  }
}

Fixed version (ground truth):
/** 
 * Removes all the mappings from this   {@code InputMap}.
 */
public void clear(){
  if (arrayTable != null) {
    arrayTable.clear();
  }
}
Program: 71361
Project: 71361
Buggy source:
/** 
 * Returns an array of the <code>KeyStroke</code>s defined in this <code>InputMap</code> and its parent. This differs from <code>keys()</code> in that this method includes the keys defined in the parent.
 */
public KeyStroke[] allKeys(){
  int count=size();
  InputMap parent=getParent();
  if (count == 0) {
    if (parent != null) {
      return parent.allKeys();
    }
    return keys();
  }
  if (parent == null) {
    return keys();
  }
  KeyStroke[] keys=keys();
  KeyStroke[] pKeys=parent.allKeys();
  if (pKeys == null) {
    return keys;
  }
  if (keys == null) {
    return pKeys;
  }
  HashMap<KeyStroke,KeyStroke> keyMap=new HashMap<KeyStroke,KeyStroke>();
  int counter;
  for (counter=keys.length - 1; counter >= 0; counter--) {
    keyMap.put(keys[counter],keys[counter]);
  }
  for (counter=pKeys.length - 1; counter >= 0; counter--) {
    keyMap.put(pKeys[counter],pKeys[counter]);
  }
  KeyStroke[] allKeys=new KeyStroke[keyMap.size()];
  return keyMap.keySet().toArray(allKeys);
}

Fixed version (ground truth):
/** 
 * Returns an array of the   {@code KeyStroke}s defined in this  {@code InputMap} and its parent. This differs from {@code keys()}in that this method includes the keys defined in the parent.
 * @return an array of the {@code KeyStroke}s defined in this  {@code InputMap} and its parent
 */
public KeyStroke[] allKeys(){
  int count=size();
  InputMap parent=getParent();
  if (count == 0) {
    if (parent != null) {
      return parent.allKeys();
    }
    return keys();
  }
  if (parent == null) {
    return keys();
  }
  KeyStroke[] keys=keys();
  KeyStroke[] pKeys=parent.allKeys();
  if (pKeys == null) {
    return keys;
  }
  if (keys == null) {
    return pKeys;
  }
  HashMap<KeyStroke,KeyStroke> keyMap=new HashMap<KeyStroke,KeyStroke>();
  int counter;
  for (counter=keys.length - 1; counter >= 0; counter--) {
    keyMap.put(keys[counter],keys[counter]);
  }
  for (counter=pKeys.length - 1; counter >= 0; counter--) {
    keyMap.put(pKeys[counter],pKeys[counter]);
  }
  KeyStroke[] allKeys=new KeyStroke[keyMap.size()];
  return keyMap.keySet().toArray(allKeys);
}
Program: 71362
Project: 71362
Buggy source:
/** 
 * Creates an <code>InputMap</code> with no parent and no mappings.
 */
public InputMap(){
}

Fixed version (ground truth):
/** 
 * Creates an   {@code InputMap} with no parent and no mappings.
 */
public InputMap(){
}
Program: 71363
Project: 71363
Buggy source:
/** 
 * Sets this <code>InputMap</code>'s parent.
 * @param map  the <code>InputMap</code> that is the parent of this one
 */
public void setParent(InputMap map){
  this.parent=map;
}

Fixed version (ground truth):
/** 
 * Sets this   {@code InputMap}'s parent.
 * @param map the {@code InputMap} that is the parent of this one
 */
public void setParent(InputMap map){
  this.parent=map;
}
Program: 71364
Project: 71364
Buggy source:
/** 
 * Adds a binding for <code>keyStroke</code> to <code>actionMapKey</code>. If <code>actionMapKey</code> is null, this removes the current binding for <code>keyStroke</code>.
 */
public void put(KeyStroke keyStroke,Object actionMapKey){
  if (keyStroke == null) {
    return;
  }
  if (actionMapKey == null) {
    remove(keyStroke);
  }
 else {
    if (arrayTable == null) {
      arrayTable=new ArrayTable();
    }
    arrayTable.put(keyStroke,actionMapKey);
  }
}

Fixed version (ground truth):
/** 
 * Adds a binding for   {@code keyStroke} to {@code actionMapKey}. If   {@code actionMapKey} is null, this removes the current bindingfor  {@code keyStroke}.
 * @param keyStroke a {@code KeyStroke}
 * @param actionMapKey an action map key
 */
public void put(KeyStroke keyStroke,Object actionMapKey){
  if (keyStroke == null) {
    return;
  }
  if (actionMapKey == null) {
    remove(keyStroke);
  }
 else {
    if (arrayTable == null) {
      arrayTable=new ArrayTable();
    }
    arrayTable.put(keyStroke,actionMapKey);
  }
}
Program: 71365
Project: 71365
Buggy source:
/** 
 * Removes the binding for <code>key</code> from this <code>InputMap</code>.
 */
public void remove(KeyStroke key){
  if (arrayTable != null) {
    arrayTable.remove(key);
  }
}

Fixed version (ground truth):
/** 
 * Removes the binding for   {@code key} from this {@code InputMap}.
 * @param key the {@code KeyStroke} for which to remove the binding
 */
public void remove(KeyStroke key){
  if (arrayTable != null) {
    arrayTable.remove(key);
  }
}
Program: 71366
Project: 71366
Buggy source:
/** 
 * Returns the currently registered <code>EditorKit</code> class name for the type <code>type</code>.
 * @param type  the non-<code>null</code> content type
 * @since 1.3
 */
public static String getEditorKitClassNameForContentType(String type){
  return getKitTypeRegistry().get(type);
}

Fixed version (ground truth):
/** 
 * Returns the currently registered   {@code EditorKit} class name for thetype  {@code type}.
 * @param type  the non-{@code null} content type
 * @return a {@code String} containing the {@code EditorKit} class namefor  {@code type}
 * @since 1.3
 */
public static String getEditorKitClassNameForContentType(String type){
  return getKitTypeRegistry().get(type);
}
Program: 71367
Project: 71367
Buggy source:
/** 
 * Supports reporting bound property changes.  This method can be called when a bound property has changed and it will send the appropriate <code>PropertyChangeEvent</code> to any registered <code>PropertyChangeListeners</code>.
 */
protected void firePropertyChange(String propertyName,Object oldValue,Object newValue){
  if (changeSupport == null || (oldValue != null && newValue != null && oldValue.equals(newValue))) {
    return;
  }
  changeSupport.firePropertyChange(propertyName,oldValue,newValue);
}

Fixed version (ground truth):
/** 
 * Supports reporting bound property changes.  This method can be called when a bound property has changed and it will send the appropriate <code>PropertyChangeEvent</code> to any registered <code>PropertyChangeListeners</code>.
 * @param propertyName  the name of the property that has changed
 * @param oldValue  the old value of the property
 * @param newValue  the new value of the property
 */
protected void firePropertyChange(String propertyName,Object oldValue,Object newValue){
  if (changeSupport == null || (oldValue != null && newValue != null && oldValue.equals(newValue))) {
    return;
  }
  changeSupport.firePropertyChange(propertyName,oldValue,newValue);
}
Program: 71368
Project: 71368
Buggy source:
/** 
 * Calls this.paintComponent() with the rectangles x,y,width,height fields.
 */
public void paintComponent(Graphics g,Component c,Container p,Rectangle r){
  paintComponent(g,c,p,r.x,r.y,r.width,r.height);
}

Fixed version (ground truth):
/** 
 * Calls this.paintComponent() with the rectangles x,y,width,height fields.
 * @param g  the {@code Graphics} object to draw on
 * @param c  the {@code Component} to draw
 * @param p  the {@code Container} component actually drawn on
 * @param r  the {@code Rectangle} to draw in
 */
public void paintComponent(Graphics g,Component c,Container p,Rectangle r){
  paintComponent(g,c,p,r.x,r.y,r.width,r.height);
}
Program: 71369
Project: 71369
Buggy source:
/** 
 * Sets the number of times that drawing operations will flash.
 */
public static void setFlashCount(int flashCount){
  info().flashCount=flashCount;
}

Fixed version (ground truth):
/** 
 * Sets the number of times that drawing operations will flash.
 * @param flashCount number of times that drawing operations will flash
 */
public static void setFlashCount(int flashCount){
  info().flashCount=flashCount;
}
Program: 71370
Project: 71370
Buggy source:
/** 
 * Returns the stream to which the DebugGraphics logs drawing operations.
 * @see #setLogStream
 */
public static java.io.PrintStream logStream(){
  return info().stream;
}

Fixed version (ground truth):
/** 
 * Returns the stream to which the DebugGraphics logs drawing operations.
 * @return the stream to which the DebugGraphics logs drawing operations
 * @see #setLogStream
 */
public static java.io.PrintStream logStream(){
  return info().stream;
}
Program: 71371
Project: 71371
Buggy source:
/** 
 * Sets the stream to which the DebugGraphics logs drawing operations.
 */
public static void setLogStream(java.io.PrintStream stream){
  info().stream=stream;
}

Fixed version (ground truth):
/** 
 * Sets the stream to which the DebugGraphics logs drawing operations.
 * @param stream the stream to which the DebugGraphics logs drawing operations
 */
public static void setLogStream(java.io.PrintStream stream){
  info().stream=stream;
}
Program: 71372
Project: 71372
Buggy source:
/** 
 * Returns the time delay of drawing operation flashing.
 * @see #setFlashTime
 */
public static int flashTime(){
  return info().flashTime;
}

Fixed version (ground truth):
/** 
 * Returns the time delay of drawing operation flashing.
 * @return the time delay of drawing operation flashing
 * @see #setFlashTime
 */
public static int flashTime(){
  return info().flashTime;
}
Program: 71373
Project: 71373
Buggy source:
/** 
 * Returns the number of times that drawing operations will flash.
 * @see #setFlashCount
 */
public static int flashCount(){
  return info().flashCount;
}

Fixed version (ground truth):
/** 
 * Returns the number of times that drawing operations will flash.
 * @return the number of times that drawing operations will flash
 * @see #setFlashCount
 */
public static int flashCount(){
  return info().flashCount;
}
Program: 71374
Project: 71374
Buggy source:
/** 
 * Sets the time delay of drawing operation flashing.
 */
public static void setFlashTime(int flashTime){
  info().flashTime=flashTime;
}

Fixed version (ground truth):
/** 
 * Sets the time delay of drawing operation flashing.
 * @param flashTime the time delay of drawing operation flashing
 */
public static void setFlashTime(int flashTime){
  info().flashTime=flashTime;
}
Program: 71375
Project: 71375
Buggy source:
/** 
 * Returns the Color used to flash drawing operations.
 * @see #setFlashColor
 */
public static Color flashColor(){
  return info().flashColor;
}

Fixed version (ground truth):
/** 
 * Returns the Color used to flash drawing operations.
 * @return the Color used to flash drawing operations
 * @see #setFlashColor
 */
public static Color flashColor(){
  return info().flashColor;
}
Program: 71376
Project: 71376
Buggy source:
/** 
 * Sets the Color used to flash drawing operations.
 */
public static void setFlashColor(Color flashColor){
  info().flashColor=flashColor;
}

Fixed version (ground truth):
/** 
 * Sets the Color used to flash drawing operations.
 * @param flashColor the Color used to flash drawing operations
 */
public static void setFlashColor(Color flashColor){
  info().flashColor=flashColor;
}
Program: 71377
Project: 71377
Buggy source:
/** 
 * Returns an array of all the objects currently registered as <code><em>Foo</em>Listener</code>s upon this model. <code><em>Foo</em>Listener</code>s are registered using the <code>add<em>Foo</em>Listener</code> method. <p> You can specify the <code>listenerType</code> argument with a class literal, such as <code><em>Foo</em>Listener.class</code>. For example, you can query a <code>DefaultBoundedRangeModel</code> instance <code>m</code> for its change listeners with the following code: <pre>ChangeListener[] cls = (ChangeListener[])(m.getListeners(ChangeListener.class));</pre> If no such listeners exist, this method returns an empty array.
 * @param listenerType  the type of listeners requested;this parameter should 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 model, or an empty array if no such listeners have been added
 * @exception ClassCastException if <code>listenerType</code> doesn'tspecify a class or interface that implements <code>java.util.EventListener</code>
 * @see #getChangeListeners
 * @since 1.3
 */
public <T extends EventListener>T[] getListeners(Class<T> listenerType){
  return listenerList.getListeners(listenerType);
}

Fixed version (ground truth):
/** 
 * Returns an array of all the objects currently registered as <code><em>Foo</em>Listener</code>s upon this model. <code><em>Foo</em>Listener</code>s are registered using the <code>add<em>Foo</em>Listener</code> method. <p> You can specify the <code>listenerType</code> argument with a class literal, such as <code><em>Foo</em>Listener.class</code>. For example, you can query a <code>DefaultBoundedRangeModel</code> instance <code>m</code> for its change listeners with the following code: <pre>ChangeListener[] cls = (ChangeListener[])(m.getListeners(ChangeListener.class));</pre> If no such listeners exist, this method returns an empty array.
 * @param < T > the type of {@code EventListener} class being requested
 * @param listenerType  the type of listeners requested;this parameter should 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 model, or an empty array if no such listeners have been added
 * @exception ClassCastException if <code>listenerType</code> doesn'tspecify a class or interface that implements <code>java.util.EventListener</code>
 * @see #getChangeListeners
 * @since 1.3
 */
public <T extends EventListener>T[] getListeners(Class<T> listenerType){
  return listenerList.getListeners(listenerType);
}
Program: 71378
Project: 71378
Buggy source:
/** 
 * Initializes value, extent, minimum and maximum. Adjusting is false. Throws an <code>IllegalArgumentException</code> if the following constraints aren't satisfied: <pre> min &lt;= value &lt;= value+extent &lt;= max </pre>
 */
public DefaultBoundedRangeModel(int value,int extent,int min,int max){
  if ((max >= min) && (value >= min) && ((value + extent) >= value)&& ((value + extent) <= max)) {
    this.value=value;
    this.extent=extent;
    this.min=min;
    this.max=max;
  }
 else {
    throw new IllegalArgumentException("String_Node_Str");
  }
}

Fixed version (ground truth):
/** 
 * Initializes value, extent, minimum and maximum. Adjusting is false. Throws an <code>IllegalArgumentException</code> if the following constraints aren't satisfied: <pre> min &lt;= value &lt;= value+extent &lt;= max </pre>
 * @param value  an int giving the current value
 * @param extent the length of the inner range that begins at the model's value
 * @param min    an int giving the minimum value
 * @param max    an int giving the maximum value
 */
public DefaultBoundedRangeModel(int value,int extent,int min,int max){
  if ((max >= min) && (value >= min) && ((value + extent) >= value)&& ((value + extent) <= max)) {
    this.value=value;
    this.extent=extent;
    this.min=min;
    this.max=max;
  }
 else {
    throw new IllegalArgumentException("String_Node_Str");
  }
}
Program: 71379
Project: 71379
Buggy source:
/** 
 * Normally this method will not be called. If it is, it try to determine the appropriate parent from the desktopIcon of the frame. Will remove the desktopIcon from its parent if it successfully adds the frame.
 */
public void openFrame(JInternalFrame f){
  if (f.getDesktopIcon().getParent() != null) {
    f.getDesktopIcon().getParent().add(f);
    removeIconFor(f);
  }
}

Fixed version (ground truth):
/** 
 * Normally this method will not be called. If it is, it tries to determine the appropriate parent from the desktopIcon of the frame. Will remove the desktopIcon from its parent if it successfully adds the frame.
 */
public void openFrame(JInternalFrame f){
  if (f.getDesktopIcon().getParent() != null) {
    f.getDesktopIcon().getParent().add(f);
    removeIconFor(f);
  }
}
Program: 71380
Project: 71380
Buggy source:
/** 
 * Returns an array of all the objects currently registered as <code><em>Foo</em>Listener</code>s upon this model. <code><em>Foo</em>Listener</code>s are registered using the <code>add<em>Foo</em>Listener</code> method. <p> You can specify the <code>listenerType</code> argument with a class literal, such as <code><em>Foo</em>Listener.class</code>. For example, you can query a <code>DefaultSingleSelectionModel</code> instance <code>m</code> for its change listeners with the following code: <pre>ChangeListener[] cls = (ChangeListener[])(m.getListeners(ChangeListener.class));</pre> If no such listeners exist, this method returns an empty array.
 * @param listenerType  the type of listeners requested;this parameter should 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 model, or an empty array if no such listeners have been added
 * @exception ClassCastException if <code>listenerType</code> doesn'tspecify a class or interface that implements <code>java.util.EventListener</code>
 * @see #getChangeListeners
 * @since 1.3
 */
public <T extends EventListener>T[] getListeners(Class<T> listenerType){
  return listenerList.getListeners(listenerType);
}

Fixed version (ground truth):
/** 
 * Returns an array of all the objects currently registered as <code><em>Foo</em>Listener</code>s upon this model. <code><em>Foo</em>Listener</code>s are registered using the <code>add<em>Foo</em>Listener</code> method. <p> You can specify the <code>listenerType</code> argument with a class literal, such as <code><em>Foo</em>Listener.class</code>. For example, you can query a <code>DefaultSingleSelectionModel</code> instance <code>m</code> for its change listeners with the following code: <pre>ChangeListener[] cls = (ChangeListener[])(m.getListeners(ChangeListener.class));</pre> If no such listeners exist, this method returns an empty array.
 * @param < T >  the type of {@code EventListener} class being requested
 * @param listenerType  the type of listeners requested;this parameter should 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 model, or an empty array if no such listeners have been added
 * @exception ClassCastException if <code>listenerType</code> doesn'tspecify a class or interface that implements <code>java.util.EventListener</code>
 * @see #getChangeListeners
 * @since 1.3
 */
public <T extends EventListener>T[] getListeners(Class<T> listenerType){
  return listenerList.getListeners(listenerType);
}
Program: 71381
Project: 71381
Buggy source:
/** 
 * Generally, remove this frame from it's parent and add an iconic representation. 
 */
void iconifyFrame(JInternalFrame f);

Fixed version (ground truth):
/** 
 * Generally, remove this frame from its parent and add an iconic representation.
 * @param f  the {@code JInternalFrame} to be iconified
 */
void iconifyFrame(JInternalFrame f);
Program: 71382
Project: 71382
Buggy source:
/** 
 * Generally, this indicates that the frame should be restored to it's size and position prior to a maximizeFrame() call.
 */
void minimizeFrame(JInternalFrame f);

Fixed version (ground truth):
/** 
 * Generally, this indicates that the frame should be restored to its size and position prior to a maximizeFrame() call.
 * @param f  the {@code JInternalFrame} to be restored
 */
void minimizeFrame(JInternalFrame f);
Program: 71383
Project: 71383
Buggy source:
/** 
 * Generally, this call should remove the frame from it's parent. 
 */
void closeFrame(JInternalFrame f);

Fixed version (ground truth):
/** 
 * Generally, this call should remove the frame from its parent.
 * @param f  the {@code JInternalFrame} to be removed
 */
void closeFrame(JInternalFrame f);
Program: 71384
Project: 71384
Buggy source:
/** 
 * Generally, remove any iconic representation that is present and restore the frame to it's original size and location.
 */
void deiconifyFrame(JInternalFrame f);

Fixed version (ground truth):
/** 
 * Generally, remove any iconic representation that is present and restore the frame to it's original size and location.
 * @param f  the {@code JInternalFrame} to be de-iconified
 */
void deiconifyFrame(JInternalFrame f);
Program: 71385
Project: 71385
Buggy source:
/** 
 * Generally, indicate that this frame has focus. This is usually called after the JInternalFrame's IS_SELECTED_PROPERTY has been set to true.
 */
void activateFrame(JInternalFrame f);

Fixed version (ground truth):
/** 
 * Generally, indicate that this frame has focus. This is usually called after the JInternalFrame's IS_SELECTED_PROPERTY has been set to true.
 * @param f  the {@code JInternalFrame} to be activated
 */
void activateFrame(JInternalFrame f);
Program: 71386
Project: 71386
Buggy source:
/** 
 * This methods is normally called when the user has indicated that they will begin resizing the frame. This method should be called prior to any resizeFrame() calls to allow the DesktopManager to prepare any necessary state.  Normally <b>f</b> will be a JInternalFrame.
 */
void beginResizingFrame(JComponent f,int direction);

Fixed version (ground truth):
/** 
 * This method is normally called when the user has indicated that they will begin resizing the frame. This method should be called prior to any resizeFrame() calls to allow the DesktopManager to prepare any necessary state.  Normally <b>f</b> will be a JInternalFrame.
 * @param f  the {@code JComponent} being resized
 */
void beginResizingFrame(JComponent f,int direction);
Program: 71387
Project: 71387
Buggy source:
/** 
 * The user has moved the frame. Calls to this method will be preceded by calls to beginDraggingFrame(). Normally <b>f</b> will be a JInternalFrame.
 */
void dragFrame(JComponent f,int newX,int newY);

Fixed version (ground truth):
/** 
 * The user has moved the frame. Calls to this method will be preceded by calls to beginDraggingFrame(). Normally <b>f</b> will be a JInternalFrame.
 * @param f  the {@code JComponent} being dragged
 * @param newX  the new x-coordinate
 * @param newY  the new y-coordinate
 */
void dragFrame(JComponent f,int newX,int newY);
Program: 71388
Project: 71388
Buggy source:
/** 
 * If possible, display this frame in an appropriate location. Normally, this is not called, as the creator of the JInternalFrame will add the frame to the appropriate parent.
 */
void openFrame(JInternalFrame f);

Fixed version (ground truth):
/** 
 * If possible, display this frame in an appropriate location. Normally, this is not called, as the creator of the JInternalFrame will add the frame to the appropriate parent.
 * @param f  the {@code JInternalFrame} to be displayed
 */
void openFrame(JInternalFrame f);
Program: 71389
Project: 71389
Buggy source:
/** 
 * Generally, the frame should be resized to match it's parents bounds. 
 */
void maximizeFrame(JInternalFrame f);

Fixed version (ground truth):
/** 
 * Generally, the frame should be resized to match its parents bounds.
 * @param f  the {@code JInternalFrame} to be resized
 */
void maximizeFrame(JInternalFrame f);
Program: 71390
Project: 71390
Buggy source:
/** 
 * This method is normally called when the user has indicated that they will begin dragging a component around. This method should be called prior to any dragFrame() calls to allow the DesktopManager to prepare any necessary state. Normally <b>f</b> will be a JInternalFrame.
 */
void beginDraggingFrame(JComponent f);

Fixed version (ground truth):
/** 
 * This method is normally called when the user has indicated that they will begin dragging a component around. This method should be called prior to any dragFrame() calls to allow the DesktopManager to prepare any necessary state. Normally <b>f</b> will be a JInternalFrame.
 * @param f  the {@code JComponent} being dragged
 */
void beginDraggingFrame(JComponent f);
Program: 71391
Project: 71391
Buggy source:
/** 
 * Generally, indicate that this frame has lost focus. This is usually called after the JInternalFrame's IS_SELECTED_PROPERTY has been set to false.
 */
void deactivateFrame(JInternalFrame f);

Fixed version (ground truth):
/** 
 * Generally, indicate that this frame has lost focus. This is usually called after the JInternalFrame's IS_SELECTED_PROPERTY has been set to false.
 * @param f  the {@code JInternalFrame} to be deactivated
 */
void deactivateFrame(JInternalFrame f);
Program: 71392
Project: 71392
Buggy source:
/** 
 * The user has resized the component. Calls to this method will be preceded by calls to beginResizingFrame(). Normally <b>f</b> will be a JInternalFrame.
 */
void resizeFrame(JComponent f,int newX,int newY,int newWidth,int newHeight);

Fixed version (ground truth):
/** 
 * The user has resized the component. Calls to this method will be preceded by calls to beginResizingFrame(). Normally <b>f</b> will be a JInternalFrame.
 * @param f  the {@code JComponent} being resized
 * @param newX  the new x-coordinate
 * @param newY  the new y-coordinate
 * @param newWidth  the new width
 * @param newHeight  the new height
 */
void resizeFrame(JComponent f,int newX,int newY,int newWidth,int newHeight);
Program: 71393
Project: 71393
Buggy source:
/** 
 * This method signals the end of the resize session. Any state maintained by the DesktopManager can be removed here.  Normally <b>f</b> will be a JInternalFrame.
 */
void endResizingFrame(JComponent f);

Fixed version (ground truth):
/** 
 * This method signals the end of the resize session. Any state maintained by the DesktopManager can be removed here.  Normally <b>f</b> will be a JInternalFrame.
 * @param f  the {@code JComponent} being resized
 */
void endResizingFrame(JComponent f);
Program: 71394
Project: 71394
Buggy source:
/** 
 * This method signals the end of the dragging session. Any state maintained by the DesktopManager can be removed here.  Normally <b>f</b> will be a JInternalFrame.
 */
void endDraggingFrame(JComponent f);

Fixed version (ground truth):
/** 
 * This method signals the end of the dragging session. Any state maintained by the DesktopManager can be removed here.  Normally <b>f</b> will be a JInternalFrame.
 * @param f  the {@code JComponent} being dragged
 */
void endDraggingFrame(JComponent f);
Program: 71395
Project: 71395
Buggy source:
/** 
 * This is a primitive reshape method.
 */
void setBoundsForFrame(JComponent f,int newX,int newY,int newWidth,int newHeight);

Fixed version (ground truth):
/** 
 * This is a primitive reshape method.
 * @param f  the {@code JComponent} being moved or resized
 * @param newX  the new x-coordinate
 * @param newY  the new y-coordinate
 * @param newWidth  the new width
 * @param newHeight  the new height
 */
void setBoundsForFrame(JComponent f,int newX,int newY,int newWidth,int newHeight);
Program: 71396
Project: 71396
Buggy source:
/** 
 * Returns the ancestor that the event actually occurred on.
 */
public Container getAncestor(){
  return ancestor;
}

Fixed version (ground truth):
/** 
 * Returns the ancestor that the event actually occurred on.
 * @return the {@code Container} object specifying the ancestor component
 */
public Container getAncestor(){
  return ancestor;
}
Program: 71397
Project: 71397
Buggy source:
/** 
 * Returns the parent of the ancestor the event actually occurred on. This is most interesting in an ANCESTOR_REMOVED event, as the ancestor may no longer be in the component hierarchy.
 */
public Container getAncestorParent(){
  return ancestorParent;
}

Fixed version (ground truth):
/** 
 * Returns the parent of the ancestor the event actually occurred on. This is most interesting in an ANCESTOR_REMOVED event, as the ancestor may no longer be in the component hierarchy.
 * @return the {@code Container} object specifying the ancestor's parent
 */
public Container getAncestorParent(){
  return ancestorParent;
}
Program: 71398
Project: 71398
Buggy source:
/** 
 * Returns the component that the listener was added to.
 */
public JComponent getComponent(){
  return (JComponent)getSource();
}

Fixed version (ground truth):
/** 
 * Returns the component that the listener was added to.
 * @return the {@code JComponent} on which the event occurred
 */
public JComponent getComponent(){
  return (JComponent)getSource();
}
Program: 71399
Project: 71399
Buggy source:
/** 
 * Called when the source or one of its ancestors is made visible either by setVisible(true) being called or by its being added to the component hierarchy.  The method is only called if the source has actually become visible.  For this to be true all its parents must be visible and it must be in a hierarchy rooted at a Window
 */
public void ancestorAdded(AncestorEvent event);

Fixed version (ground truth):
/** 
 * Called when the source or one of its ancestors is made visible either by setVisible(true) being called or by its being added to the component hierarchy.  The method is only called if the source has actually become visible.  For this to be true all its parents must be visible and it must be in a hierarchy rooted at a Window
 * @param event an {@code AncestorEvent} signifying a change in anancestor-component's display-status
 */
public void ancestorAdded(AncestorEvent event);
Program: 71400
Project: 71400
Buggy source:
/** 
 * Called when either the source or one of its ancestors is moved.
 */
public void ancestorMoved(AncestorEvent event);

Fixed version (ground truth):
/** 
 * Called when either the source or one of its ancestors is moved.
 * @param event an {@code AncestorEvent} signifying a change in anancestor-component's display-status
 */
public void ancestorMoved(AncestorEvent event);
Program: 71401
Project: 71401
Buggy source:
/** 
 * Called when the source or one of its ancestors is made invisible either by setVisible(false) being called or by its being remove from the component hierarchy.  The method is only called if the source has actually become invisible.  For this to be true at least one of its parents must by invisible or it is not in a hierarchy rooted at a Window
 */
public void ancestorRemoved(AncestorEvent event);

Fixed version (ground truth):
/** 
 * Called when the source or one of its ancestors is made invisible either by setVisible(false) being called or by its being remove from the component hierarchy.  The method is only called if the source has actually become invisible.  For this to be true at least one of its parents must by invisible or it is not in a hierarchy rooted at a Window
 * @param event an {@code AncestorEvent} signifying a change in anancestor-component's display-status
 */
public void ancestorRemoved(AncestorEvent event);
Program: 71402
Project: 71402
Buggy source:
/** 
 * This tells the listeners the editor has ended editing 
 */
public void editingStopped(ChangeEvent e);

Fixed version (ground truth):
/** 
 * This tells the listeners the editor has ended editing
 * @param e the {@code ChangeEvent} containing the source of the event
 */
public void editingStopped(ChangeEvent e);
Program: 71403
Project: 71403
Buggy source:
/** 
 * This tells the listeners the editor has canceled editing 
 */
public void editingCanceled(ChangeEvent e);

Fixed version (ground truth):
/** 
 * This tells the listeners the editor has canceled editing
 * @param e the {@code ChangeEvent} containing the source of the event
 */
public void editingCanceled(ChangeEvent e);
Program: 71404
Project: 71404
Buggy source:
/** 
 * Return an array of all the listeners of the given type.
 * @return all of the listeners of the specified type.
 * @exception ClassCastException if the supplied classis not assignable to EventListener
 * @since 1.3
 */
public <T extends EventListener>T[] getListeners(Class<T> t){
  Object[] lList=listenerList;
  int n=getListenerCount(lList,t);
  T[] result=(T[])Array.newInstance(t,n);
  int j=0;
  for (int i=lList.length - 2; i >= 0; i-=2) {
    if (lList[i] == t) {
      result[j++]=(T)lList[i + 1];
    }
  }
  return result;
}

Fixed version (ground truth):
/** 
 * Return an array of all the listeners of the given type.
 * @param < T > the type of {@code EventListener} to search for
 * @param t the type of {@code EventListener} classes to be returned
 * @return all of the listeners of the specified type.
 * @exception ClassCastException if the supplied classis not assignable to EventListener
 * @since 1.3
 */
public <T extends EventListener>T[] getListeners(Class<T> t){
  Object[] lList=listenerList;
  int n=getListenerCount(lList,t);
  T[] result=(T[])Array.newInstance(t,n);
  int j=0;
  for (int i=lList.length - 2; i >= 0; i-=2) {
    if (lList[i] == t) {
      result[j++]=(T)lList[i + 1];
    }
  }
  return result;
}
Program: 71405
Project: 71405
Buggy source:
/** 
 * Adds the listener as a listener of the specified type.
 * @param t the type of the listener to be added
 * @param l the listener to be added
 */
public synchronized <T extends EventListener>void add(Class<T> t,T l){
  if (l == null) {
    return;
  }
  if (!t.isInstance(l)) {
    throw new IllegalArgumentException("String_Node_Str" + l + "String_Node_Str"+ t);
  }
  if (listenerList == NULL_ARRAY) {
    listenerList=new Object[]{t,l};
  }
 else {
    int i=listenerList.length;
    Object[] tmp=new Object[i + 2];
    System.arraycopy(listenerList,0,tmp,0,i);
    tmp[i]=t;
    tmp[i + 1]=l;
    listenerList=tmp;
  }
}

Fixed version (ground truth):
/** 
 * Adds the listener as a listener of the specified type.
 * @param < T > the type of {@code EventListener} to add
 * @param t the type of the {@code EventListener} class to add
 * @param l the listener to be added
 */
public synchronized <T extends EventListener>void add(Class<T> t,T l){
  if (l == null) {
    return;
  }
  if (!t.isInstance(l)) {
    throw new IllegalArgumentException("String_Node_Str" + l + "String_Node_Str"+ t);
  }
  if (listenerList == NULL_ARRAY) {
    listenerList=new Object[]{t,l};
  }
 else {
    int i=listenerList.length;
    Object[] tmp=new Object[i + 2];
    System.arraycopy(listenerList,0,tmp,0,i);
    tmp[i]=t;
    tmp[i + 1]=l;
    listenerList=tmp;
  }
}
Program: 71406
Project: 71406
Buggy source:
/** 
 * Passes back the event listener list as an array of ListenerType-listener pairs.  Note that for performance reasons, this implementation passes back the actual data structure in which the listener data is stored internally! This method is guaranteed to pass back a non-null array, so that no null-checking is required in fire methods.  A zero-length array of Object should be returned if there are currently no listeners. WARNING!!! Absolutely NO modification of the data contained in this array should be made -- if any such manipulation is necessary, it should be done on a copy of the array returned rather than the array itself.
 */
public Object[] getListenerList(){
  return listenerList;
}

Fixed version (ground truth):
/** 
 * Passes back the event listener list as an array of ListenerType-listener pairs.  Note that for performance reasons, this implementation passes back the actual data structure in which the listener data is stored internally! This method is guaranteed to pass back a non-null array, so that no null-checking is required in fire methods.  A zero-length array of Object should be returned if there are currently no listeners. WARNING!!! Absolutely NO modification of the data contained in this array should be made -- if any such manipulation is necessary, it should be done on a copy of the array returned rather than the array itself.
 * @return array of ListenerType-listener pairs
 */
public Object[] getListenerList(){
  return listenerList;
}
Program: 71407
Project: 71407
Buggy source:
/** 
 * Removes the listener as a listener of the specified type.
 * @param t the type of the listener to be removed
 * @param l the listener to be removed
 */
public synchronized <T extends EventListener>void remove(Class<T> t,T l){
  if (l == null) {
    return;
  }
  if (!t.isInstance(l)) {
    throw new IllegalArgumentException("String_Node_Str" + l + "String_Node_Str"+ t);
  }
  int index=-1;
  for (int i=listenerList.length - 2; i >= 0; i-=2) {
    if ((listenerList[i] == t) && (listenerList[i + 1].equals(l) == true)) {
      index=i;
      break;
    }
  }
  if (index != -1) {
    Object[] tmp=new Object[listenerList.length - 2];
    System.arraycopy(listenerList,0,tmp,0,index);
    if (index < tmp.length)     System.arraycopy(listenerList,index + 2,tmp,index,tmp.length - index);
    listenerList=(tmp.length == 0) ? NULL_ARRAY : tmp;
  }
}

Fixed version (ground truth):
/** 
 * Removes the listener as a listener of the specified type.
 * @param < T > the type of {@code EventListener}
 * @param t the type of the listener to be removed
 * @param l the listener to be removed
 */
public synchronized <T extends EventListener>void remove(Class<T> t,T l){
  if (l == null) {
    return;
  }
  if (!t.isInstance(l)) {
    throw new IllegalArgumentException("String_Node_Str" + l + "String_Node_Str"+ t);
  }
  int index=-1;
  for (int i=listenerList.length - 2; i >= 0; i-=2) {
    if ((listenerList[i] == t) && (listenerList[i + 1].equals(l) == true)) {
      index=i;
      break;
    }
  }
  if (index != -1) {
    Object[] tmp=new Object[listenerList.length - 2];
    System.arraycopy(listenerList,0,tmp,0,index);
    if (index < tmp.length)     System.arraycopy(listenerList,index + 2,tmp,index,tmp.length - index);
    listenerList=(tmp.length == 0) ? NULL_ARRAY : tmp;
  }
}
Program: 71408
Project: 71408
Buggy source:
/** 
 * Get the description of the link as a string. This may be useful if a URL can't be formed from the description, in which case the associated URL would be null.
 */
public String getDescription(){
  return desc;
}

Fixed version (ground truth):
/** 
 * Get the description of the link as a string. This may be useful if a URL can't be formed from the description, in which case the associated URL would be null.
 * @return the description of this link as a {@code String}
 */
public String getDescription(){
  return desc;
}
Program: 71409
Project: 71409
Buggy source:
/** 
 * Invoked when a internal frame has been opened.
 * @see javax.swing.JInternalFrame#show
 */
public void internalFrameOpened(InternalFrameEvent e);

Fixed version (ground truth):
/** 
 * Invoked when a internal frame has been opened.
 * @param e an {@code InternalFrameEvent} with information about the{@code JInteralFrame} that originated the event
 * @see javax.swing.JInternalFrame#show
 */
public void internalFrameOpened(InternalFrameEvent e);
Program: 71410
Project: 71410
Buggy source:
/** 
 * Invoked when an internal frame is activated.
 * @see javax.swing.JInternalFrame#setSelected
 */
public void internalFrameActivated(InternalFrameEvent e);

Fixed version (ground truth):
/** 
 * Invoked when an internal frame is activated.
 * @param e an {@code InternalFrameEvent} with information about the{@code JInteralFrame} that originated the event
 * @see javax.swing.JInternalFrame#setSelected
 */
public void internalFrameActivated(InternalFrameEvent e);
Program: 71411
Project: 71411
Buggy source:
/** 
 * Invoked when an internal frame is de-activated.
 * @see javax.swing.JInternalFrame#setSelected
 */
public void internalFrameDeactivated(InternalFrameEvent e);

Fixed version (ground truth):
/** 
 * Invoked when an internal frame is de-activated.
 * @param e an {@code InternalFrameEvent} with information about the{@code JInteralFrame} that originated the event
 * @see javax.swing.JInternalFrame#setSelected
 */
public void internalFrameDeactivated(InternalFrameEvent e);
Program: 71412
Project: 71412
Buggy source:
/** 
 * Invoked when an internal frame has been closed.
 * @see javax.swing.JInternalFrame#setClosed
 */
public void internalFrameClosed(InternalFrameEvent e);

Fixed version (ground truth):
/** 
 * Invoked when an internal frame has been closed.
 * @param e an {@code InternalFrameEvent} with information about the{@code JInteralFrame} that originated the event
 * @see javax.swing.JInternalFrame#setClosed
 */
public void internalFrameClosed(InternalFrameEvent e);
Program: 71413
Project: 71413
Buggy source:
/** 
 * Invoked when an internal frame is iconified.
 * @see javax.swing.JInternalFrame#setIcon
 */
public void internalFrameIconified(InternalFrameEvent e);

Fixed version (ground truth):
/** 
 * Invoked when an internal frame is iconified.
 * @param e an {@code InternalFrameEvent} with information about the{@code JInteralFrame} that originated the event
 * @see javax.swing.JInternalFrame#setIcon
 */
public void internalFrameIconified(InternalFrameEvent e);
Program: 71414
Project: 71414
Buggy source:
/** 
 * Invoked when an internal frame is de-iconified.
 * @see javax.swing.JInternalFrame#setIcon
 */
public void internalFrameDeiconified(InternalFrameEvent e);

Fixed version (ground truth):
/** 
 * Invoked when an internal frame is de-iconified.
 * @param e an {@code InternalFrameEvent} with information about the{@code JInteralFrame} that originated the event
 * @see javax.swing.JInternalFrame#setIcon
 */
public void internalFrameDeiconified(InternalFrameEvent e);
Program: 71415
Project: 71415
Buggy source:
/** 
 * Invoked when an internal frame is in the process of being closed. The close operation can be overridden at this point.
 * @see javax.swing.JInternalFrame#setDefaultCloseOperation
 */
public void internalFrameClosing(InternalFrameEvent e);

Fixed version (ground truth):
/** 
 * Invoked when an internal frame is in the process of being closed. The close operation can be overridden at this point.
 * @param e an {@code InternalFrameEvent} with information about the{@code JInteralFrame} that originated the event
 * @see javax.swing.JInternalFrame#setDefaultCloseOperation
 */
public void internalFrameClosing(InternalFrameEvent e);
Program: 71416
Project: 71416
Buggy source:
/** 
 * Represents a change in selection status between   {@code firstIndex} and{@code lastIndex}, inclusive.   {@code firstIndex} is less than or equal to{@code lastIndex}. The selection of at least one index within the range will have changed.
 * @param firstIndex the first index in the range, &lt;= lastIndex
 * @param lastIndex the last index in the range, &gt;= firstIndex
 * @param isAdjusting whether or not this is one in a series ofmultiple events, where changes are still being made
 */
public ListSelectionEvent(Object source,int firstIndex,int lastIndex,boolean isAdjusting){
  super(source);
  this.firstIndex=firstIndex;
  this.lastIndex=lastIndex;
  this.isAdjusting=isAdjusting;
}

Fixed version (ground truth):
/** 
 * Represents a change in selection status between   {@code firstIndex} and{@code lastIndex}, inclusive.   {@code firstIndex} is less than or equal to{@code lastIndex}. The selection of at least one index within the range will have changed.
 * @param source the {@code Object} on which the event initially occurred
 * @param firstIndex the first index in the range, &lt;= lastIndex
 * @param lastIndex the last index in the range, &gt;= firstIndex
 * @param isAdjusting whether or not this is one in a series ofmultiple events, where changes are still being made
 */
public ListSelectionEvent(Object source,int firstIndex,int lastIndex,boolean isAdjusting){
  super(source);
  this.firstIndex=firstIndex;
  this.lastIndex=lastIndex;
  this.isAdjusting=isAdjusting;
}
Program: 71417
Project: 71417
Buggy source:
/** 
 * Invoked when a key has been released.
 */
void menuKeyReleased(MenuKeyEvent e);

Fixed version (ground truth):
/** 
 * Invoked when a key has been released.
 * @param e a {@code MenuKeyEvent}
 */
void menuKeyReleased(MenuKeyEvent e);
Program: 71418
Project: 71418
Buggy source:
/** 
 * Invoked when a key has been typed. This event occurs when a key press is followed by a key release.
 */
void menuKeyTyped(MenuKeyEvent e);

Fixed version (ground truth):
/** 
 * Invoked when a key has been typed. This event occurs when a key press is followed by a key release.
 * @param e a {@code MenuKeyEvent}
 */
void menuKeyTyped(MenuKeyEvent e);
Program: 71419
Project: 71419
Buggy source:
/** 
 * Invoked when a key has been pressed.
 */
void menuKeyPressed(MenuKeyEvent e);

Fixed version (ground truth):
/** 
 * Invoked when a key has been pressed.
 * @param e a {@code MenuKeyEvent}
 */
void menuKeyPressed(MenuKeyEvent e);
Program: 71420
Project: 71420
Buggy source:
/** 
 * This method is called before the popup menu becomes visible
 */
void popupMenuWillBecomeVisible(PopupMenuEvent e);

Fixed version (ground truth):
/** 
 * This method is called before the popup menu becomes visible
 * @param e a {@code PopupMenuEvent} containing the source of the event
 */
void popupMenuWillBecomeVisible(PopupMenuEvent e);
Program: 71421
Project: 71421
Buggy source:
/** 
 * This method is called when the popup menu is canceled
 */
void popupMenuCanceled(PopupMenuEvent e);

Fixed version (ground truth):
/** 
 * This method is called when the popup menu is canceled
 * @param e a {@code PopupMenuEvent} containing the source of the event
 */
void popupMenuCanceled(PopupMenuEvent e);
Program: 71422
Project: 71422
Buggy source:
/** 
 * This method is called before the popup menu becomes invisible Note that a JPopupMenu can become invisible any time
 */
void popupMenuWillBecomeInvisible(PopupMenuEvent e);

Fixed version (ground truth):
/** 
 * This method is called before the popup menu becomes invisible Note that a JPopupMenu can become invisible any time
 * @param e a {@code PopupMenuEvent} containing the source of the event
 */
void popupMenuWillBecomeInvisible(PopupMenuEvent e);