nus-yam/ex-repair huggingface dataset:
Program: 169344
Project: 169344
Buggy source:
public T getValue(){
  if (!selected) {
    return null;
  }
  T value=fromCalendar(calendarValue);
  return value;
}

Fixed version (ground truth):
public T getValue(){
  if (!selected) {
    return null;
  }
  return fromCalendar(calendarValue);
}
Program: 169345
Project: 169345
Buggy source:
/** 
 * Getters and setters which represent a gregorian date.
 * @return
 */
public void setMonth(int month);

Fixed version (ground truth):
/** 
 * Getters and setters which represent a gregorian date.
 * @return
 */
void setMonth(int month);
Program: 169346
Project: 169346
Buggy source:
/** 
 * Set the value as selected.
 * @param selected
 */
public void setSelected(boolean selected);

Fixed version (ground truth):
/** 
 * Set the value as selected.
 * @param selected
 */
void setSelected(boolean selected);
Program: 169347
Project: 169347
Buggy source:
/** 
 * Add or substract number of months.
 * @param add
 */
public void addMonth(int add);

Fixed version (ground truth):
/** 
 * Add or substract number of months.
 * @param add
 */
void addMonth(int add);
Program: 169348
Project: 169348
Buggy source:
/** 
 * Removes a PropertyChangeListener from the list of bean listeners. This method should be used to remove PropertyChangeListeners that were registered for all bound properties of the target bean.
 * @param listener      the PropertyChangeListener to be removed
 * @see #addPropertyChangeListener(PropertyChangeListener)
 */
public void removePropertyChangeListener(PropertyChangeListener listener);

Fixed version (ground truth):
/** 
 * Removes a PropertyChangeListener from the list of bean listeners. This method should be used to remove PropertyChangeListeners that were registered for all bound properties of the target bean.
 * @param listener      the PropertyChangeListener to be removed
 * @see #addPropertyChangeListener(PropertyChangeListener)
 */
void removePropertyChangeListener(PropertyChangeListener listener);
Program: 169349
Project: 169349
Buggy source:
/** 
 * Getters and setters which represent a gregorian date.
 * @return
 */
public void setYear(int year);

Fixed version (ground truth):
/** 
 * Getters and setters which represent a gregorian date.
 * @return
 */
void setYear(int year);
Program: 169350
Project: 169350
Buggy source:
/** 
 * Adds a ChangeListener. ChangeListeners will be notified when the internal state of the control changes. This means that as a user scrolls through dates the internal model changes, which fires a ChangeEvent each time it changes.
 * @param changeListener
 */
public void addChangeListener(ChangeListener changeListener);

Fixed version (ground truth):
/** 
 * Adds a ChangeListener. ChangeListeners will be notified when the internal state of the control changes. This means that as a user scrolls through dates the internal model changes, which fires a ChangeEvent each time it changes.
 * @param changeListener
 */
void addChangeListener(ChangeListener changeListener);
Program: 169351
Project: 169351
Buggy source:
/** 
 * Getters and setters which represent a gregorian date.
 * @return
 */
public int getDay();

Fixed version (ground truth):
/** 
 * Getters and setters which represent a gregorian date.
 * @return
 */
int getDay();
Program: 169352
Project: 169352
Buggy source:
/** 
 * Add or substract number of day.
 * @param add
 */
public void addDay(int add);

Fixed version (ground truth):
/** 
 * Add or substract number of day.
 * @param add
 */
void addDay(int add);
Program: 169353
Project: 169353
Buggy source:
/** 
 * Get the value this model represents.
 * @return
 */
public T getValue();

Fixed version (ground truth):
/** 
 * Get the value this model represents.
 * @return
 */
T getValue();
Program: 169354
Project: 169354
Buggy source:
/** 
 * Removes the specified ChangeListener. ChangeListeners will be notified when the selected date is changed.
 * @param changeListener
 */
public void removeChangeListener(ChangeListener changeListener);

Fixed version (ground truth):
/** 
 * Removes the specified ChangeListener. ChangeListeners will be notified when the selected date is changed.
 * @param changeListener
 */
void removeChangeListener(ChangeListener changeListener);
Program: 169355
Project: 169355
Buggy source:
/** 
 * Add or substract number of years.
 * @param add
 */
public void addYear(int add);

Fixed version (ground truth):
/** 
 * Add or substract number of years.
 * @param add
 */
void addYear(int add);
Program: 169356
Project: 169356
Buggy source:
/** 
 * Getters and setters which represent a gregorian date.
 * @return
 */
public int getYear();

Fixed version (ground truth):
/** 
 * Getters and setters which represent a gregorian date.
 * @return
 */
int getYear();
Program: 169357
Project: 169357
Buggy source:
/** 
 * Set the value this model represents.
 * @param value
 */
public void setValue(T value);

Fixed version (ground truth):
/** 
 * Set the value this model represents.
 * @param value
 */
void setValue(T value);
Program: 169358
Project: 169358
Buggy source:
/** 
 * Getters and setters which represent a gregorian date.
 * @return
 */
public void setDay(int day);

Fixed version (ground truth):
/** 
 * Getters and setters which represent a gregorian date.
 * @return
 */
void setDay(int day);
Program: 169359
Project: 169359
Buggy source:
/** 
 * Is the value selected or is it not.
 * @return
 */
public boolean isSelected();

Fixed version (ground truth):
/** 
 * Is the value selected or is it not.
 * @return
 */
boolean isSelected();
Program: 169360
Project: 169360
Buggy source:
/** 
 * Getters and setters which represent a gregorian date.
 * @return
 */
public void setDate(int year,int month,int day);

Fixed version (ground truth):
/** 
 * Getters and setters which represent a gregorian date.
 * @return
 */
void setDate(int year,int month,int day);
Program: 169361
Project: 169361
Buggy source:
/** 
 * Getters and setters which represent a gregorian date.
 * @return
 */
public int getMonth();

Fixed version (ground truth):
/** 
 * Getters and setters which represent a gregorian date.
 * @return
 */
int getMonth();
Program: 169362
Project: 169362
Buggy source:
/** 
 * Adds a PropertyChangeListener to the list of bean listeners. The listener is registered for all bound properties of the target bean.
 * @param listener      the PropertyChangeListener to be added
 * @see #removePropertyChangeListener(PropertyChangeListener)
 */
