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

Fixed version (ground truth):
/** 
 * Returns the extended modifier mask for this event. <P> Extended modifiers are the modifiers that ends with the _DOWN_MASK suffix, such as ALT_DOWN_MASK, BUTTON1_DOWN_MASK, and others. <P> Extended modifiers represent the state of all modal keys, such as ALT, CTRL, META, and the mouse buttons just after the event occurred. <P> For example, if the user presses <b>button 1</b> followed by <b>button 2</b>, and then releases them in the same order, the following sequence of events is generated: <PRE> <code>MOUSE_PRESSED</code>:  <code>BUTTON1_DOWN_MASK</code> <code>MOUSE_PRESSED</code>:  <code>BUTTON1_DOWN_MASK | BUTTON2_DOWN_MASK</code> <code>MOUSE_RELEASED</code>: <code>BUTTON2_DOWN_MASK</code> <code>MOUSE_CLICKED</code>:  <code>BUTTON2_DOWN_MASK</code> <code>MOUSE_RELEASED</code>: <code>MOUSE_CLICKED</code>: </PRE> <P> It is not recommended to compare the return value of this method using <code>==</code> because new modifiers can be added in the future. For example, the appropriate way to check that SHIFT and BUTTON1 are down, but CTRL is up is demonstrated by the following code: <PRE> int onmask = SHIFT_DOWN_MASK | BUTTON1_DOWN_MASK; int offmask = CTRL_DOWN_MASK; if ((event.getModifiersEx() &amp; (onmask | offmask)) == onmask) { ... } </PRE> The above code will work even if new modifiers are added.
 * @since 1.4
 */
public int getModifiersEx(){
  return modifiers & ~JDK_1_3_MODIFIERS;
}
Program: 71745
Project: 71745
Buggy source:
/** 
 * Provides a hint to the look and feel as to the <code>KeyEvent.VK</code> constant that can be used as a mnemonic to access the panel. A return value <= 0 indicates there is no mnemonic. <p> The return value here is a hint, it is ultimately up to the look and feel to honor the return value in some meaningful way. <p> This implementation returns 0, indicating the <code>AbstractColorChooserPanel</code> does not support a mnemonic, subclasses wishing a mnemonic will need to override this.
 * @return KeyEvent.VK constant identifying the mnemonic; <= 0 for nomnemonic
 * @see #getDisplayedMnemonicIndex
 * @since 1.4
 */
public int getMnemonic(){
  return 0;
}

Fixed version (ground truth):
/** 
 * Provides a hint to the look and feel as to the <code>KeyEvent.VK</code> constant that can be used as a mnemonic to access the panel. A return value &lt;= 0 indicates there is no mnemonic. <p> The return value here is a hint, it is ultimately up to the look and feel to honor the return value in some meaningful way. <p> This implementation returns 0, indicating the <code>AbstractColorChooserPanel</code> does not support a mnemonic, subclasses wishing a mnemonic will need to override this.
 * @return KeyEvent.VK constant identifying the mnemonic; &lt;= 0 for nomnemonic
 * @see #getDisplayedMnemonicIndex
 * @since 1.4
 */
public int getMnemonic(){
  return 0;
}
Program: 71746
Project: 71746
Buggy source:
/** 
 * Provides a hint to the look and feel as to the index of the character in <code>getDisplayName</code> that should be visually identified as the mnemonic. The look and feel should only use this if <code>getMnemonic</code> returns a value > 0. <p> The return value here is a hint, it is ultimately up to the look and feel to honor the return value in some meaningful way. For example, a look and feel may wish to render each <code>AbstractColorChooserPanel</code> in a <code>JTabbedPane</code>, and further use this return value to underline a character in the <code>getDisplayName</code>. <p> This implementation returns -1, indicating the <code>AbstractColorChooserPanel</code> does not support a mnemonic, subclasses wishing a mnemonic will need to override this.
 * @return Character index to render mnemonic for; -1 to provide novisual identifier for this panel.
 * @see #getMnemonic
 * @since 1.4
 */
public int getDisplayedMnemonicIndex(){
  return -1;
}

Fixed version (ground truth):
/** 
 * Provides a hint to the look and feel as to the index of the character in <code>getDisplayName</code> that should be visually identified as the mnemonic. The look and feel should only use this if <code>getMnemonic</code> returns a value &gt; 0. <p> The return value here is a hint, it is ultimately up to the look and feel to honor the return value in some meaningful way. For example, a look and feel may wish to render each <code>AbstractColorChooserPanel</code> in a <code>JTabbedPane</code>, and further use this return value to underline a character in the <code>getDisplayName</code>. <p> This implementation returns -1, indicating the <code>AbstractColorChooserPanel</code> does not support a mnemonic, subclasses wishing a mnemonic will need to override this.
 * @return Character index to render mnemonic for; -1 to provide novisual identifier for this panel.
 * @see #getMnemonic
 * @since 1.4
 */
public int getDisplayedMnemonicIndex(){
  return -1;
}
Program: 71747
Project: 71747
Buggy source:
/** 
 * Fetches the location of other end of a logical selection.  If there is no selection, this will be the same as dot.
 * @return the mark >= 0
 */
public abstract int getMark();

Fixed version (ground truth):
/** 
 * Fetches the location of other end of a logical selection.  If there is no selection, this will be the same as dot.
 * @return the mark &gt;= 0
 */
public abstract int getMark();
Program: 71748
Project: 71748
Buggy source:
/** 
 * Fetches the location of the caret.
 * @return the dot >= 0
 */
public abstract int getDot();

Fixed version (ground truth):
/** 
 * Fetches the location of the caret.
 * @return the dot &gt;= 0
 */
public abstract int getDot();
Program: 71749
Project: 71749
Buggy source:
/** 
 * Fetches the index within the element represented. This is the location that children were added and/or removed.
 * @return the index >= 0
 */
public int getIndex();

Fixed version (ground truth):
/** 
 * Fetches the index within the element represented. This is the location that children were added and/or removed.
 * @return the index &gt;= 0
 */
public int getIndex();
Program: 71750
Project: 71750
Buggy source:
/** 
 * Returns the offset within the document of the start of the change.
 * @return the offset >= 0
 */
