Buggy code:
public class DateTime extends Composite { int day ; int month ; int year ; int hours ; int minutes ; int seconds ; static final int MIN_YEAR = 1752 ; static final int MAX_YEAR = 9999 ; Calendar calendar ; DateFormatSymbols formatSymbols ; Button down ; Button up ; Text text ; String format ; Point [ ] fieldIndices ; int [ ] fieldNames ; int fieldCount ; int currentField = 0 ; int characterCount = 0 ; boolean ignoreVerify = false ; static final String DEFAULT_SHORT_DATE_FORMAT = "MM//YYYY" ; static final String DEFAULT_MEDIUM_DATE_FORMAT = "MM//DD//YYYY" ; static final String DEFAULT_LONG_DATE_FORMAT = "MM//DD//YYYY" ; static final String DEFAULT_SHORT_TIME_FORMAT = "HH:MM<seq2seq4repair_space>AM" ; static final String DEFAULT_MEDIUM_TIME_FORMAT = "HH:MM:SS<seq2seq4repair_space>AM" ; static final String DEFAULT_LONG_TIME_FORMAT = "HH:MM:SS<seq2seq4repair_space>AM" ; public DateTime ( Composite parent , int style ) { } static int checkStyle ( int style ) { } public void addSelectionListener ( SelectionListener listener ) { } protected void checkSubclass ( ) { } public Point computeSize ( int wHint , int hHint , boolean changed ) { } void createHandle ( int index ) { } void createWidget ( int index ) { } void commitCurrentField ( ) { } String formattedStringValue ( int fieldName , int value , boolean adjust ) { } String getComputeSizeString ( int style ) { } int getFieldIndex ( int fieldName ) { } String getFormattedString ( int style ) { } void getDate ( ) { } public int getDay ( ) { } public int getHours ( ) { } public int getMinutes ( ) { } public int getMonth ( ) { } String getNameText ( ) { } public int getSeconds ( ) { } public int getYear ( ) { } int gtk_day_selected ( int widget ) { } int gtk_month_changed ( int widget ) { } void hookEvents ( ) { } boolean isValid ( int fieldName , int value ) { } void incrementField ( int amount ) { } void onKeyDown ( Event event ) { } void onFocusIn ( Event event ) { } void onFocusOut ( Event event ) { } void onMouseClick ( Event event ) { } void onResize ( Event event ) { } void onVerify ( Event event ) { } void releaseWidget ( ) { } public void removeSelectionListener ( SelectionListener listener ) { } void selectField ( int index ) { } void sendSelectionEvent ( ) { } public void setBackground ( Color color ) { } public void setFont ( Font font ) { } public void setForeground ( Color color ) { } void setFormat ( String string ) { } void setField ( int fieldName , int value ) { if ( ( calendar . get ( fieldName ) ) == value ) return ; if ( fieldName == ( Calendar . AM_PM ) ) { calendar . roll ( Calendar . HOUR_OF_DAY , 12 ) ; } calendar . set ( fieldName , value ) ; <START_BUG> notifyListeners ( Selection , new Event ( ) ) ; <END_BUG> } void setTextField ( int fieldName , int value , boolean commit , boolean adjust ) { } public void setDay ( int day ) { } public void setHours ( int hours ) { } public void setMinutes ( int minutes ) { } public void setMonth ( int month ) { } public void setSeconds ( int seconds ) { } public void setYear ( int year ) { } int unformattedIntValue ( int fieldName , String newText , boolean adjust , int max ) { } public void updateControl ( ) { } }

Fix:
postEvent ( Selection ) ;