public void addPropertyChangeListener(PropertyChangeListener listener);

Fixed version (ground truth):
/** 
 * Adds a PropertyChangeListener to the list of bean listeners. The listener is registered for all bound properties of the target bean.
 * @param listener      the PropertyChangeListener to be added
 * @see #removePropertyChangeListener(PropertyChangeListener)
 */
void addPropertyChangeListener(PropertyChangeListener listener);
Program: 169363
Project: 169363
Buggy source:
/** 
 * Returns the value of the currently represented date in the component. Depending on the version of the library used this type will one of the following: - java.util.Calendar - org.joda.time.DateMidnight - java.util.Date
 * @return
 */
public CalendarModel<?> getModel();

Fixed version (ground truth):
/** 
 * Returns the value of the currently represented date in the component. Depending on the version of the library used this type will one of the following: - java.util.Calendar - org.joda.time.DateMidnight - java.util.Date
 * @return
 */
CalendarModel<?> getModel();
Program: 169364
Project: 169364
Buggy source:
/** 
 * Removes the ActionListener. The actionListener is notified when a user clicks on a date.
 * @param arg
 */
public void removeActionListener(ActionListener actionListener);

Fixed version (ground truth):
/** 
 * Removes the ActionListener. The actionListener is notified when a user clicks on a date.
 * @param actionListener
 */
void removeActionListener(ActionListener actionListener);
Program: 169365
Project: 169365
Buggy source:
/** 
 * Adds an ActionListener. The actionListener is notified when a user clicks on a date. Deliberately selecting a date will trigger this event, not scrolling which fires a ChangeEvent for ChangeListeners.
 * @param actionListener
 */
public void addActionListener(ActionListener actionListener);

Fixed version (ground truth):
/** 
 * Adds an ActionListener. The actionListener is notified when a user clicks on a date. Deliberately selecting a date will trigger this event, not scrolling which fires a ChangeEvent for ChangeListeners.
 * @param actionListener
 */
void addActionListener(ActionListener actionListener);
Program: 169366
Project: 169366
Buggy source:
/** 
 * This changes the behaviour of the control to require a double click on actionable clicks. If this is set the ActionEvent will only be thrown when double clicked on a date. Defaults to false.
 * @param doubleClickAction
 */
public abstract void setDoubleClickAction(boolean doubleClickAction);

Fixed version (ground truth):
/** 
 * This changes the behaviour of the control to require a double click on actionable clicks. If this is set the ActionEvent will only be thrown when double clicked on a date. Defaults to false.
 * @param doubleClickAction
 */
void setDoubleClickAction(boolean doubleClickAction);
Program: 169367
Project: 169367
Buggy source:
/** 
 * Is the year navigation buttons active.
 * @return visiblity of the year
 */
public abstract boolean isShowYearButtons();

Fixed version (ground truth):
/** 
 * Is the year navigation buttons active.
 * @return visiblity of the year
 */
boolean isShowYearButtons();
Program: 169368
Project: 169368
Buggy source:
/** 
 * Is a double click required to throw a ActionEvent.
 * @return
 */
public abstract boolean isDoubleClickAction();

Fixed version (ground truth):
/** 
 * Is a double click required to throw a ActionEvent.
 * @return
 */
boolean isDoubleClickAction();
Program: 169369
Project: 169369
Buggy source:
/** 
 * Sets the visibilty of the Year navigation buttons. Defaults to false.
 * @param showYearButtons
 */
public abstract void setShowYearButtons(boolean showYearButtons);

Fixed version (ground truth):
/** 
 * Sets the visibilty of the Year navigation buttons. Defaults to false.
 * @param showYearButtons
 */
void setShowYearButtons(boolean showYearButtons);
Program: 169370
Project: 169370
Buggy source:
/** 
 * Is the text component editable or not. Defaults to false.
 * @param editable
 */
public abstract void setTextEditable(boolean editable);

Fixed version (ground truth):
/** 
 * Is the text component editable or not. Defaults to false.
 * @param editable
 */
void setTextEditable(boolean editable);
Program: 169371
Project: 169371
Buggy source:
/** 
 * Sets the image on the button.
 * @param icon the icon to use
 */
public abstract void setButtonIcon(Icon icon);

Fixed version (ground truth):
/** 
 * Sets the image on the button.
 * @param icon the icon to use
 */
void setButtonIcon(Icon icon);
Program: 169372
Project: 169372
Buggy source:
/** 
 * Is the button focusable.
 * @return
 */
public abstract boolean getButtonFocusable();

Fixed version (ground truth):
/** 
 * Is the button focusable.
 * @return
 */
boolean getButtonFocusable();
Program: 169373
Project: 169373
Buggy source:
/** 
 * Returns the size of the underlying textfield
 * @return Columns
 */
public abstract int getTextfieldColumns();

Fixed version (ground truth):
/** 
 * Returns the size of the underlying textfield
 * @return Columns
 */
int getTextfieldColumns();
Program: 169374
Project: 169374
Buggy source:
/** 
 * Sets the size of the underlying textfield in columns
 * @param columns {@link JTextField#setColumns(int)}
 */
public abstract void setTextfieldColumns(int columns);

Fixed version (ground truth):
/** 
 * Sets the size of the underlying textfield in columns
 * @param columns {@link JTextField#setColumns(int)}
 */
void setTextfieldColumns(int columns);
Program: 169375
Project: 169375
Buggy source:
/** 
 * Sets the button to be focusable. Defaults to true.
 * @param focusable
 */
public abstract void setButtonFocusable(boolean focusable);

Fixed version (ground truth):
/** 
 * Sets the button to be focusable. Defaults to true.
 * @param focusable
 */
void setButtonFocusable(boolean focusable);
Program: 169376
Project: 169376
Buggy source:
/** 
 * The icon on the button.
 * @return Icon on Button
 */
public abstract Icon getButtonIcon();

Fixed version (ground truth):
/** 
 * The icon on the button.
 * @return Icon on Button
 */
Icon getButtonIcon();
Program: 169377
Project: 169377
Buggy source:
/** 
 * Is the text component editable or not.
 * @return
 */
public abstract boolean isTextEditable();

Fixed version (ground truth):
/** 
 * Is the text component editable or not.
 * @return
 */