public int getOffset();

Fixed version (ground truth):
/** 
 * Returns the offset within the document of the start of the change.
 * @return the offset &gt;= 0
 */
public int getOffset();
Program: 71751
Project: 71751
Buggy source:
/** 
 * Returns the length of the change.
 * @return the length >= 0
 */
public int getLength();

Fixed version (ground truth):
/** 
 * Returns the length of the change.
 * @return the length &gt;= 0
 */
public int getLength();
Program: 71752
Project: 71752
Buggy source:
/** 
 * Constructs a ListDataEvent object. If index0 is > index1, index0 and index1 will be swapped such that index0 will always be <= index1.
 * @param source  the source Object (typically <code>this</code>)
 * @param type    an int specifying {@link #CONTENTS_CHANGED},  {@link #INTERVAL_ADDED}, or   {@link #INTERVAL_REMOVED}
 * @param index0  one end of the new interval
 * @param index1  the other end of the new interval
 */
public ListDataEvent(Object source,int type,int index0,int index1){
  super(source);
  this.type=type;
  this.index0=Math.min(index0,index1);
  this.index1=Math.max(index0,index1);
}

Fixed version (ground truth):
/** 
 * Constructs a ListDataEvent object. If index0 is &gt; index1, index0 and index1 will be swapped such that index0 will always be &lt;= index1.
 * @param source  the source Object (typically <code>this</code>)
 * @param type    an int specifying {@link #CONTENTS_CHANGED},  {@link #INTERVAL_ADDED}, or   {@link #INTERVAL_REMOVED}
 * @param index0  one end of the new interval
 * @param index1  the other end of the new interval
 */
public ListDataEvent(Object source,int type,int index0,int index1){
  super(source);
  this.type=type;
  this.index0=Math.min(index0,index1);
  this.index1=Math.max(index0,index1);
}
Program: 71753
Project: 71753
Buggy source:
/** 
 * Notification from the <code>UIManager</code> that the look and feel [L&F] has changed. Replaces the current UI object with the latest version from the <code>UIManager</code>.
 * @see JComponent#updateUI
 */
public void updateUI(){
  super.updateUI();
  setForeground(null);
  setBackground(null);
}

Fixed version (ground truth):
/** 
 * Notification from the <code>UIManager</code> that the look and feel [L&amp;F] has changed. Replaces the current UI object with the latest version from the <code>UIManager</code>.
 * @see JComponent#updateUI
 */
public void updateUI(){
  super.updateUI();
  setForeground(null);
  setBackground(null);
}
Program: 71754
Project: 71754
Buggy source:
/** 
 * Moves one or more rows from the inclusive range <code>start</code> to <code>end</code> to the <code>to</code> position in the model. After the move, the row that was at index <code>start</code> will be at index <code>to</code>. This method will send a <code>tableChanged</code> notification message to all the listeners. <p> <pre> Examples of moves: <p> 1. moveRow(1,3,5); a|B|C|D|e|f|g|h|i|j|k   - before a|e|f|g|h|B|C|D|i|j|k   - after <p> 2. moveRow(6,7,1); a|b|c|d|e|f|G|H|i|j|k   - before a|G|H|b|c|d|e|f|i|j|k   - after <p> </pre>
 * @param start       the starting row index to be moved
 * @param end         the ending row index to be moved
 * @param to          the destination of the rows to be moved
 * @exception ArrayIndexOutOfBoundsException  if any of the elementswould be moved out of the table's range
 */
public void moveRow(int start,int end,int to){
  int shift=to - start;
  int first, last;
  if (shift < 0) {
    first=to;
    last=end;
  }
 else {
    first=start;
    last=to + end - start;
  }
  rotate(dataVector,first,last + 1,shift);
  fireTableRowsUpdated(first,last);
}

Fixed version (ground truth):
/** 
 * Moves one or more rows from the inclusive range <code>start</code> to <code>end</code> to the <code>to</code> position in the model. After the move, the row that was at index <code>start</code> will be at index <code>to</code>. This method will send a <code>tableChanged</code> notification message to all the listeners. <p> <pre> Examples of moves: 1. moveRow(1,3,5); a|B|C|D|e|f|g|h|i|j|k   - before a|e|f|g|h|B|C|D|i|j|k   - after 2. moveRow(6,7,1); a|b|c|d|e|f|G|H|i|j|k   - before a|G|H|b|c|d|e|f|i|j|k   - after </pre>
 * @param start       the starting row index to be moved
 * @param end         the ending row index to be moved
 * @param to          the destination of the rows to be moved
 * @exception ArrayIndexOutOfBoundsException  if any of the elementswould be moved out of the table's range
 */
public void moveRow(int start,int end,int to){
  int shift=to - start;
  int first, last;
  if (shift < 0) {
    first=to;
    last=end;
  }
 else {
    first=start;
    last=to + end - start;
  }
  rotate(dataVector,first,last + 1,shift);
  fireTableRowsUpdated(first,last);
}
Program: 71755
Project: 71755
Buggy source:
/** 
 * Returns the look and feel (L&F) object that renders this component.
 * @return the <code>TableHeaderUI</code> object that renders this component
 */
public TableHeaderUI getUI(){
  return (TableHeaderUI)ui;
}

Fixed version (ground truth):
/** 
 * Returns the look and feel (L&amp;F) object that renders this component.
 * @return the <code>TableHeaderUI</code> object that renders this component
 */
public TableHeaderUI getUI(){
  return (TableHeaderUI)ui;
}
Program: 71756
Project: 71756
Buggy source:
/** 
 * Notification from the <code>UIManager</code> that the look and feel (L&F) has changed. Replaces the current UI object with the latest version from the <code>UIManager</code>.
 * @see JComponent#updateUI
 */
public void updateUI(){
  setUI((TableHeaderUI)UIManager.getUI(this));
  TableCellRenderer renderer=getDefaultRenderer();
  if (renderer instanceof Component) {
    SwingUtilities.updateComponentTreeUI((Component)renderer);
  }
}

Fixed version (ground truth):
/** 
 * Notification from the <code>UIManager</code> that the look and feel (L&amp;F) has changed. Replaces the current UI object with the latest version from the <code>UIManager</code>.
 * @see JComponent#updateUI
 */
