nus-yam/ex-repair huggingface dataset:
Program: 76894
Project: 76894
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: 76895
Project: 76895
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: 76896
Project: 76896
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: 76897
Project: 76897
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: 76898
Project: 76898
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: 76899
Project: 76899
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: 76900
Project: 76900
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: 76901
Project: 76901
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: 76902
Project: 76902
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: 76903
Project: 76903
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: 76904
Project: 76904
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: 76905
Project: 76905
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: 76906
Project: 76906
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: 76907
Project: 76907
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: 76908
Project: 76908
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: 76909
Project: 76909
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: 76910
Project: 76910
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: 76911
Project: 76911
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: 76912
Project: 76912
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: 76913
Project: 76913
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: 76914
Project: 76914
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: 76915
Project: 76915
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: 76916
Project: 76916
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: 76917
Project: 76917
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: 76918
Project: 76918
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: 76919
Project: 76919
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: 76920
Project: 76920
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: 76921
Project: 76921
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: 76922
Project: 76922
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: 76923
Project: 76923
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: 76924
Project: 76924
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: 76925
Project: 76925
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: 76926
Project: 76926
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: 76927
Project: 76927
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: 76928
Project: 76928
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: 76929
Project: 76929
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: 76930
Project: 76930
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: 76931
Project: 76931
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: 76932
Project: 76932
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: 76933
Project: 76933
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: 76934
Project: 76934
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: 76935
Project: 76935
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: 76936
Project: 76936
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: 76937
Project: 76937
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: 76938
Project: 76938
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: 76939
Project: 76939
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: 76940
Project: 76940
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: 76941
Project: 76941
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: 76942
Project: 76942
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: 76943
Project: 76943
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: 76944
Project: 76944
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: 76945
Project: 76945
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: 76946
Project: 76946
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: 76947
Project: 76947
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: 76948
Project: 76948
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: 76949
Project: 76949
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: 76950
Project: 76950
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: 76951
Project: 76951
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: 76952
Project: 76952
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: 76953
Project: 76953
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: 76954
Project: 76954
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: 76955
Project: 76955
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);
Program: 76956
Project: 76956
Buggy source:
/** 
 * Tells listeners that the selection model of the TableColumnModel changed.
 */
public void columnSelectionChanged(ListSelectionEvent e);

Fixed version (ground truth):
/** 
 * Tells listeners that the selection model of the TableColumnModel changed.
 * @param e a {@code ListSelectionEvent}
 */
public void columnSelectionChanged(ListSelectionEvent e);
Program: 76957
Project: 76957
Buggy source:
/** 
 * Tells listeners that a column was removed from the model. 
 */
public void columnRemoved(TableColumnModelEvent e);

Fixed version (ground truth):
/** 
 * Tells listeners that a column was removed from the model.
 * @param e a {@code TableColumnModelEvent}
 */
public void columnRemoved(TableColumnModelEvent e);
Program: 76958
Project: 76958
Buggy source:
/** 
 * Tells listeners that a column was moved due to a margin change. 
 */
public void columnMarginChanged(ChangeEvent e);

Fixed version (ground truth):
/** 
 * Tells listeners that a column was moved due to a margin change.
 * @param e a {@code ChangeEvent}
 */
public void columnMarginChanged(ChangeEvent e);
Program: 76959
Project: 76959
Buggy source:
/** 
 * Tells listeners that a column was added to the model. 
 */
public void columnAdded(TableColumnModelEvent e);

Fixed version (ground truth):
/** 
 * Tells listeners that a column was added to the model.
 * @param e a {@code TableColumnModelEvent}
 */
public void columnAdded(TableColumnModelEvent e);
Program: 76960
Project: 76960
Buggy source:
/** 
 * Return an array of all the listeners of the given type that were added to this model.  For example to find all of the ChangeListeners added to this model: <pre> myAbstractSpinnerModel.getListeners(ChangeListener.class); </pre>
 * @param listenerType the type of listeners to return, e.g. ChangeListener.class
 * @return all of the objects receiving <em>listenerType</em> notificationsfrom this model
 */
public <T extends EventListener>T[] getListeners(Class<T> listenerType){
  return listenerList.getListeners(listenerType);
}

Fixed version (ground truth):
/** 
 * Return an array of all the listeners of the given type that were added to this model.  For example to find all of the ChangeListeners added to this model: <pre> myAbstractSpinnerModel.getListeners(ChangeListener.class); </pre>
 * @param < T > the type of requested listeners
 * @param listenerType the type of listeners to return, e.g. ChangeListener.class
 * @return all of the objects receiving <em>listenerType</em> notificationsfrom this model
 */
public <T extends EventListener>T[] getListeners(Class<T> listenerType){
  return listenerList.getListeners(listenerType);
}
Program: 76961
Project: 76961
Buggy source:
/** 
 * Returns the <code>Action</code> names that are bound in this <code>ActionMap</code>.
 */
public Object[] keys(){
  if (arrayTable == null) {
    return null;
  }
  return arrayTable.getKeys(null);
}

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

Fixed version (ground truth):
/** 
 * Returns the binding for <code>key</code>, messaging the parent <code>ActionMap</code> if the binding is not locally defined.
 * @param key a key
 * @return the binding for {@code key}
 */
public Action get(Object key){
  Action value=(arrayTable == null) ? null : (Action)arrayTable.get(key);
  if (value == null) {
    ActionMap parent=getParent();
    if (parent != null) {
      return parent.get(key);
    }
  }
  return value;
}