boolean isTextEditable();
Program: 169378
Project: 169378
Buggy source:
@Override public boolean equals(Object obj){
  if (this == obj)   return true;
  if (obj == null)   return false;
  if (getClass() != obj.getClass())   return false;
  RangeConstraint other=(RangeConstraint)obj;
  if (after == null) {
    if (other.after != null)     return false;
  }
 else   if (!after.equals(other.after))   return false;
  if (before == null) {
    if (other.before != null)     return false;
  }
 else   if (!before.equals(other.before))   return false;
  return true;
}

Fixed version (ground truth):
@Override public boolean equals(Object obj){
  if (this == obj) {
    return true;
  }
  if (obj == null) {
    return false;
  }
  if (getClass() != obj.getClass()) {
    return false;
  }
  RangeConstraint other=(RangeConstraint)obj;
  if (after == null) {
    if (other.after != null) {
      return false;
    }
  }
 else   if (!after.equals(other.after)) {
    return false;
  }
  if (before == null) {
    if (other.before != null) {
      return false;
    }
  }
 else   if (!before.equals(other.before)) {
    return false;
  }
  return true;
}
Program: 169379
Project: 169379
Buggy source:
public void propertyChange(PropertyChangeEvent evt){
  if (formattedTextField.isEditable() && formattedTextField.getValue() != null) {
    Calendar value=(Calendar)formattedTextField.getValue();
    DateModel model=new UtilCalendarModel(value);
    if (!datePanel.checkConstraints(model)) {
      formattedTextField.setValue(evt.getOldValue());
      return;
    }
    datePanel.getModel().setDate(value.get(Calendar.YEAR),value.get(Calendar.MONTH),value.get(Calendar.DATE));
    datePanel.getModel().setSelected(true);
  }
}

Fixed version (ground truth):
public void propertyChange(PropertyChangeEvent evt){
  if (formattedTextField.isEditable() && formattedTextField.getValue() != null) {
    Calendar value=(Calendar)formattedTextField.getValue();
    DateModel model=new UtilCalendarModel(value);
    if (!datePanel.checkConstraints(model)) {
      formattedTextField.setValue(evt.getOldValue());
      return;
    }
    datePanel.getModel().setDate(value.get(Calendar.YEAR),value.get(Calendar.MONTH),value.get(Calendar.DATE));
    datePanel.getModel().setSelected(true);
  }
  if (formattedTextField.isEditable() && evt.getNewValue() == null && ignoreFurtherPropertyEvents.compareAndSet(false,true)) {
    getModel().setValue(null);
    SwingUtilities.invokeLater(new Runnable(){
      public void run(){
        ignoreFurtherPropertyEvents.set(false);
      }
    }
);
  }
}
Program: 169380
Project: 169380
Buggy source:
@Override public void setButtonIcon(Icon icon){
  button.setIcon(icon);
  if (icon == null) {
    button.setText("String_Node_Str");
  }
 else {
    button.setText("String_Node_Str");
  }
}

Fixed version (ground truth):
public void setButtonIcon(Icon icon){
  button.setIcon(icon);
  if (icon == null) {
    button.setText("String_Node_Str");
  }
 else {
    button.setText("String_Node_Str");
  }
}
Program: 169381
Project: 169381
Buggy source:
@Override public Icon getButtonIcon(){
  return button.getIcon();
}

Fixed version (ground truth):
public Icon getButtonIcon(){
  return button.getIcon();
}
Program: 169382
Project: 169382
Buggy source:
/** 
 * Part of TableModel, day
 */
public Object getValueAt(int arg0,int arg1){
  Calendar firstDayOfMonth=Calendar.getInstance();
  firstDayOfMonth.set(model.getYear(),model.getMonth(),1);
  int DOW=firstDayOfMonth.get(Calendar.DAY_OF_WEEK);
  int value=arg1 - DOW + arg0 * 7 + 1 + firstDayOfWeek;
  return new Integer(value);
}

Fixed version (ground truth):
/** 
 * Part of TableModel, day
 */
public Object getValueAt(int arg0,int arg1){
  Calendar firstDayOfMonth=Calendar.getInstance();
  firstDayOfMonth.set(model.getYear(),model.getMonth(),1);
  int DOW=firstDayOfMonth.get(Calendar.DAY_OF_WEEK);
  int value=arg1 - DOW + arg0 * 7 + 1 + (firstDayOfWeek % 7);
  return new Integer(value);
}
Program: 169383
Project: 169383
Buggy source:
/** 
 * Getters and setters which represent a gregorian date.
 * @return
 */
void setMonth(int month);

Fixed version (ground truth):
/** 
 * Getters and setters which represent a gregorian date.
 * @param month month
 */
void setMonth(int month);
Program: 169384
Project: 169384
Buggy source:
/** 
 * Set the value as selected.
 * @param selected
 */
void setSelected(boolean selected);

Fixed version (ground truth):
/** 
 * Set the value as selected.
 * @param selected select this value?
 */
void setSelected(boolean selected);
Program: 169385
Project: 169385
Buggy source:
/** 
 * Add or substract number of months.
 * @param add
 */
void addMonth(int add);

Fixed version (ground truth):
/** 
 * Add or substract number of months.
 * @param add months
 */
void addMonth(int add);
Program: 169386
Project: 169386
Buggy source:
/** 
 * Removes a PropertyChangeListener from the list of bean listeners. This method should be used to remove PropertyChangeListeners that were registered for all bound properties of the target bean.
 * @param listener      the PropertyChangeListener to be removed
 * @see #addPropertyChangeListener(PropertyChangeListener)
 */
void removePropertyChangeListener(PropertyChangeListener listener);

Fixed version (ground truth):
/** 
 * Removes a PropertyChangeListener from the list of bean listeners. This method should be used to remove PropertyChangeListeners that were registered for all bound properties of the target bean.
 * @param listener The PropertyChangeListener to be removed
 * @see #addPropertyChangeListener(PropertyChangeListener)
 */
void removePropertyChangeListener(PropertyChangeListener listener);
Program: 169387
Project: 169387
Buggy source:
/** 
 * Getters and setters which represent a gregorian date.
 * @return
 */
void setYear(int year);

Fixed version (ground truth):
/** 
 * Getters and setters which represent a gregorian date.
 * @param year year
 */