public void updateUI(){
  setUI((TableHeaderUI)UIManager.getUI(this));
  TableCellRenderer renderer=getDefaultRenderer();
  if (renderer instanceof Component) {
    SwingUtilities.updateComponentTreeUI((Component)renderer);
  }
}
Program: 71757
Project: 71757
Buggy source:
/** 
 * Returns the suffix used to construct the name of the look and feel (L&F) class used to render this component.
 * @return the string "TableHeaderUI"
 * @return "TableHeaderUI"
 * @see JComponent#getUIClassID
 * @see UIDefaults#getUI
 */
public String getUIClassID(){
  return uiClassID;
}

Fixed version (ground truth):
/** 
 * Returns the suffix used to construct the name of the look and feel (L&amp;F) class used to render this component.
 * @return the string "TableHeaderUI"
 * @return "TableHeaderUI"
 * @see JComponent#getUIClassID
 * @see UIDefaults#getUI
 */
public String getUIClassID(){
  return uiClassID;
}
Program: 71758
Project: 71758
Buggy source:
/** 
 * Sets the look and feel (L&F) object that renders this component.
 * @param ui  the <code>TableHeaderUI</code> L&F object
 * @see UIDefaults#getUI
 */
public void setUI(TableHeaderUI ui){
  if (this.ui != ui) {
    super.setUI(ui);
    repaint();
  }
}

Fixed version (ground truth):
/** 
 * Sets the look and feel (L&amp;F) object that renders this component.
 * @param ui  the <code>TableHeaderUI</code> L&amp;F object
 * @see UIDefaults#getUI
 */
public void setUI(TableHeaderUI ui){
  if (this.ui != ui) {
    super.setUI(ui);
    repaint();
  }
}
Program: 71760
Project: 71760
Buggy source:
/** 
 * @inheritDoc
 */
@Override public Dimension getMaximumSize(JComponent c){
  if (c.getComponentCount() > 0 && c.getLayout() != null) {
    return null;
  }
  AbstractButton b=(AbstractButton)c;
  SynthContext ss=getContext(c);
  Dimension size=ss.getStyle().getGraphicsUtils(ss).getMaximumSize(ss,ss.getStyle().getFont(ss),b.getText(),getSizingIcon(b),b.getHorizontalAlignment(),b.getVerticalAlignment(),b.getHorizontalTextPosition(),b.getVerticalTextPosition(),b.getIconTextGap(),b.getDisplayedMnemonicIndex());
  ss.dispose();
  return size;
}

Fixed version (ground truth):
/** 
 * {@inheritDoc}
 */
@Override public Dimension getMaximumSize(JComponent c){
  if (c.getComponentCount() > 0 && c.getLayout() != null) {
    return null;
  }
  AbstractButton b=(AbstractButton)c;
  SynthContext ss=getContext(c);
  Dimension size=ss.getStyle().getGraphicsUtils(ss).getMaximumSize(ss,ss.getStyle().getFont(ss),b.getText(),getSizingIcon(b),b.getHorizontalAlignment(),b.getVerticalAlignment(),b.getHorizontalTextPosition(),b.getVerticalTextPosition(),b.getIconTextGap(),b.getDisplayedMnemonicIndex());
  ss.dispose();
  return size;
}
Program: 71761
Project: 71761
Buggy source:
/** 
 * @inheritDoc
 */
@Override public void paintBorder(SynthContext context,Graphics g,int x,int y,int w,int h){
  context.getPainter().paintButtonBorder(context,g,x,y,w,h);
}

Fixed version (ground truth):
/** 
 * {@inheritDoc}
 */
@Override public void paintBorder(SynthContext context,Graphics g,int x,int y,int w,int h){
  context.getPainter().paintButtonBorder(context,g,x,y,w,h);
}
Program: 71762
Project: 71762
Buggy source:
/** 
 * @inheritDoc
 */
@Override protected void installListeners(AbstractButton b){
  super.installListeners(b);
  b.addPropertyChangeListener(this);
}

Fixed version (ground truth):
/** 
 * {@inheritDoc}
 */
@Override protected void installListeners(AbstractButton b){
  super.installListeners(b);
  b.addPropertyChangeListener(this);
}
Program: 71763
Project: 71763
Buggy source:
/** 
 * @inheritDoc
 */
@Override public Dimension getMinimumSize(JComponent c){
  if (c.getComponentCount() > 0 && c.getLayout() != null) {
    return null;
  }
  AbstractButton b=(AbstractButton)c;
  SynthContext ss=getContext(c);
  Dimension size=ss.getStyle().getGraphicsUtils(ss).getMinimumSize(ss,ss.getStyle().getFont(ss),b.getText(),getSizingIcon(b),b.getHorizontalAlignment(),b.getVerticalAlignment(),b.getHorizontalTextPosition(),b.getVerticalTextPosition(),b.getIconTextGap(),b.getDisplayedMnemonicIndex());
  ss.dispose();
  return size;
}

Fixed version (ground truth):
/** 
 * {@inheritDoc}
 */
@Override public Dimension getMinimumSize(JComponent c){
  if (c.getComponentCount() > 0 && c.getLayout() != null) {
    return null;
  }
  AbstractButton b=(AbstractButton)c;
  SynthContext ss=getContext(c);
  Dimension size=ss.getStyle().getGraphicsUtils(ss).getMinimumSize(ss,ss.getStyle().getFont(ss),b.getText(),getSizingIcon(b),b.getHorizontalAlignment(),b.getVerticalAlignment(),b.getHorizontalTextPosition(),b.getVerticalTextPosition(),b.getIconTextGap(),b.getDisplayedMnemonicIndex());
  ss.dispose();
  return size;
}
Program: 71764
Project: 71764
Buggy source:
/** 
 * @inheritDoc
 */
@Override public void propertyChange(PropertyChangeEvent e){
  if (SynthLookAndFeel.shouldUpdateStyle(e)) {
    updateStyle((AbstractButton)e.getSource());
  }
}

Fixed version (ground truth):
/** 
 * {@inheritDoc}
 */
