nus-yam/ex-repair huggingface dataset:
Program: 77276
Project: 77276
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: 77277
Project: 77277
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: 77278
Project: 77278
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: 77279
Project: 77279
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: 77280
Project: 77280
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: 77281
Project: 77281
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: 77282
Project: 77282
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: 77283
Project: 77283
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: 77284
Project: 77284
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: 77285
Project: 77285
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: 77286
Project: 77286
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: 77287
Project: 77287
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: 77288
Project: 77288
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: 77290
Project: 77290
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: 77291
Project: 77291
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: 77292
Project: 77292
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: 77293
Project: 77293
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: 77294
Project: 77294
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: 77295
Project: 77295
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: 77296
Project: 77296
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: 77297
Project: 77297
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: 77298
Project: 77298
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: 77299
Project: 77299
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: 77300
Project: 77300
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: 77301
Project: 77301
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: 77302
Project: 77302
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: 77303
Project: 77303
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: 77304
Project: 77304
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: 77305
Project: 77305
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: 77306
Project: 77306
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: 77307
Project: 77307
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: 77308
Project: 77308
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: 77309
Project: 77309
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: 77310
Project: 77310
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: 77311
Project: 77311
Buggy source:
/** 
 * @inheritDoc
 */
@Override protected ComboBoxEditor createEditor(){
  return new SynthComboBoxEditor();
}

Fixed version (ground truth):
/** 
 * {@inheritDoc}
 */
@Override protected ComboBoxEditor createEditor(){
  return new SynthComboBoxEditor();
}
Program: 77312
Project: 77312
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: 77313
Project: 77313
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: 77314
Project: 77314
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: 77315
Project: 77315
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: 77316
Project: 77316
Buggy source:
/** 
 * @inheritDoc
 */
@Override protected ListCellRenderer createRenderer(){
  return new SynthComboBoxRenderer();
}

Fixed version (ground truth):
/** 
 * {@inheritDoc}
 */
@Override protected ListCellRenderer createRenderer(){
  return new SynthComboBoxRenderer();
}
Program: 77317
Project: 77317
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: 77318
Project: 77318
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: 77319
Project: 77319
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: 77320
Project: 77320
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: 77321
Project: 77321
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: 77322
Project: 77322
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: 77323
Project: 77323
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: 77324
Project: 77324
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: 77325
Project: 77325
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: 77326
Project: 77326
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: 77328
Project: 77328
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: 77330
Project: 77330
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: 77332
Project: 77332
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: 77333
Project: 77333
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: 77335
Project: 77335
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: 77336
Project: 77336
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: 77339
Project: 77339
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);
}
Program: 77340
Project: 77340
Buggy source:
/** 
 * Returns a (transparent) specification of this parameters 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.
 */
protected abstract <T extends AlgorithmParameterSpec>T engineGetParameterSpec(Class<T> paramSpec) throws InvalidParameterSpecException ;

Fixed version (ground truth):
/** 
 * Returns a (transparent) specification of this parameters 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 returned
 * @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.
 */
protected abstract <T extends AlgorithmParameterSpec>T engineGetParameterSpec(Class<T> paramSpec) throws InvalidParameterSpecException ;
Program: 77341
Project: 77341
Buggy source:
/** 
 * Returns a specification (key material) of the given key object.  {@code keySpec} identifies the specification class in whichthe key material should be returned. It could, for example, be {@code DSAPublicKeySpec.class}, to indicate that the key material should be returned in an instance of the  {@code DSAPublicKeySpec} class.
 * @param key the key.
 * @param keySpec the specification class in whichthe key material should be returned.
 * @return the underlying key specification (key material) in an instanceof the requested specification class.
 * @exception InvalidKeySpecException if the requested key specification isinappropriate for the given key, or the given key cannot be processed (e.g., the given key has an unrecognized algorithm or format).
 */
public final <T extends KeySpec>T getKeySpec(Key key,Class<T> keySpec) throws InvalidKeySpecException {
  if (serviceIterator == null) {
    return spi.engineGetKeySpec(key,keySpec);
  }
  Exception failure=null;
  KeyFactorySpi mySpi=spi;
  do {
    try {
      return mySpi.engineGetKeySpec(key,keySpec);
    }
 catch (    Exception e) {
      if (failure == null) {
        failure=e;
      }
      mySpi=nextSpi(mySpi);
    }
  }
 while (mySpi != null);
  if (failure instanceof RuntimeException) {
    throw (RuntimeException)failure;
  }
  if (failure instanceof InvalidKeySpecException) {
    throw (InvalidKeySpecException)failure;
  }
  throw new InvalidKeySpecException("String_Node_Str",failure);
}

Fixed version (ground truth):
/** 
 * Returns a specification (key material) of the given key object.  {@code keySpec} identifies the specification class in whichthe key material should be returned. It could, for example, be {@code DSAPublicKeySpec.class}, to indicate that the key material should be returned in an instance of the  {@code DSAPublicKeySpec} class.
 * @param < T > the type of the key specification to be returned
 * @param key the key.
 * @param keySpec the specification class in whichthe key material should be returned.
 * @return the underlying key specification (key material) in an instanceof the requested specification class.
 * @exception InvalidKeySpecException if the requested key specification isinappropriate for the given key, or the given key cannot be processed (e.g., the given key has an unrecognized algorithm or format).
 */
public final <T extends KeySpec>T getKeySpec(Key key,Class<T> keySpec) throws InvalidKeySpecException {
  if (serviceIterator == null) {
    return spi.engineGetKeySpec(key,keySpec);
  }
  Exception failure=null;
  KeyFactorySpi mySpi=spi;
  do {
    try {
      return mySpi.engineGetKeySpec(key,keySpec);
    }
 catch (    Exception e) {
      if (failure == null) {
        failure=e;
      }
      mySpi=nextSpi(mySpi);
    }
  }
 while (mySpi != null);
  if (failure instanceof RuntimeException) {
    throw (RuntimeException)failure;
  }
  if (failure instanceof InvalidKeySpecException) {
    throw (InvalidKeySpecException)failure;
  }
  throw new InvalidKeySpecException("String_Node_Str",failure);
}