nus-yam/ex-repair huggingface dataset:
Program: 35934
Project: 35934
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: 35935
Project: 35935
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: 35936
Project: 35936
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: 35937
Project: 35937
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: 35938
Project: 35938
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: 35939
Project: 35939
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: 35940
Project: 35940
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: 35941
Project: 35941
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: 35942
Project: 35942
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: 35943
Project: 35943
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: 35944
Project: 35944
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: 35945
Project: 35945
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: 35946
Project: 35946
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: 35947
Project: 35947
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: 35948
Project: 35948
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: 35949
Project: 35949
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: 35950
Project: 35950
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: 35951
Project: 35951
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: 35952
Project: 35952
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: 35953
Project: 35953
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: 35954
Project: 35954
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: 35955
Project: 35955
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: 35956
Project: 35956
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: 35957
Project: 35957
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: 35958
Project: 35958
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: 35959
Project: 35959
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: 35960
Project: 35960
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: 35961
Project: 35961
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: 35962
Project: 35962
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: 35963
Project: 35963
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: 35964
Project: 35964
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: 35965
Project: 35965
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: 35966
Project: 35966
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: 35967
Project: 35967
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: 35968
Project: 35968
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: 35969
Project: 35969
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: 35970
Project: 35970
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: 35971
Project: 35971
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: 35972
Project: 35972
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: 35973
Project: 35973
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: 35974
Project: 35974
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: 35975
Project: 35975
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: 35976
Project: 35976
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: 35977
Project: 35977
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: 35978
Project: 35978
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: 35979
Project: 35979
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: 35980
Project: 35980
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: 35981
Project: 35981
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: 35982
Project: 35982
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: 35983
Project: 35983
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: 35984
Project: 35984
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: 35985
Project: 35985
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: 35986
Project: 35986
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: 35987
Project: 35987
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: 35988
Project: 35988
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: 35989
Project: 35989
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: 35990
Project: 35990
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: 35991
Project: 35991
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: 35992
Project: 35992
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: 35993
Project: 35993
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: 35994
Project: 35994
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: 35995
Project: 35995
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: 35996
Project: 35996
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: 35997
Project: 35997
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: 35998
Project: 35998
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);
Program: 35999
Project: 35999
Buggy source:
/** 
 * Returns the fromIndex.  Valid for removed or moved events 
 */
public int getFromIndex(){
  return fromIndex;
}

Fixed version (ground truth):
/** 
 * Returns the fromIndex.  Valid for removed or moved events
 * @return int value for index from which the column was moved or removed
 */
public int getFromIndex(){
  return fromIndex;
}
Program: 36000
Project: 36000
Buggy source:
/** 
 * Returns the toIndex.  Valid for add and moved events 
 */
public int getToIndex(){
  return toIndex;
}

Fixed version (ground truth):
/** 
 * Returns the toIndex.  Valid for add and moved events
 * @return int value of column's new index
 */
public int getToIndex(){
  return toIndex;
}
Program: 36001
Project: 36001
Buggy source:
/** 
 * Tells listeners that a column was repositioned. 
 */
public void columnMoved(TableColumnModelEvent e);

Fixed version (ground truth):
/** 
 * Tells listeners that a column was repositioned.
 * @param e a {@code TableColumnModelEvent}
 */
public void columnMoved(TableColumnModelEvent e);