@Override public void propertyChange(PropertyChangeEvent e){
  if (SynthLookAndFeel.shouldUpdateStyle(e)) {
    updateStyle((AbstractButton)e.getSource());
  }
}
Program: 71765
Project: 71765
Buggy source:
/** 
 * @inheritDoc
 */
@Override protected void installDefaults(AbstractButton b){
  updateStyle(b);
  LookAndFeel.installProperty(b,"String_Node_Str",Boolean.TRUE);
}

Fixed version (ground truth):
/** 
 * {@inheritDoc}
 */
@Override protected void installDefaults(AbstractButton b){
  updateStyle(b);
  LookAndFeel.installProperty(b,"String_Node_Str",Boolean.TRUE);
}
Program: 71766
Project: 71766
Buggy source:
/** 
 * @inheritDoc
 */
@Override protected void uninstallListeners(AbstractButton b){
  super.uninstallListeners(b);
  b.removePropertyChangeListener(this);
}

Fixed version (ground truth):
/** 
 * {@inheritDoc}
 */
@Override protected void uninstallListeners(AbstractButton b){
  super.uninstallListeners(b);
  b.removePropertyChangeListener(this);
}
Program: 71767
Project: 71767
Buggy source:
/** 
 * @inheritDoc
 */
@Override protected void uninstallDefaults(AbstractButton b){
  SynthContext context=getContext(b,ENABLED);
  style.uninstallDefaults(context);
  context.dispose();
  style=null;
}

Fixed version (ground truth):
/** 
 * {@inheritDoc}
 */
@Override protected void uninstallDefaults(AbstractButton b){
  SynthContext context=getContext(b,ENABLED);
  style.uninstallDefaults(context);
  context.dispose();
  style=null;
}
Program: 71768
Project: 71768
Buggy source:
/** 
 * @inheritDoc
 */
@Override public int getBaseline(JComponent c,int width,int height){
  if (c == null) {
    throw new NullPointerException("String_Node_Str");
  }
  if (width < 0 || height < 0) {
    throw new IllegalArgumentException("String_Node_Str");
  }
  AbstractButton b=(AbstractButton)c;
  String text=b.getText();
  if (text == null || "String_Node_Str".equals(text)) {
    return -1;
  }
  Insets i=b.getInsets();
  Rectangle viewRect=new Rectangle();
  Rectangle textRect=new Rectangle();
  Rectangle iconRect=new Rectangle();
  viewRect.x=i.left;
  viewRect.y=i.top;
  viewRect.width=width - (i.right + viewRect.x);
  viewRect.height=height - (i.bottom + viewRect.y);
  SynthContext context=getContext(b);
  FontMetrics fm=context.getComponent().getFontMetrics(context.getStyle().getFont(context));
  context.getStyle().getGraphicsUtils(context).layoutText(context,fm,b.getText(),b.getIcon(),b.getHorizontalAlignment(),b.getVerticalAlignment(),b.getHorizontalTextPosition(),b.getVerticalTextPosition(),viewRect,iconRect,textRect,b.getIconTextGap());
  View view=(View)b.getClientProperty(BasicHTML.propertyKey);
  int baseline;
  if (view != null) {
    baseline=BasicHTML.getHTMLBaseline(view,textRect.width,textRect.height);
    if (baseline >= 0) {
      baseline+=textRect.y;
    }
  }
 else {
    baseline=textRect.y + fm.getAscent();
  }
  context.dispose();
  return baseline;
}

Fixed version (ground truth):
/** 
 * {@inheritDoc}
 */
@Override public int getBaseline(JComponent c,int width,int height){
  if (c == null) {
    throw new NullPointerException("String_Node_Str");
  }
  if (width < 0 || height < 0) {
    throw new IllegalArgumentException("String_Node_Str");
  }
  AbstractButton b=(AbstractButton)c;
  String text=b.getText();
  if (text == null || "String_Node_Str".equals(text)) {
    return -1;
  }
  Insets i=b.getInsets();
  Rectangle viewRect=new Rectangle();
  Rectangle textRect=new Rectangle();
  Rectangle iconRect=new Rectangle();
  viewRect.x=i.left;
  viewRect.y=i.top;
  viewRect.width=width - (i.right + viewRect.x);
  viewRect.height=height - (i.bottom + viewRect.y);
  SynthContext context=getContext(b);
  FontMetrics fm=context.getComponent().getFontMetrics(context.getStyle().getFont(context));
  context.getStyle().getGraphicsUtils(context).layoutText(context,fm,b.getText(),b.getIcon(),b.getHorizontalAlignment(),b.getVerticalAlignment(),b.getHorizontalTextPosition(),b.getVerticalTextPosition(),viewRect,iconRect,textRect,b.getIconTextGap());
  View view=(View)b.getClientProperty(BasicHTML.propertyKey);
  int baseline;
  if (view != null) {
    baseline=BasicHTML.getHTMLBaseline(view,textRect.width,textRect.height);
    if (baseline >= 0) {
      baseline+=textRect.y;
    }
  }
 else {
    baseline=textRect.y + fm.getAscent();
  }
  context.dispose();
  return baseline;
}
Program: 71769
Project: 71769
Buggy source:
/** 
 * @inheritDoc
 */
@Override public Dimension getPreferredSize(JComponent c){
  if (c.getComponentCount() > 0 && c.getLayout() != null) {
    return null;
  }
  AbstractButton b=(AbstractButton)c;
  SynthContext ss=getContext(c);
  Dimension size=ss.getStyle().getGraphicsUtils(ss).getPreferredSize(ss,ss.getStyle().getFont(ss),b.getText(),getSizingIcon(b),b.getHorizontalAlignment(),b.getVerticalAlignment(),b.getHorizontalTextPosition(),b.getVerticalTextPosition(),b.getIconTextGap(),b.getDisplayedMnemonicIndex());
  ss.dispose();
  return size;
}

Fixed version (ground truth):
/** 
 * {@inheritDoc}
 */