void setYear(int year);
Program: 169388
Project: 169388
Buggy source:
/** 
 * Adds a ChangeListener. ChangeListeners will be notified when the internal state of the control changes. This means that as a user scrolls through dates the internal model changes, which fires a ChangeEvent each time it changes.
 * @param changeListener
 */
void addChangeListener(ChangeListener changeListener);

Fixed version (ground truth):
/** 
 * Adds a ChangeListener. ChangeListeners will be notified when the internal state of the control changes. This means that as a user scrolls through dates the internal model changes, which fires a ChangeEvent each time it changes.
 * @param changeListener The changelistener to add.
 */
void addChangeListener(ChangeListener changeListener);
Program: 169389
Project: 169389
Buggy source:
/** 
 * Getters and setters which represent a gregorian date.
 * @return
 */
int getDay();

Fixed version (ground truth):
/** 
 * Getters and setters which represent a gregorian date.
 * @return day
 */
int getDay();
Program: 169390
Project: 169390
Buggy source:
/** 
 * Add or substract number of day.
 * @param add
 */
void addDay(int add);

Fixed version (ground truth):
/** 
 * Add or substract number of day.
 * @param add days
 */
void addDay(int add);
Program: 169391
Project: 169391
Buggy source:
/** 
 * Get the value this model represents.
 * @return
 */
T getValue();

Fixed version (ground truth):
/** 
 * Get the value this model represents.
 * @return current value
 */
T getValue();
Program: 169392
Project: 169392
Buggy source:
/** 
 * Removes the specified ChangeListener. ChangeListeners will be notified when the selected date is changed.
 * @param changeListener
 */
void removeChangeListener(ChangeListener changeListener);

Fixed version (ground truth):
/** 
 * Removes the specified ChangeListener. ChangeListeners will be notified when the selected date is changed.
 * @param changeListener The changelistener to remove.
 */
void removeChangeListener(ChangeListener changeListener);
Program: 169393
Project: 169393
Buggy source:
/** 
 * Add or substract number of years.
 * @param add
 */
void addYear(int add);

Fixed version (ground truth):
/** 
 * Add or substract number of years.
 * @param add years
 */
void addYear(int add);
Program: 169394
Project: 169394
Buggy source:
/** 
 * Getters and setters which represent a gregorian date.
 * @return
 */
int getYear();

Fixed version (ground truth):
/** 
 * Getters and setters which represent a gregorian date.
 * @return year
 */
int getYear();
Program: 169395
Project: 169395
Buggy source:
/** 
 * Set the value this model represents.
 * @param value
 */
void setValue(T value);

Fixed version (ground truth):
/** 
 * Set the value this model represents.
 * @param value new value
 */
void setValue(T value);
Program: 169396
Project: 169396
Buggy source:
/** 
 * Getters and setters which represent a gregorian date.
 * @return
 */
void setDay(int day);

Fixed version (ground truth):
/** 
 * Getters and setters which represent a gregorian date.
 * @param day day
 */
void setDay(int day);
Program: 169397
Project: 169397
Buggy source:
/** 
 * Is the value selected or is it not.
 * @return
 */
boolean isSelected();

Fixed version (ground truth):
/** 
 * @return Is the value selected or is it not.
 */
boolean isSelected();
Program: 169398
Project: 169398
Buggy source:
/** 
 * Getters and setters which represent a gregorian date.
 * @return
 */
void setDate(int year,int month,int day);

Fixed version (ground truth):
/** 
 * Getters and setters which represent a gregorian date.
 * @param year year
 * @param month month
 * @param day day
 */
void setDate(int year,int month,int day);
Program: 169399
Project: 169399
Buggy source:
/** 
 * Getters and setters which represent a gregorian date.
 * @return
 */
int getMonth();

Fixed version (ground truth):
/** 
 * Getters and setters which represent a gregorian date.
 * @return month
 */
int getMonth();
Program: 169400
Project: 169400
Buggy source:
/** 
 * Adds a PropertyChangeListener to the list of bean listeners. The listener is registered for all bound properties of the target bean.
 * @param listener      the PropertyChangeListener to be added
 * @see #removePropertyChangeListener(PropertyChangeListener)
 */
void addPropertyChangeListener(PropertyChangeListener listener);

Fixed version (ground truth):
/** 
 * Adds a PropertyChangeListener to the list of bean listeners. The listener is registered for all bound properties of the target bean.
 * @param listener The PropertyChangeListener to be added
 * @see #removePropertyChangeListener(PropertyChangeListener)
 */
void addPropertyChangeListener(PropertyChangeListener listener);
Program: 169401
Project: 169401
Buggy source:
/** 
 * Returns the value of the currently represented date in the component. Depending on the version of the library used this type will one of the following: - java.util.Calendar - org.joda.time.DateMidnight - java.util.Date
 * @return
 */
DateModel<?> getModel();

Fixed version (ground truth):
/** 
 * Returns the value of the currently represented date in the component. Depending on the version of the library used this type will one of the following: - java.util.Calendar - org.joda.time.DateMidnight - java.util.Date
 * @return A new Model
 */
DateModel<?> getModel();
Program: 169402
Project: 169402
Buggy source:
/** 
 * Removes the ActionListener. The actionListener is notified when a user clicks on a date.
 * @param actionListener
 */
void removeActionListener(ActionListener actionListener);

Fixed version (ground truth):
/** 
 * Removes the ActionListener. The actionListener is notified when a user clicks on a date.
 * @param actionListener The listener to remove
 */
void removeActionListener(ActionListener actionListener);
Program: 169403
Project: 169403
Buggy source:
/** 
 * Adds an ActionListener. The actionListener is notified when a user clicks on a date. Deliberately selecting a date will trigger this event, not scrolling which fires a ChangeEvent for ChangeListeners.
 * @param actionListener
 */
void addActionListener(ActionListener actionListener);

Fixed version (ground truth):
/** 
 * Adds an ActionListener. The actionListener is notified when a user clicks on a date. Deliberately selecting a date will trigger this event, not scrolling which fires a ChangeEvent for ChangeListeners.
 * @param actionListener The listener to add
 */
void addActionListener(ActionListener actionListener);
Program: 169404
Project: 169404
Buggy source:
/** 
 * Adds an constraint on selectable dates.
 * @param constraint the constraint to check on selection
 */