@Override public Dimension getPreferredSize(JComponent c){
  if (c.getComponentCount() > 0 && c.getLayout() != null) {
    return null;
  }
  AbstractButton b=(AbstractButton)c;
  SynthContext ss=getContext(c);
  Dimension size=ss.getStyle().getGraphicsUtils(ss).getPreferredSize(ss,ss.getStyle().getFont(ss),b.getText(),getSizingIcon(b),b.getHorizontalAlignment(),b.getVerticalAlignment(),b.getHorizontalTextPosition(),b.getVerticalTextPosition(),b.getIconTextGap(),b.getDisplayedMnemonicIndex());
  ss.dispose();
  return size;
}
Program: 71770
Project: 71770
Buggy source:
/** 
 * @inheritDoc
 */
@Override public void paintBorder(SynthContext context,Graphics g,int x,int y,int w,int h){
  context.getPainter().paintCheckBoxMenuItemBorder(context,g,x,y,w,h);
}

Fixed version (ground truth):
/** 
 * {@inheritDoc}
 */
@Override public void paintBorder(SynthContext context,Graphics g,int x,int y,int w,int h){
  context.getPainter().paintCheckBoxMenuItemBorder(context,g,x,y,w,h);
}
Program: 71771
Project: 71771
Buggy source:
/** 
 * @inheritDoc
 */
@Override protected String getPropertyPrefix(){
  return "String_Node_Str";
}

Fixed version (ground truth):
/** 
 * {@inheritDoc}
 */
@Override protected String getPropertyPrefix(){
  return "String_Node_Str";
}
Program: 71772
Project: 71772
Buggy source:
/** 
 * @inheritDoc
 */
@Override public void paintBorder(SynthContext context,Graphics g,int x,int y,int w,int h){
  context.getPainter().paintCheckBoxBorder(context,g,x,y,w,h);
}

Fixed version (ground truth):
/** 
 * {@inheritDoc}
 */
@Override public void paintBorder(SynthContext context,Graphics g,int x,int y,int w,int h){
  context.getPainter().paintCheckBoxBorder(context,g,x,y,w,h);
}
Program: 71773
Project: 71773
Buggy source:
/** 
 * @inheritDoc
 */
@Override protected String getPropertyPrefix(){
  return "String_Node_Str";
}

Fixed version (ground truth):
/** 
 * {@inheritDoc}
 */
@Override protected String getPropertyPrefix(){
  return "String_Node_Str";
}
Program: 71774
Project: 71774
Buggy source:
/** 
 * @inheritDoc
 */
@Override protected void installDefaults(){
  super.installDefaults();
  updateStyle(chooser);
}

Fixed version (ground truth):
/** 
 * {@inheritDoc}
 */
@Override protected void installDefaults(){
  super.installDefaults();
  updateStyle(chooser);
}
Program: 71775
Project: 71775
Buggy source:
/** 
 * @inheritDoc
 */
@Override protected void uninstallListeners(){
  chooser.removePropertyChangeListener(this);
  super.uninstallListeners();
}

Fixed version (ground truth):
/** 
 * {@inheritDoc}
 */
@Override protected void uninstallListeners(){
  chooser.removePropertyChangeListener(this);
  super.uninstallListeners();
}
Program: 71776
Project: 71776
Buggy source:
/** 
 * @inheritDoc
 */
@Override protected void uninstallDefaults(){
  SynthContext context=getContext(chooser,ENABLED);
  style.uninstallDefaults(context);
  context.dispose();
  style=null;
  super.uninstallDefaults();
}

Fixed version (ground truth):
/** 
 * {@inheritDoc}
 */
@Override protected void uninstallDefaults(){
  SynthContext context=getContext(chooser,ENABLED);
  style.uninstallDefaults(context);
  context.dispose();
  style=null;
  super.uninstallDefaults();
}
Program: 71777
Project: 71777
Buggy source:
/** 
 * @inheritDoc
 */
@Override public void paintBorder(SynthContext context,Graphics g,int x,int y,int w,int h){
  context.getPainter().paintColorChooserBorder(context,g,x,y,w,h);
}

Fixed version (ground truth):
/** 
 * {@inheritDoc}
 */
@Override public void paintBorder(SynthContext context,Graphics g,int x,int y,int w,int h){
  context.getPainter().paintColorChooserBorder(context,g,x,y,w,h);
}
Program: 71778
Project: 71778
Buggy source:
/** 
 * @inheritDoc
 */
@Override protected void installListeners(){
  super.installListeners();
  chooser.addPropertyChangeListener(this);
}

Fixed version (ground truth):
/** 
 * {@inheritDoc}
 */
@Override protected void installListeners(){
  super.installListeners();
  chooser.addPropertyChangeListener(this);
}
Program: 71779
Project: 71779
Buggy source:
/** 
 * @inheritDoc
 */
@Override public void propertyChange(PropertyChangeEvent e){
  if (SynthLookAndFeel.shouldUpdateStyle(e)) {
    updateStyle((JColorChooser)e.getSource());
  }
}

Fixed version (ground truth):
/** 
 * {@inheritDoc}
 */
@Override public void propertyChange(PropertyChangeEvent e){
  if (SynthLookAndFeel.shouldUpdateStyle(e)) {
    updateStyle((JColorChooser)e.getSource());
  }
}
Program: 71780
Project: 71780
Buggy source:
/** 
 * @inheritDoc
 */
@Override protected AbstractColorChooserPanel[] createDefaultChoosers(){
  SynthContext context=getContext(chooser,ENABLED);
  AbstractColorChooserPanel[] panels=(AbstractColorChooserPanel[])context.getStyle().get(context,"String_Node_Str");
  context.dispose();
  if (panels == null) {
    panels=ColorChooserComponentFactory.getDefaultChooserPanels();
  }
  return panels;
}

Fixed version (ground truth):
/** 
 * {@inheritDoc}
 */
@Override protected AbstractColorChooserPanel[] createDefaultChoosers(){
  SynthContext context=getContext(chooser,ENABLED);
  AbstractColorChooserPanel[] panels=(AbstractColorChooserPanel[])context.getStyle().get(context,"String_Node_Str");
  context.dispose();
  if (panels == null) {
    panels=ColorChooserComponentFactory.getDefaultChooserPanels();
  }
  return panels;
}
Program: 71781
Project: 71781
Buggy source:
/** 
 * @inheritDoc
 */
@Override protected ComboBoxEditor createEditor(){
  return new SynthComboBoxEditor();
}

Fixed version (ground truth):
/** 
 * {@inheritDoc}
 */
@Override protected ComboBoxEditor createEditor(){
  return new SynthComboBoxEditor();
}
Program: 71782
Project: 71782
Buggy source:
/** 
 * @inheritDoc
 */
@Override public void paintBorder(SynthContext context,Graphics g,int x,int y,int w,int h){
  context.getPainter().paintComboBoxBorder(context,g,x,y,w,h);
}

Fixed version (ground truth):
/** 
 * {@inheritDoc}
 */
@Override public void paintBorder(SynthContext context,Graphics g,int x,int y,int w,int h){
  context.getPainter().paintComboBoxBorder(context,g,x,y,w,h);
}
Program: 71783
Project: 71783
Buggy source:
/** 
 * @inheritDoc Overridden to ensure that ButtonHandler is created prior to any of the other installXXX methods, since several of them reference buttonHandler.
 */
@Override public void installUI(JComponent c){
  buttonHandler=new ButtonHandler();
  super.installUI(c);
}

Fixed version (ground truth):
/** 
 * {@inheritDoc}Overridden to ensure that ButtonHandler is created prior to any of the other installXXX methods, since several of them reference buttonHandler.
 */
@Override public void installUI(JComponent c){
  buttonHandler=new ButtonHandler();
  super.installUI(c);
}
Program: 71784
Project: 71784
Buggy source:
/** 
 * @inheritDoc
 */
@Override protected void installListeners(){
  comboBox.addPropertyChangeListener(this);
  comboBox.addMouseListener(buttonHandler);
  editorFocusHandler=new EditorFocusHandler(comboBox);
  super.installListeners();
}

Fixed version (ground truth):
/** 
 * {@inheritDoc}
 */
@Override protected void installListeners(){
  comboBox.addPropertyChangeListener(this);
  comboBox.addMouseListener(buttonHandler);
  editorFocusHandler=new EditorFocusHandler(comboBox);
  super.installListeners();
}
Program: 71785
Project: 71785
Buggy source:
/** 
 * @inheritDoc
 */
@Override protected JButton createArrowButton(){
  SynthArrowButton button=new SynthArrowButton(SwingConstants.SOUTH);
  button.setName("String_Node_Str");
  button.setModel(buttonHandler);
  return button;
}

Fixed version (ground truth):
/** 
 * {@inheritDoc}
 */
@Override protected JButton createArrowButton(){
  SynthArrowButton button=new SynthArrowButton(SwingConstants.SOUTH);
  button.setName("String_Node_Str");
  button.setModel(buttonHandler);
  return button;
}
Program: 71786
Project: 71786
Buggy source:
/** 
 * @inheritDoc
 */
@Override protected ListCellRenderer createRenderer(){
  return new SynthComboBoxRenderer();
}

Fixed version (ground truth):
/** 
 * {@inheritDoc}
 */
@Override protected ListCellRenderer createRenderer(){
  return new SynthComboBoxRenderer();
}
Program: 71787
Project: 71787
Buggy source:
/** 
 * @inheritDoc
 */
@Override protected void uninstallListeners(){
  editorFocusHandler.unregister();
  comboBox.removePropertyChangeListener(this);
  comboBox.removeMouseListener(buttonHandler);
  buttonHandler.pressed=false;
  buttonHandler.over=false;
  super.uninstallListeners();
}

Fixed version (ground truth):
/** 
 * {@inheritDoc}
 */
@Override protected void uninstallListeners(){
  editorFocusHandler.unregister();
  comboBox.removePropertyChangeListener(this);
  comboBox.removeMouseListener(buttonHandler);
  buttonHandler.pressed=false;
  buttonHandler.over=false;
  super.uninstallListeners();
}
Program: 71788
Project: 71788
Buggy source:
/** 
 * @inheritDoc
 */
@Override protected void uninstallDefaults(){
  SynthContext context=getContext(comboBox,ENABLED);
  style.uninstallDefaults(context);
  context.dispose();
  style=null;
}

Fixed version (ground truth):
/** 
 * {@inheritDoc}
 */
@Override protected void uninstallDefaults(){
  SynthContext context=getContext(comboBox,ENABLED);
  style.uninstallDefaults(context);
  context.dispose();
  style=null;
}
Program: 71789
Project: 71789
Buggy source:
/** 
 * @inheritDoc
 */
@Override protected ComboPopup createPopup(){
  SynthComboPopup p=new SynthComboPopup(comboBox);
  p.addPopupMenuListener(buttonHandler);
  return p;
}

Fixed version (ground truth):
/** 
 * {@inheritDoc}
 */
@Override protected ComboPopup createPopup(){
  SynthComboPopup p=new SynthComboPopup(comboBox);
  p.addPopupMenuListener(buttonHandler);
  return p;
}
Program: 71790
Project: 71790
Buggy source:
/** 
 * @inheritDoc
 */
@Override public void uninstallUI(JComponent c){
  if (popup instanceof SynthComboPopup) {
    ((SynthComboPopup)popup).removePopupMenuListener(buttonHandler);
  }
  super.uninstallUI(c);
  buttonHandler=null;
}

Fixed version (ground truth):
/** 
 * {@inheritDoc}
 */
@Override public void uninstallUI(JComponent c){
  if (popup instanceof SynthComboPopup) {
    ((SynthComboPopup)popup).removePopupMenuListener(buttonHandler);
  }
  super.uninstallUI(c);
  buttonHandler=null;
}
Program: 71791
Project: 71791
Buggy source:
/** 
 * Initializes a new instance of this class.
 */
protected Association(int associationID,int maxInStreams,int maxOutStreams){
  this.associationID=associationID;
  this.maxInStreams=maxInStreams;
  this.maxOutStreams=maxOutStreams;
}

Fixed version (ground truth):
/** 
 * Initializes a new instance of this class.
 * @param associationID The association ID
 * @param maxInStreams The maximum number of inbound streams
 * @param maxOutStreams The maximum number of outbound streams
 */