void addDateSelectionConstraint(DateSelectionConstraint constraint);

Fixed version (ground truth):
/** 
 * Adds an constraint on selectable dates.
 * @param constraint the constraint to add
 */
void addDateSelectionConstraint(DateSelectionConstraint constraint);
Program: 169405
Project: 169405
Buggy source:
/** 
 * Removes an constraint on selectable dates.
 * @param constraint the constraint to check on selection
 */
void removeDateSelectionConstraint(DateSelectionConstraint constraint);

Fixed version (ground truth):
/** 
 * Removes an constraint on selectable dates.
 * @param constraint the constraint to remove
 */
void removeDateSelectionConstraint(DateSelectionConstraint constraint);
Program: 169406
Project: 169406
Buggy source:
/** 
 * Create by specifying the initial value of the widget.
 * @param value
 * @return
 */
public JDatePanel createJDatePanel(T value){
  if (value == null) {
    throw new IllegalArgumentException("String_Node_Str");
  }
  DateModel<T> model=createModel(value);
  return new JDatePanelImpl(model);
}

Fixed version (ground truth):
/** 
 * Create by specifying the initial value of the widget.
 * @param value value
 * @return A new Datepanel
 */
public JDatePanel createJDatePanel(T value){
  if (value == null) {
    throw new IllegalArgumentException("String_Node_Str");
  }
  DateModel<T> model=createModel(value);
  return new JDatePanelImpl(model);
}
Program: 169407
Project: 169407
Buggy source:
/** 
 * Create by specifying the initial value of the widget.
 * @param value
 * @return
 */
public JDatePicker createJDatePicker(T value){
  if (value == null) {
    throw new IllegalArgumentException("String_Node_Str");
  }
  DateModel<T> model=createModel(value);
  return new JDatePickerImpl(new JDatePanelImpl(model));
}

Fixed version (ground truth):
/** 
 * Create by specifying the initial value of the widget.
 * @param value value
 * @return A new Datepicker
 */
public JDatePicker createJDatePicker(T value){
  if (value == null) {
    throw new IllegalArgumentException("String_Node_Str");
  }
  DateModel<T> model=createModel(value);
  return new JDatePickerImpl(new JDatePanelImpl(model));
}
Program: 169408
Project: 169408
Buggy source:
/** 
 * Create a DateModel based on the type of the value.
 * @param value
 * @return
 */
public abstract DateModel<T> createModel(T value);

Fixed version (ground truth):
/** 
 * Create a DateModel based on the type of the value.
 * @param value value
 * @return A new model
 */
public abstract DateModel<T> createModel(T value);
Program: 169409
Project: 169409
Buggy source:
/** 
 * This changes the behaviour of the control to require a double click on actionable clicks. If this is set the ActionEvent will only be thrown when double clicked on a date. Defaults to false.
 * @param doubleClickAction
 */
void setDoubleClickAction(boolean doubleClickAction);

Fixed version (ground truth):
/** 
 * This changes the behaviour of the control to require a double click on actionable clicks. If this is set the ActionEvent will only be fired when double clicked on a date. Defaults to false.
 * @param doubleClickAction use double clicks?
 */
void setDoubleClickAction(boolean doubleClickAction);
Program: 169410
Project: 169410
Buggy source:
/** 
 * Is a double click required to throw a ActionEvent.
 * @return
 */
boolean isDoubleClickAction();

Fixed version (ground truth):
/** 
 * @return Is a double click required to fire a ActionEvent.
 */
boolean isDoubleClickAction();
Program: 169411
Project: 169411
Buggy source:
/** 
 * Sets the visibilty of the Year navigation buttons. Defaults to false.
 * @param showYearButtons
 */
void setShowYearButtons(boolean showYearButtons);

Fixed version (ground truth):
/** 
 * Sets the visibilty of the Year navigation buttons. Defaults to false.
 * @param showYearButtons show the button?
 */
void setShowYearButtons(boolean showYearButtons);
Program: 169412
Project: 169412
Buggy source:
/** 
 * Is the text component editable or not. Defaults to false.
 * @param editable
 */
void setTextEditable(boolean editable);

Fixed version (ground truth):
/** 
 * Is the text component editable or not. Defaults to false.
 * @param editable should the textfield be editable?
 */
void setTextEditable(boolean editable);
Program: 169413
Project: 169413
Buggy source:
/** 
 * Is the button focusable.
 * @return
 */
boolean getButtonFocusable();

Fixed version (ground truth):
/** 
 * @return Is the button focusable?
 */
boolean getButtonFocusable();
Program: 169414
Project: 169414
Buggy source:
/** 
 * Returns the size of the underlying textfield
 * @return Columns
 */
int getTextfieldColumns();

Fixed version (ground truth):
/** 
 * @return Columns the size of the underlying textfield
 */
int getTextfieldColumns();
Program: 169415
Project: 169415
Buggy source:
/** 
 * Sets the button to be focusable. Defaults to true.
 * @param focusable
 */
void setButtonFocusable(boolean focusable);

Fixed version (ground truth):
/** 
 * Sets the button to be focusable. Defaults to true.
 * @param focusable should the button be focusable?
 */
void setButtonFocusable(boolean focusable);
Program: 169416
Project: 169416
Buggy source:
/** 
 * Is the text component editable or not.
 * @return
 */
boolean isTextEditable();

Fixed version (ground truth):
/** 
 * @return Is the text component editable?
 */
boolean isTextEditable();
Program: 169417
Project: 169417
Buggy source:
boolean isValidSelection(DateModel<?> model);

Fixed version (ground truth):
/** 
 * Check the models value to be a valid, selectable date.
 * @param model The model to check
 * @return <code>true</code> if the models value is valid, else returns<code>false</code>
 */
boolean isValidSelection(DateModel<?> model);
Program: 169418
Project: 169418
Buggy source:
/** 
 * This method initializes dayTable	
 * @return javax.swing.JTable	
 */