protected Association(int associationID,int maxInStreams,int maxOutStreams){
  this.associationID=associationID;
  this.maxInStreams=maxInStreams;
  this.maxOutStreams=maxOutStreams;
}
Program: 71792
Project: 71792
Buggy source:
/** 
 * Constructs an instance of this class with the specified message.
 */
public IllegalReceiveException(String msg){
  super(msg);
}

Fixed version (ground truth):
/** 
 * Constructs an instance of this class with the specified message.
 * @param msg The String that contains a detailed message
 */
public IllegalReceiveException(String msg){
  super(msg);
}
Program: 71793
Project: 71793
Buggy source:
/** 
 * Constructs an instance of this class with the specified detailed message.
 */
public IllegalUnbindException(String msg){
  super(msg);
}

Fixed version (ground truth):
/** 
 * Constructs an instance of this class with the specified detailed message.
 * @param msg The String that contains a detailed message
 */
public IllegalUnbindException(String msg){
  super(msg);
}
Program: 71794
Project: 71794
Buggy source:
/** 
 * Constructs an instance of this class with the specified detailed message.
 */
public InvalidStreamException(String msg){
  super(msg);
}

Fixed version (ground truth):
/** 
 * Constructs an instance of this class with the specified detailed message.
 * @param msg The String that contains a detailed message
 */
public InvalidStreamException(String msg){
  super(msg);
}
Program: 71795
Project: 71795
Buggy source:
/** 
 * Returns the association that this notification is applicable to.
 */
public Association association();

Fixed version (ground truth):
/** 
 * Returns the association that this notification is applicable to.
 * @return  The association
 */
public Association association();
Program: 71796
Project: 71796
Buggy source:
/** 
 * Sets the value of a socket option.
 * @param name The socket option
 * @param value The value of the socket option. A value of  {@code null} may bea valid value for some socket options.
 * @return  This channel
 * @throws UnsupportedOperationException If the socket option is not supported by this channel
 * @throws IllegalArgumentException If the value is not a valid value for this socket option
 * @throws ClosedChannelException If this channel is closed
 * @throws IOException If an I/O error occurs
 * @see SctpStandardSocketOptions
 */
public abstract <T>SctpChannel setOption(SctpSocketOption<T> name,T value) throws IOException ;

Fixed version (ground truth):
/** 
 * Sets the value of a socket option.
 * @param < T > The type of the socket option value
 * @param name The socket option
 * @param value The value of the socket option. A value of  {@code null} may bea valid value for some socket options.
 * @return  This channel
 * @throws UnsupportedOperationException If the socket option is not supported by this channel
 * @throws IllegalArgumentException If the value is not a valid value for this socket option
 * @throws ClosedChannelException If this channel is closed
 * @throws IOException If an I/O error occurs
 * @see SctpStandardSocketOptions
 */
public abstract <T>SctpChannel setOption(SctpSocketOption<T> name,T value) throws IOException ;
Program: 71798
Project: 71798
Buggy source:
/** 
 * Returns the value of a socket option.
 * @param name The socket option
 * @return  The value of the socket option. A value of {@code null} may bea valid value for some socket options.
 * @throws UnsupportedOperationException If the socket option is not supported by this channel
 * @throws ClosedChannelException If this channel is closed
 * @throws IOException If an I/O error occurs
 * @see SctpStandardSocketOptions
 */
public abstract <T>T getOption(SctpSocketOption<T> name) throws IOException ;

Fixed version (ground truth):
/** 
 * Returns the value of a socket option.
 * @param < T > The type of the socket option value
 * @param name The socket option
 * @return  The value of the socket option. A value of {@code null} may bea valid value for some socket options.
 * @throws UnsupportedOperationException If the socket option is not supported by this channel
 * @throws ClosedChannelException If this channel is closed
 * @throws IOException If an I/O error occurs
 * @see SctpStandardSocketOptions
 */
public abstract <T>T getOption(SctpSocketOption<T> name) throws IOException ;
Program: 71800
Project: 71800
Buggy source:
/** 
 * Sets the value of a socket option. <P> Note that some options are retrieved on the channel's socket, therefore the   {@code association} parameter is not applicable and will beignored if given. However, if the option is association specific then the association must be given.
 * @param name The socket option
 * @param association The association whose option should be set, or  {@code null}if this option should be set at the channel's socket level.
 * @param value The value of the socket option. A value of  {@code null} may bea valid value for some socket options.
 * @return  This channel
 * @throws UnsupportedOperationException If the socket option is not supported by this channel
 * @throws IllegalArgumentException If the value is not a valid value for this socket option
 * @throws ClosedChannelException If this channel is closed
 * @throws IOException If an I/O error occurs
 * @see SctpStandardSocketOptions
 */
public abstract <T>SctpMultiChannel setOption(SctpSocketOption<T> name,T value,Association association) throws IOException ;

Fixed version (ground truth):
/** 
 * Sets the value of a socket option. <P> Note that some options are retrieved on the channel's socket, therefore the   {@code association} parameter is not applicable and will beignored if given. However, if the option is association specific then the association must be given.
 * @param < T > The type of the socket option value
 * @param name The socket option
 * @param association The association whose option should be set, or  {@code null}if this option should be set at the channel's socket level.
 * @param value The value of the socket option. A value of  {@code null} may bea valid value for some socket options.
 * @return  This channel
 * @throws UnsupportedOperationException If the socket option is not supported by this channel
 * @throws IllegalArgumentException If the value is not a valid value for this socket option
 * @throws ClosedChannelException If this channel is closed
 * @throws IOException If an I/O error occurs
 * @see SctpStandardSocketOptions
 */
public abstract <T>SctpMultiChannel setOption(SctpSocketOption<T> name,T value,Association association) throws IOException ;
Program: 71802
Project: 71802
Buggy source:
/** 
 * Returns the value of a socket option. <P> Note that some options are retrieved on the channel's socket, therefore the   {@code association} parameter is not applicable and will beignored if given. However, if the option is association specific then the association must be given.
 * @param name The socket option
 * @param association The association whose option should be retrieved, or  {@code null}if this option should be retrieved at the channel's socket level.
 * @return  The value of the socket option. A value of {@code null} may bea valid value for some socket options.
 * @throws UnsupportedOperationException If the socket option is not supported by this channel
 * @throws ClosedChannelException If this channel is closed
 * @throws IOException If an I/O error occurs
 * @see SctpStandardSocketOptions
 */