private javax.swing.JTable getDayTable(){
  if (dayTable == null) {
    dayTable=new javax.swing.JTable();
    dayTable.setAutoResizeMode(javax.swing.JTable.AUTO_RESIZE_ALL_COLUMNS);
    dayTable.setPreferredSize(new java.awt.Dimension(100,80));
    dayTable.setModel(getCalenderModel());
    dayTable.setShowGrid(true);
    dayTable.setGridColor(Color.WHITE);
    dayTable.setSelectionMode(ListSelectionModel.SINGLE_SELECTION);
    dayTable.setCellSelectionEnabled(true);
    dayTable.setRowSelectionAllowed(true);
    dayTable.setFocusable(false);
    dayTable.addMouseListener(getEventHandler());
    TableColumn column=null;
    for (int i=0; i < 7; i++) {
      column=dayTable.getColumnModel().getColumn(i);
      column.setPreferredWidth(15);
      column.setCellRenderer(getDayTableCellRenderer());
    }
  }
  return dayTable;
}

Fixed version (ground truth):
/** 
 * This method initializes dayTable	
 * @return javax.swing.JTable	
 */
private javax.swing.JTable getDayTable(){
  if (dayTable == null) {
    dayTable=new javax.swing.JTable();
    dayTable.setAutoResizeMode(javax.swing.JTable.AUTO_RESIZE_ALL_COLUMNS);
    dayTable.setRowHeight(18);
    dayTable.setPreferredSize(new java.awt.Dimension(100,80));
    dayTable.setModel(getCalenderModel());
    dayTable.setShowGrid(true);
    dayTable.setGridColor(Color.WHITE);
    dayTable.setSelectionMode(ListSelectionModel.SINGLE_SELECTION);
    dayTable.setCellSelectionEnabled(true);
    dayTable.setRowSelectionAllowed(true);
    dayTable.setFocusable(false);
    dayTable.addMouseListener(getEventHandler());
    TableColumn column=null;
    for (int i=0; i < 7; i++) {
      column=dayTable.getColumnModel().getColumn(i);
      column.setPreferredWidth(15);
      column.setCellRenderer(getDayTableCellRenderer());
    }
  }
  return dayTable;
}
Program: 169419
Project: 169419
Buggy source:
/** 
 * This method initializes this
 * @return void
 */
private void initialize(){
  this.setLayout(new java.awt.BorderLayout());
  this.setSize(200,160);
  this.setPreferredSize(new java.awt.Dimension(200,160));
  this.setBackground(java.awt.SystemColor.activeCaptionText);
  this.setBorder(javax.swing.BorderFactory.createLineBorder(java.awt.Color.black,1));
  this.setOpaque(false);
  this.add(getNorthPanel(),java.awt.BorderLayout.NORTH);
  this.add(getSouthPanel(),java.awt.BorderLayout.SOUTH);
  this.add(getCenterPanel(),java.awt.BorderLayout.CENTER);
}

Fixed version (ground truth):
/** 
 * This method initializes this
 * @return void
 */
private void initialize(){
  this.setLayout(new java.awt.BorderLayout());
  this.setSize(200,220);
  this.setPreferredSize(new java.awt.Dimension(200,220));
  this.setBackground(java.awt.SystemColor.activeCaptionText);
  this.setBorder(javax.swing.BorderFactory.createLineBorder(java.awt.Color.black,1));
  this.setOpaque(false);
  this.add(getNorthPanel(),java.awt.BorderLayout.NORTH);
  this.add(getSouthPanel(),java.awt.BorderLayout.SOUTH);
  this.add(getCenterPanel(),java.awt.BorderLayout.CENTER);
}
Program: 169420
Project: 169420
Buggy source:
public static boolean canInterfaceWith(TileEntity tile,ForgeDirection direction,PneumaticTube requester,boolean canInterfaceWithIInventory){
  PneumaticTube tube=tile != null ? MultipartCompatibility.getPart(tile.getWorldObj(),tile.xCoord,tile.yCoord,tile.zCoord,PneumaticTube.class) : null;
  if (tube != null && tube.isConnected(direction,requester))   return true;
  if (!canInterfaceWithIInventory)   return false;
  if (tile instanceof IInventory) {
    return !(tile instanceof ISidedInventory) || ((ISidedInventory)tile).getAccessibleSlotsFromSide(direction.ordinal()).length > 0;
  }
  return false;
}

Fixed version (ground truth):
public static boolean canInterfaceWith(TileEntity tile,ForgeDirection direction,PneumaticTube requester,boolean canInterfaceWithIInventory){
  PneumaticTube tube=tile != null ? MultipartCompatibility.getPart(tile.getWorldObj(),tile.xCoord,tile.yCoord,tile.zCoord,PneumaticTube.class) : null;
  if (tube != null && tube.isConnected(direction,requester))   return true;
  if (!canInterfaceWithIInventory)   return false;
  if (tile instanceof ITubeConnection) {
    return true;
  }
  if (tile instanceof IInventory) {
    return !(tile instanceof ISidedInventory) || ((ISidedInventory)tile).getAccessibleSlotsFromSide(direction.ordinal()).length > 0;
  }
  return false;
}
Program: 169421
Project: 169421
Buggy source:
@Override public void handleClientSide(EntityPlayer player){
  TubeStack.tickTimeMultiplier=Math.min(1,50D / (tickTime - 5));
}

Fixed version (ground truth):
@Override public void handleClientSide(EntityPlayer player){
  TubeStack.tickTimeMultiplier=Math.min(1,50D / Math.max(tickTime - 5,0.01));
}
Program: 169422
Project: 169422
Buggy source:
private void ejectItems(){
  for (Iterator<TubeStack> iterator=internalItemStackBuffer.iterator(); iterator.hasNext(); ) {
    TubeStack tubeStack=iterator.next();
    if (IOHelper.canInterfaceWith(getTileCache(getOutputDirection()),getFacingDirection())) {
      ItemStack returnedStack=IOHelper.insert(getTileCache(getOutputDirection()),tubeStack.stack,getFacingDirection(),tubeStack.color,false);
      if (returnedStack == null) {
        iterator.remove();
        markDirty();
        if (!ejectionScheduled)         break;
      }
 else       if (returnedStack.stackSize != tubeStack.stack.stackSize) {
        markDirty();
        if (!ejectionScheduled)         break;
      }
 else {
        break;
      }
    }
 else     if (spawnItemsInWorld) {
      ForgeDirection direction=getFacingDirection().getOpposite();
      if (worldObj.getBlock(xCoord + direction.offsetX,yCoord + direction.offsetY,zCoord + direction.offsetZ).getBlocksMovement(worldObj,xCoord + direction.offsetX,yCoord + direction.offsetY,zCoord + direction.offsetZ)) {
        ejectItemInWorld(tubeStack.stack,direction);
        iterator.remove();
        markDirty();
      }
 else {
        break;
      }
    }
  }
}

Fixed version (ground truth):
private void ejectItems(){
  for (Iterator<TubeStack> iterator=internalItemStackBuffer.iterator(); iterator.hasNext(); ) {
    TubeStack tubeStack=iterator.next();
    if (IOHelper.canInterfaceWith(getTileCache(getOutputDirection()),getFacingDirection())) {
      ItemStack returnedStack=IOHelper.insert(getTileCache(getOutputDirection()),tubeStack.stack,getFacingDirection(),tubeStack.color,false);
      if (returnedStack == null) {
        iterator.remove();
        markDirty();
        if (!ejectionScheduled)         break;
      }
 else       if (returnedStack.stackSize != tubeStack.stack.stackSize) {
        markDirty();
        if (!ejectionScheduled)         break;
      }
 else {
        break;
      }
    }
 else     if (spawnItemsInWorld) {
      ForgeDirection direction=getFacingDirection().getOpposite();
      if ((worldObj.getBlock(xCoord + direction.offsetX,yCoord + direction.offsetY,zCoord + direction.offsetZ).getBlocksMovement(worldObj,xCoord + direction.offsetX,yCoord + direction.offsetY,zCoord + direction.offsetZ)) || (worldObj.getBlock(xCoord + direction.offsetX,yCoord + direction.offsetY,zCoord + direction.offsetZ) instanceof BlockLiquid) || (worldObj.getBlock(xCoord + direction.offsetX,yCoord + direction.offsetY,zCoord + direction.offsetZ) instanceof IFluidBlock)) {
        ejectItemInWorld(tubeStack.stack,direction);
        iterator.remove();
        markDirty();
      }
 else {
        break;
      }
    }
  }
}
Program: 169423
Project: 169423
Buggy source:
private void updateCraftingGrid(){
  craftResult.setInventorySlotContents(0,CraftingManager.getInstance().findMatchingRecipe(getCraftingGrid(),getWorldObj()));
}

Fixed version (ground truth):
protected void updateCraftingGrid(){
  craftResult.setInventorySlotContents(0,CraftingManager.getInstance().findMatchingRecipe(getCraftingGrid(),getWorldObj()));
}
Program: 169424
Project: 169424
Buggy source:
private void craft(){
  for (int i=0; i < craftingGrid.length; ++i) {
    ItemStack itemstack1=craftingGrid[i];
    if (itemstack1 != null) {
      boolean pulledFromInventory=false;
      if (craftingGrid[i].stackSize == 1) {
        ItemStack stackFromTable=ContainerProjectTable.extractStackFromTable(this,craftingGrid[i],false);
        pulledFromInventory=stackFromTable != null;
      }
      if (!pulledFromInventory) {
        craftingGrid[i].stackSize--;
        if (craftingGrid[i].stackSize <= 0)         craftingGrid[i]=null;
      }
      if (itemstack1.getItem().hasContainerItem(itemstack1)) {
        ItemStack itemstack2=itemstack1.getItem().getContainerItem(itemstack1);
        if (itemstack2 != null && itemstack2.isItemStackDamageable() && itemstack2.getItemDamage() > itemstack2.getMaxDamage()) {
          continue;
        }
        if (!itemstack1.getItem().doesContainerItemLeaveCraftingGrid(itemstack1)) {
          ItemStack remainder=IOHelper.insert(this,itemstack2,0,false);
          if (remainder != null) {
            worldObj.spawnEntityInWorld(new EntityItem(worldObj,xCoord,yCoord,zCoord,remainder));
          }
        }
      }
    }
  }
}

Fixed version (ground truth):
protected void craft(){
  for (int i=0; i < craftingGrid.length; ++i) {
    ItemStack itemstack1=craftingGrid[i];
    if (itemstack1 != null) {
      boolean pulledFromInventory=false;
      if (craftingGrid[i].stackSize == 1) {
        ItemStack stackFromTable=ContainerProjectTable.extractStackFromTable(this,craftingGrid[i],false);
        pulledFromInventory=stackFromTable != null;
      }
      if (!pulledFromInventory) {
        craftingGrid[i].stackSize--;
        if (craftingGrid[i].stackSize <= 0)         craftingGrid[i]=null;
      }
      if (itemstack1.getItem().hasContainerItem(itemstack1)) {
        ItemStack itemstack2=itemstack1.getItem().getContainerItem(itemstack1);
        if (itemstack2 != null && itemstack2.isItemStackDamageable() && itemstack2.getItemDamage() > itemstack2.getMaxDamage()) {
          continue;
        }
        if (!itemstack1.getItem().doesContainerItemLeaveCraftingGrid(itemstack1)) {
          ItemStack remainder=IOHelper.insert(this,itemstack2,0,false);
          if (remainder != null) {
            worldObj.spawnEntityInWorld(new EntityItem(worldObj,xCoord,yCoord,zCoord,remainder));
          }
        }
      }
    }
  }
}
Program: 169425
Project: 169425
Buggy source:
@Override public ItemStack getStackInSlot(int i){
  return i < inventory.length ? inventory[i] : craftResult.getStackInSlot(0);
}

Fixed version (ground truth):
@Override public ItemStack getStackInSlot(int i){
  return inventory[i];
}
Program: 169426
Project: 169426
Buggy source:
@Override public void setInventorySlotContents(int i,ItemStack itemStack){
  if (i < inventory.length) {
    inventory[i]=itemStack;
  }
 else {
    craftResult.setInventorySlotContents(0,itemStack);
    craft();
  }
  updateCraftingGrid();
}

Fixed version (ground truth):
@Override public void setInventorySlotContents(int i,ItemStack itemStack){
  inventory[i]=itemStack;
}
Program: 169427
Project: 169427
Buggy source:
@Override public boolean canExtractItem(int slot,ItemStack extractedStack,int side){
  if (slot == 18) {
    if (extractedStack != null && getStackInSlot(18) != null && getStackInSlot(18).stackSize != extractedStack.stackSize)     return false;
    Map<ItemStack,Integer> recipeItems=new HashMap<ItemStack,Integer>();
    for (    ItemStack stack : craftingGrid) {
      if (stack != null) {
        addItem(recipeItems,stack);
      }
    }
    for (    Map.Entry<ItemStack,Integer> entry : recipeItems.entrySet()) {
      ItemStack stack=entry.getKey().copy();
      stack.stackSize=entry.getValue();
      ItemStack extracted=IOHelper.extract(this,ForgeDirection.UNKNOWN,stack,true,true);
      if (extracted == null)       return false;
    }
    return true;
  }
 else {
    return side > 5;
  }
}