public abstract <T>T getOption(SctpSocketOption<T> name,Association association) throws IOException ;

Fixed version (ground truth):
/** 
 * Returns the value of a socket option. <P> Note that some options are retrieved on the channel's socket, therefore the   {@code association} parameter is not applicable and will beignored if given. However, if the option is association specific then the association must be given.
 * @param < T > The type of the socket option value
 * @param name The socket option
 * @param association The association whose option should be retrieved, or  {@code null}if this option should be retrieved at the channel's socket level.
 * @return  The value of the socket option. A value of {@code null} may bea valid value for some socket options.
 * @throws UnsupportedOperationException If the socket option is not supported by this channel
 * @throws ClosedChannelException If this channel is closed
 * @throws IOException If an I/O error occurs
 * @see SctpStandardSocketOptions
 */
public abstract <T>T getOption(SctpSocketOption<T> name,Association association) throws IOException ;
Program: 71803
Project: 71803
Buggy source:
/** 
 * Returns all of the remote addresses to which the given association on this channel's socket is connected.
 * @return  All of the remote addresses for the given association, oran empty  {@code Set} if the association has been shutdown
 * @throws ClosedChannelException If the channel is closed
 * @throws IOException If an I/O error occurs
 */
public abstract Set<SocketAddress> getRemoteAddresses(Association association) throws IOException ;

Fixed version (ground truth):
/** 
 * Returns all of the remote addresses to which the given association on this channel's socket is connected.
 * @param association The association
 * @return  All of the remote addresses for the given association, oran empty  {@code Set} if the association has been shutdown
 * @throws ClosedChannelException If the channel is closed
 * @throws IOException If an I/O error occurs
 */
public abstract Set<SocketAddress> getRemoteAddresses(Association association) throws IOException ;
Program: 71805
Project: 71805
Buggy source:
/** 
 * Sets the value of a socket option.
 * @param name The socket option
 * @param value The value of the socket option. A value of  {@code null} may bea valid value for some socket options.
 * @return  This channel
 * @throws UnsupportedOperationException If the socket option is not supported by this channel
 * @throws IllegalArgumentException If the value is not a valid value for this socket option
 * @throws java.nio.channels.ClosedChannelException If this channel is closed
 * @throws IOException If an I/O error occurs
 * @see SctpStandardSocketOptions
 */
public abstract <T>SctpServerChannel setOption(SctpSocketOption<T> name,T value) throws IOException ;

Fixed version (ground truth):
/** 
 * Sets the value of a socket option.
 * @param < T > The type of the socket option value
 * @param name The socket option
 * @param value The value of the socket option. A value of  {@code null} may bea valid value for some socket options.
 * @return  This channel
 * @throws UnsupportedOperationException If the socket option is not supported by this channel
 * @throws IllegalArgumentException If the value is not a valid value for this socket option
 * @throws java.nio.channels.ClosedChannelException If this channel is closed
 * @throws IOException If an I/O error occurs
 * @see SctpStandardSocketOptions
 */
public abstract <T>SctpServerChannel setOption(SctpSocketOption<T> name,T value) throws IOException ;
Program: 71806
Project: 71806
Buggy source:
/** 
 * Returns the value of a socket option.
 * @param name The socket option
 * @return  The value of the socket option. A value of {@code null} may bea valid value for some socket options.
 * @throws UnsupportedOperationException If the socket option is not supported by this channel
 * @throws java.nio.channels.ClosedChannelException If this channel is closed
 * @throws IOException If an I/O error occurs
 * @see SctpStandardSocketOptions
 */
public abstract <T>T getOption(SctpSocketOption<T> name) throws IOException ;

Fixed version (ground truth):
/** 
 * Returns the value of a socket option.
 * @param < T > The type of the socket option value
 * @param name The socket option
 * @return  The value of the socket option. A value of {@code null} may bea valid value for some socket options.
 * @throws UnsupportedOperationException If the socket option is not supported by this channel
 * @throws java.nio.channels.ClosedChannelException If this channel is closed
 * @throws IOException If an I/O error occurs
 * @see SctpStandardSocketOptions
 */
public abstract <T>T getOption(SctpSocketOption<T> name) throws IOException ;
Program: 71809
Project: 71809
Buggy source:
/** 
 * Returns a (transparent) specification of this parameter object.  {@code paramSpec} identifies the specification class in whichthe parameters should be returned. It could, for example, be {@code DSAParameterSpec.class}, to indicate that the parameters should be returned in an instance of the  {@code DSAParameterSpec} class.
 * @param paramSpec the specification class in whichthe parameters should be returned.
 * @return the parameter specification.
 * @exception InvalidParameterSpecException if the requested parameterspecification is inappropriate for this parameter object, or if this parameter object has not been initialized.
 */
public final <T extends AlgorithmParameterSpec>T getParameterSpec(Class<T> paramSpec) throws InvalidParameterSpecException {
  if (this.initialized == false) {
    throw new InvalidParameterSpecException("String_Node_Str");
  }
  return paramSpi.engineGetParameterSpec(paramSpec);
}

Fixed version (ground truth):
/** 
 * Returns a (transparent) specification of this parameter object.  {@code paramSpec} identifies the specification class in whichthe parameters should be returned. It could, for example, be {@code DSAParameterSpec.class}, to indicate that the parameters should be returned in an instance of the  {@code DSAParameterSpec} class.
 * @param < T > the type of the parameter specification to be returrned
 * @param paramSpec the specification class in whichthe parameters should be returned.
 * @return the parameter specification.
 * @exception InvalidParameterSpecException if the requested parameterspecification is inappropriate for this parameter object, or if this parameter object has not been initialized.
 */
public final <T extends AlgorithmParameterSpec>T getParameterSpec(Class<T> paramSpec) throws InvalidParameterSpecException {
  if (this.initialized == false) {
    throw new InvalidParameterSpecException("String_Node_Str");
  }
  return paramSpi.engineGetParameterSpec(paramSpec);
}