Fixed version (ground truth):
@Override public boolean canExtractItem(int slot,ItemStack extractedStack,int side){
  if (slot == 18) {
    return true;
  }
 else {
    return side > 5;
  }
}
Program: 169428
Project: 169428
Buggy source:
@Override public void tick(){
}

Fixed version (ground truth):
@Override public void tick(){
  if (getWorld().isRemote)   return;
  if ((power != right().getInput() || left().getInput()) && !power) {
    state=!state;
    playTickSound();
  }
  power=right().getInput() || left().getInput();
  front().setOutput(state);
  back().setOutput(!state);
  t1.setState(!state);
  t2.setState(state);
  l.setState(state);
}
Program: 169429
Project: 169429
Buggy source:
@Override public void doLogic(){
  if ((power != right().getInput() || left().getInput()) && !power) {
    state=!state;
    playTickSound();
  }
  power=right().getInput() || left().getInput();
  front().setOutput(state);
  back().setOutput(!state);
  t1.setState(!state);
  t2.setState(state);
  l.setState(state);
}

Fixed version (ground truth):
@Override public void doLogic(){
}
Program: 169430
Project: 169430
Buggy source:
@Override public TubeStack acceptItemFromTube(TubeStack stack,ForgeDirection from,boolean simulate){
  if (from == getFacingDirection())   return stack;
  stack.stack=IOHelper.insert((IInventory)this,stack.stack,from.ordinal(),simulate);
  return stack.stack == null ? null : stack;
}

Fixed version (ground truth):
@Override public TubeStack acceptItemFromTube(TubeStack stack,ForgeDirection from,boolean simulate){
  stack.stack=IOHelper.insert(this,stack.stack,from.ordinal(),simulate);
  return stack.stack == null ? null : stack;
}
Program: 169431
Project: 169431
Buggy source:
public void readData(DataInput buffer){
}

Fixed version (ground truth):
public void readData(DataInput buffer) throws IOException {
  readFromNBT(PacketHelper.readNBT(buffer));
}
Program: 169432
Project: 169432
Buggy source:
public void writeData(DataOutput buffer){
}

Fixed version (ground truth):
public void writeData(DataOutput buffer) throws IOException {
  NBTTagCompound tag=new NBTTagCompound();
  writeToNBT(tag);
  PacketHelper.writeNBT(buffer,tag);
}
Program: 169433
Project: 169433
Buggy source:
@Override public IConnectionCache<? extends IRedstoneDevice> getRedstoneConnectionCache(){
  return connections;
}

Fixed version (ground truth):
@Override public RedstoneConnectionCache getRedstoneConnectionCache(){
  return connections;
}
Program: 169434
Project: 169434
Buggy source:
@SubscribeEvent public void onRenderDebugScreen(RenderGameOverlayEvent event){
  if (event.type.equals(RenderGameOverlayEvent.ElementType.DEBUG)) {
    Minecraft mc=Minecraft.getMinecraft();
    FontRenderer fr=mc.fontRenderer;
    MinecraftServer sv=MinecraftServer.getServer();
    boolean isLocal=sv instanceof IntegratedServer;
    List<String> text=new ArrayList<String>();
{
      fr.drawStringWithShadow("String_Node_Str",event.resolution.getScaledWidth() - 165,75,0xFFFFFF44);
    }
    if (sv != null) {
      double ms=MathHelper.mean(sv.worldTickTimes.get(mc.theWorld.provider.dimensionId)) * 1.0E-6D;
      double tps=Math.min(1000.0 / ms,20);
      text.add("String_Node_Str" + df.format(tps) + "String_Node_Str"+ df.format(ms)+ "String_Node_Str");
    }
 else {
      text.add("String_Node_Str");
    }
    int i=0;
    for (    String s : text) {
      fr.drawStringWithShadow(s,event.resolution.getScaledWidth() - 160,90 + 10 * i,0xFFFFFF77);
      i++;
    }
  }
}

Fixed version (ground truth):
@SubscribeEvent public void onRenderDebugScreen(RenderGameOverlayEvent event){
  if (event.type == RenderGameOverlayEvent.ElementType.DEBUG) {
    Minecraft mc=Minecraft.getMinecraft();
    FontRenderer fr=mc.fontRenderer;
    MinecraftServer sv=MinecraftServer.getServer();
    boolean isLocal=sv instanceof IntegratedServer;
    List<String> text=new ArrayList<String>();
{
      fr.drawStringWithShadow("String_Node_Str",event.resolution.getScaledWidth() - 165,75,0xFFFFFF44);
    }
    if (sv != null) {
      double ms=MathHelper.mean(sv.worldTickTimes.get(mc.theWorld.provider.dimensionId)) * 1.0E-6D;
      double tps=Math.min(1000.0 / ms,20);
      text.add("String_Node_Str" + df.format(tps) + "String_Node_Str"+ df.format(ms)+ "String_Node_Str");
    }
 else {
      text.add("String_Node_Str");
    }
    int i=0;
    for (    String s : text) {
      fr.drawStringWithShadow(s,event.resolution.getScaledWidth() - 160,90 + 10 * i,0xFFFFFF77);
      i++;
    }
  }
}
Program: 169436
Project: 169436
Buggy source:
public static void init(){
  for (int i=0; i < MinecraftColor.VALID_COLORS.length; i++)   blockLamp[i]=new BlockLamp(false,MinecraftColor.VALID_COLORS[i]);
  for (int i=0; i < MinecraftColor.VALID_COLORS.length; i++)   blockLampInverted[i]=new BlockLamp(true,MinecraftColor.VALID_COLORS[i]);
  registerBlocks();
  initModDependantBlocks();
}

Fixed version (ground truth):
public static void init(){
  instantiateBlocks();
  registerBlocks();
  initModDependantBlocks();
}